How to find out when a db was last updated

  • Hi All

    I have a suspicion that a db on one of my servers has not been updated for a while and has become redundant. Is there a way to find out when a particular database was last updated?

  • You can use DML Trigger or else you can use Profiler to get information you require.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • You mean, not updated by users?

    If that's the case, check if there are tables in your database with columnnames like 'modified' (or variants) and select the max() value from this column.

    select object_name(id) "table" , name "columnname" from syscolumns

    where name like '%modifi%'

    Wilfred
    The best things in life are the simple things

  • Not per sea, but you can look for modified fields in tables or create a DDL trigger to watch the table/database.

    I run a job on a monitoring server every day that retrieves the row counts of all tables in all our databases and tracks the change from day to day. After two months of collected data, I can tell what is being changed and what is not (this makes an assumption that tables in use undergo INSERTs and DELETEs, as it does not track UPDATEs...)

    If you have the resources, this might aid your search. It has allowed us to remove a number of old databases that were no longer in use.

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

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