Database Activty

  • Hi

    How can I check if a Database is being used by users/Applications?

     

    Can I setup a trace on the Database and what can I collect to see if the db is being utilized.

     

    Tks

  • You could first look at either the Current Activity window or using sp_who to check for existing connections into that particular database. Otherwise you can set up a trace using profiler and filter on only that database.

  • use sp_who2 active to find out the runnable transactions. else sp_who2 will give you a list of all transactions.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Not sure sp_who2 lists transactions. It lists active users. You can run dbcc opentran to see which transactions are open.

    You can run profiler on a particular database to see if activity occurs. Or you can set it to "autoclose" and look for activity of it opening in the error log.

  • When we were trying to find out whether a database was still being used a while ago, not having been able to contact the owner of it, we reached the point of setting it to "DBO Only" mode. We left it like that for a couple of months to see who shouted. Once we went past that point, we made a final backup and then deleted it. Still waiting for someone to shout....

    It's an extremely brutal way, but effective. (Waits for flames)

  • Here is a kinder and gentler way taken from a fairly recent post:

    Try setting 'Auto Close' and then just check your SQL Server errorlog !

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Thank you all for your input!

Viewing 7 posts - 1 through 6 (of 6 total)

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