ready2drum Posted October 2, 2009 Share Posted October 2, 2009 While trying to determine when a specific table was last updated, an error message appeared (using SQL Server Management Studio).Error: Msg 208, Level 16, State 1, Line 1Invalid object name 'sys.dm_db_index_usage_stats'.See code below: SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*FROM sys.dm_db_index_usage_statsWHERE database_id = DB_ID('MasteryNet')AND OBJECT_ID=OBJECT_ID('LAST_RECORDS' Not sure what else to try to get the code to run without errors....any suggestions would be a great help!Thanks! Link to comment Share on other sites More sharing options...
justsomeguy Posted October 2, 2009 Share Posted October 2, 2009 Sounds like there's not a table called sys.dm_db_index_usage_stats Link to comment Share on other sites More sharing options...
ready2drum Posted October 2, 2009 Author Share Posted October 2, 2009 Hmmmm...I thought that the table already existed with SQL SMS.....I found online that this was the code to use in order to find the update status of a table.... Link to comment Share on other sites More sharing options...
ready2drum Posted October 2, 2009 Author Share Posted October 2, 2009 where else can I find out the update status of a table? lots of online sites don't address this issue... Link to comment Share on other sites More sharing options...
justsomeguy Posted October 2, 2009 Share Posted October 2, 2009 I'm not sure, I haven't tried to do that before. SQL Server shows me a master database, that might be one place to look, and there are also several system tables inside each database that also might have the information you're looking for. Link to comment Share on other sites More sharing options...
ready2drum Posted October 2, 2009 Author Share Posted October 2, 2009 Sounds good....I appreciate your help...have a good weekend! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.