Last used date

  • Hi, I have few hundreds of tables and need to do some cleanups. Is there a select statement to check when each table is last used?

    Anyone pls help

    Thanks.

  • you can check when it was created and when it's definition (or one of its dependent objects) was last modified but that is about it.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • Hi

    If you have indexes on the tables you can use the DMV sys.dm_db_index_usage_stats to get the

    last seek,scan,lookup or update. you will have to take the most latest date from among these columns.

    "Keep Trying"

Viewing 3 posts - 1 through 2 (of 2 total)

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