Script to find when was the last update done on a database.

  • Hi,

    Any one help me here.

    We want know whether the databases are using or not and for that i want a

    Script to find when was the last update done on a databases?.

    Many thanks,

  • Generally, not possible.

    You can query sys.dm_db_index_usage_stats per database and check the dates in there, but that's only since the last time the DB was started (typically last time SQL Server starts), but that's about it unless you have some form of auditing or tracing set up.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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