Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 monitoring database access

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-04-15 : 08:04:29
Philip writes "We currently run servers with Mircosoft windows 2000 server operatating system. How do I find out the last time a database was accessed and who accessed it? Is there a script I can run to monitor when and who accesses a database?"

Thrasymachus
Constraint Violating Yak Guru

483 Posts

Posted - 2005-04-15 : 08:32:54
it depends on how your users are connecting. if everyone has specific account you can use a trace in SQL Server Profiler to specifically monitor just logins and log outs. If the users are using an application that uses a connection string that has the same sql login for each connection (as opposed to Windows Authentication) or if the app using an application role, you might be SOL.

Sean Roussy
Go to Top of Page

jason
Posting Yak Master

164 Posts

Posted - 2005-04-15 : 13:38:14
The trace can also show the host name and/or IP address of the machine making the connection. Lumigent will allow you to read the transaction log file.

If you are trying to track changes made by users, then you might need to write this logic into your application. If you have a busy server a trace may not be the best option for you. Even reading the transaction log wouldn't necessarily tell you 'who' unless you are using integrated security.
Go to Top of Page
   

- Advertisement -