September 15, 2009 at 12:42 am
how to monitor below requirements? In sql server 2005, could anyone give me a script,
Database name
User name
Last database activity
Last login name & datetime
Last logout datetime
Thanks
September 15, 2009 at 12:48 am
September 15, 2009 at 12:54 am
ananda.murugesan (9/15/2009)
how to monitor below requirements? In sql server 2005, could anyone give me a script,Database name
User name
Last database activity
Last login name & datetime
Last logout datetime
Thanks
You dont say what sort of monitoring you are after, a script to run in the morning, periodic, or a light weight trace you can run during the day.
to return the last database activity, you would need to use a trace, and define what you mean by last database activity
--------------------------------------------------------------------------------------
[highlight]Recommended Articles on How to help us help you and[/highlight]
[highlight]solve commonly asked questions[/highlight]
Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
Managing Transaction Logs by Gail Shaw[/url]
How to post Performance problems by Gail Shaw[/url]
Help, my database is corrupt. Now what? by Gail Shaw[/url]
September 15, 2009 at 2:18 am
As a datacenter part, we want know who was last login the sq server 2005? and we need to execute the script once in a week. If you provide the script, ie really help for us.
September 15, 2009 at 3:18 am
You could use database triggers to capture the events to a table. You can capture DML events and log those with the time and login with time but I don't think you can capture logout's. You would need to use event notification or a trace
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply