December 7, 2011 at 2:48 am
I want to keep a track on database user activity in MSSQL 2005.
the script should return the username,activity done like alter,delete database
alter delete table,views,storeprocedure. . . ???
which user running which query.....
i mean to say all the activity of user should get tracked in MSSQL2005.
pls reply
Thanks & Regards,
Pallavi
December 7, 2011 at 2:53 am
It’s just for viewing or logging it for future as well (Audit)?
December 7, 2011 at 3:10 am
If you want to record all the statements run by users, you have only one option, which is setting up a trace.
Be aware that it will likely slow down the server and take lots of disk space.
-- Gianluca Sartori
December 7, 2011 at 3:34 am
Can you please guide me about creating trace..
please tell me the steps of creating trace...
Thanks & Regards,
Pallavi
December 7, 2011 at 3:52 am
December 7, 2011 at 4:41 am
in that i am not able to understand the first step :-
On the File menu, click New Trace, and connect to an instance of SQL Server.
in my MSSQL there is no New Trace tab :w00t:
Thanks & Regards,
Pallavi
December 7, 2011 at 4:47 am
pallavi.unde (12/7/2011)
in that i am not able to understand the first step :-On the File menu, click New Trace, and connect to an instance of SQL Server.
in my MSSQL there is no New Trace tab :w00t:
Surely, it's not there in SSMS. The article is on 'SQL Server Profiler'. It's another utility in SQL Server.
December 7, 2011 at 5:03 am
Another option to pursue, and a good plan for your long term skill set development, is to use Extended Events to capture all user activity. It works a lot like Trace/Profiler, but it causes much less impact on your system. Here's an introduction[/url].
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 7, 2011 at 5:54 am
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply