September 8, 2010 at 11:23 pm
Can any one help me here....
I need a script to find out the users and last usage of the database.
Here i know the query to get the details after restart of sqlserver.But i dont want this.
I need the last usage date and list of users on all databases in a instance before the restart of sqlserver?
Please help me...
Thanks in Advance....
GLNP
September 9, 2010 at 12:50 am
As far as I know the serve doesn't store this information. You could have a trigger on LOGON, that will writes the login name, date and database name each time that someone logs on.
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
September 9, 2010 at 3:57 am
i love logon traces, but for tracking/ accessing specific databases, i don't think it would work;, a logon trigger occurs before a user connects to a database...so in the trigger you wouldn't find a database reference;
you'd want to use a server side trace for DML i htink instead, so you can track/roll up info from the trace results.
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply