When was the last activity on the db

Last post 10-08-2008 2:50 PM by MohammedU. 3 replies.
Page 1 of 1 (4 items)
Active Topics My Discussions Unanswered Sort Posts: Previous Next
  • 10-07-2008 9:53 PM

    When was the last activity on the db

    Hi everyone,

     Does anyone know how I can find out when the database was last updated or touched or activity performed. Anytype of activity. I just wanted to see like a last updated date.

     Does anyone know how I can find that is there a script or something? This is in sql server 2005.

     Thanks,

     

  • 10-07-2008 11:15 PM In reply to

    Re: When was the last activity on the db

    To get these kind of information you need to run Profiler /Trace.

     Madhu

    Madhu K Nair
    http://madhuottapalam.blogspot.com/
    http://experiencing-sql-server-2008.blogspot.com/
  • 10-08-2008 1:46 PM In reply to

    Re: When was the last activity on the db

    If you think the DB isn't being used, one approach we took was to set AUTOCLOSE on; definitely not a good idea for databases you know are actively being used!  If anything is hitting the database, when it is opened it is logged to the SQL log and you start run traces then to see what is hitting it and from where.

     Just one approach!

     

  • 10-08-2008 2:50 PM In reply to

    Re: When was the last activity on the db

    Check the following Aaron SQL MVP blog for answer and explanation.....

    http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx

     

    MohammedU.
    Microsoft SQL Server MVP
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.
Page 1 of 1 (4 items)
Active Topics   My Discussions    Unanswered Posts


© 2000 - 2007 vDerivatives Limited All Rights Reserved.