Determining last update to a table

  • Hi,

    I have googled this to see how you can determine the last update to a table and they keep referencing a system table called sys.dm_db_index_usage_stats. Where is this table kept? If I query this it says object name does not exist?

  • What version of SQL Server are you running? If it's SQL Server 2000, that would explain your issue.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • This was executed on 2008. Should I see this in my system tables? Maybe our install did not add this?

  • What compatibility level?

  • How do you determine that?

  • It's not actually a table. It's a Dynamic Management View. If you're looking for it in SSMS, you need to look in system views. But no, unless you've got a horribly mangled system, it should be there. It's not something you'd miss installing by accident.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Compatibility level won't affect that. But, if you want to check it, you can select that from sys.databases.

    What did you do to check the index use?

    Here's a valid query:

    SELECT *

    FROM sys.dm_db_index_usage_stats;

    Not very useful, but if that works, you have a place to start.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply