Syntax to see when was my database was accessed last time

  • Query to see when was my database was accessed last time

    Thanks in Advance,

    Regards,

    Bubby

  • bubby - Wednesday, July 25, 2018 11:36 AM

    Query to see when was my database was accessed last time

    Thanks in Advance,

    Regards,

    Bubby

    There is no foolproof way to do this with a query. Unless you have some kind of auditing that would capture database use and you can query the audit results.
    Other than that, querying index usage stats or the cache can possibly give you the last usage but not 100%. And things are cleared on a restart.
    This article has a decent list of things you can try checking and it lists the pros and cons of each. There are also some suggestions in the comments:
    4 Lightweight Ways to Tell if a Database is Used

    Sue

  • bubby - Wednesday, July 25, 2018 11:36 AM

    Query to see when was my database was accessed last time

    Thanks in Advance,

    Regards,

    Bubby

    Have you tried Google?
    https://www.google.com/search?q=when+was+my+database+was+accessed+last+time

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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

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