Sunday, March 25, 2012

determine db last access date?

Is there a way to tell the last time a database was accessed?
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@.discussions.microsoft.com> wrote in message
news:3CCD15E4-C6D0-467A-809E-222B801F9D91@.microsoft.com...
> Is there a way to tell the last time a database was accessed?
|||I refer to SQL2000 - can't comment on 2005!
"Immy" <therealasianbabe@.hotmail.com> wrote in message
news:uqxcWiw4GHA.3964@.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@.discussions.microsoft.com> wrote in message
> news:3CCD15E4-C6D0-467A-809E-222B801F9D91@.microsoft.com...
>
|||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?
|||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.co...filer_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/produc...k/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/subscripti...ult.aspx#notif
ications
<http://msdn.microsoft.com/subscripti...s/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/subscripti...t/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
sql

No comments:

Post a Comment