Tags: access, database, date, determine, microsoft, mysql, oracle, server, sql, time

determine db last access date?

On Database » Microsoft SQL Server

4,054 words with 4 Comments; publish: Sun, 25 May 2008 14:36:00 GMT; (250188.48, « »)

Is there a way to tell the last time a database was accessed?

All Comments

Leave a comment...

  • 4 Comments
    • You can determine the last time a user logged into the SQL server, but I

      don't know of any out of the box way to determine last DB access time.

      "jason" <jason.sqlserver.questionfor.info.discussions.microsoft.com> wrote in message

      news:3CCD15E4-C6D0-467A-809E-222B801F9D91.sqlserver.questionfor.info.microsoft.com...

      > Is there a way to tell the last time a database was accessed?

      #1; Sun, 25 May 2008 14:37:00 GMT
    • I refer to SQL2000 - can't comment on 2005!

      "Immy" <therealasianbabe.sqlserver.questionfor.info.hotmail.com> wrote in message

      news:uqxcWiw4GHA.3964.sqlserver.questionfor.info.TK2MSFTNGP04.phx.gbl...

      > You can determine the last time a user logged into the SQL server, but I

      > don't know of any out of the box way to determine last DB access time.

      > "jason" <jason.sqlserver.questionfor.info.discussions.microsoft.com> wrote in message

      > news:3CCD15E4-C6D0-467A-809E-222B801F9D91.sqlserver.questionfor.info.microsoft.com...

      >

      #2; Sun, 25 May 2008 14:38:00 GMT
    • If you haven't put in something to specifically track that (e.g. using SQL

      trace), the answer is no.

      Linchi

      "jason" wrote:

      > Is there a way to tell the last time a database was accessed?

      #3; Sun, 25 May 2008 14:39:00 GMT
    • Hello Jason,

      I agree with Linchi that if you did n't configure track on the database, we

      cannot determine the last access time since this informaiton is not saved

      automatically.

      You may want to take a look at BOL for some explanations as well as

      visiting at

      http://www.sql-server-performance.c...ofiler_tips.asp

      There is one column "databaseid" that you could add in profiler so that you

      could get databaseid information of each event. You could get the name of

      database from id by using:

      select name from master..sysdatabases where dbid = <databaseid>

      I understand it shall be convenient to store this information, and I will

      forward your feedback to the product team. In the meantime, I also

      encourage you submit via the link below since they'd like to hear your

      vocie:

      http://lab.msdn.microsoft.com/produ...ck/default.aspx

      If you have further questions on the issue, please feel free to let's know.

      Thank you.

      Best Regards,

      Peter Yang

      MCSE2000/2003, MCSA, MCDBA

      Microsoft Online Community Support

      ========================================

      ==========

      Get notification to my posts through email? Please refer to

      http://msdn.microsoft.com/subscript...ault.aspx#notif

      ications

      <http://msdn.microsoft.com/subscript...ps/default.aspx>.

      Note: The MSDN Managed Newsgroup support offering is for non-urgent issues

      where an initial response from the community or a Microsoft Support

      Engineer within 1 business day is acceptable. Please note that each follow

      up response may take approximately 2 business days as the support

      professional working with you may need further investigation to reach the

      most efficient resolution. The offering is not appropriate for situations

      that require urgent, real-time or phone-based interactions or complex

      project analysis and dump analysis issues. Issues of this nature are best

      handled working with a dedicated Microsoft Support Engineer by contacting

      Microsoft Customer Support Services (CSS) at

      <http://msdn.microsoft.com/subscript...rt/default.aspx>.

      ========================================

      ==========

      This posting is provided "AS IS" with no warranties, and confers no rights.

      #4; Sun, 25 May 2008 14:41:00 GMT