5
select
db_name(database_id) as banco,
object_name(object_id) as objeto,
stats.user_seeks,
stats.user_scans,
stats.user_lookups,
stats.user_updates
from
sys.dm_db_index_usage_stats as stats
I have this SELECT that brings me information grouped by the bank, I thought the object referred to a table, view, stored Procedure or Trigger, but I did not get the result I wanted.
There is a SELECT that brings me this information?
Expected result:
database objeto select data_ultimo_select update data_ultimo_update delete data_ultimo_delete
-------- ------- ------ ------------------ ------ ------------------ ------ ------------------
banco1 tabela1 1500 01-01-2013 500 01-01-2014 500 01-01-2015
banco2 tabela2 2500 01-01-2011 1500 01-01-2012 1500 01-01-2013
Is it possible?
I’ve searched several places and I haven’t found where SQL SERVER stores, if it does, this information.
What is the problem with the result obtained?
– Leonel Sanches da Silva
I will edit the question with the result I would like to get.
– dil_oliveira