December 11, 2009 at 3:12 pm
Hi:
I have project running on SQL 2005. There 2/3 users only have delete permission and 4 users have update permission. Now I want to monitor the activities of the user on my database, when and which user delete/update data from which table.
How can I do that using SQL 2005's help.
Need help please
Thanking You,
Maksuda...
December 11, 2009 at 4:09 pm
Might I suggest you use Books On Line
SQL Server 2005 Books Online (September 2007)
SQL Server Profiler Terminology
It will explain how you can set up a trace and have the trace place the data into a table for later examination.
If you attempt this and come up with a specific problem re-post and some one will attempt to assist you.
December 14, 2009 at 8:46 am
Absolutely follow BitBucket's advice.
Just don't run the Profiler GUI directly against any of your production systems. Only use the server side trace (TSQL scripts) against production systems.
"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 14, 2009 at 9:19 am
December 14, 2009 at 3:15 pm
Thank BitBucket. I read SQL 2005 online books about Profiler, but which event is for tracing delete event is not cleare to me.
Can you help for finding this.
Thanking You,
Maksuda...
December 14, 2009 at 3:17 pm
Under TSQL
Choose the 2 events SQL:BatchCompleted and SQL:BatchStarting
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
December 14, 2009 at 3:31 pm
Thanks for the reply.
SQL:BatchCompleted and SQL:BatchStarting are not for tracing delete event right? In that case server performance may go down and also it'll be very tough to find the delete only.
Is there any other way for tracing?
Thanking You,
Maksuda
December 14, 2009 at 3:33 pm
You can write triggers to catch updates and deletes on specific tables if you want.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply