Posts Tagged ‘DMV – sys.dm_db_index_usage_stats’

Index_Name Function for SQL Server

June 18, 2012 1 comment

We have the database_name, object_name, object_schema_name but don’t have index_name.  So when accessing information in sys.dm_db_index_usage stats, it becomes troublesome to find out index name for al indexes.

Starting SQL 2008+ they updated the object_name function.  Before it used to be object_name(object_id) in context of current database; however the new function is object_name(object_id,[database_id]).  If they can do that for object_name & schema_name, why not indexes?

Searching Microsoft Connect, found the recommendation for it (link). Microsoft closed the feedback saying its too late for 2008, it will be looked at next version.  Well 2012 is out, I still don’t see it.  But I was thinking we we can still vote on it “maybe” it will get more attention?

%d bloggers like this: