I'm a programmer, and not a DBA, so I need some help here. I'm trying to figure out how to set up some auditing within a production database.
Basically what I have to do is, I need to log all record deletions from a particular table. I've been looking through SQL Profiler, but so far I haven't been able to figure out how to do this.
Any help would be greatly appreciated.
Thanks.Best way would probably be to implement a trigger on the table that inserts the deleted record into a backup table, alnog with the date it was deleted. This table would have to get purged every once in a while, in order to make sure that it itself does not become larger than the table you are auditing, though. Hope this helps.|||Or add buisness logic. On our 'user' table, we shut them off with a datetime column, rather than delete them, for example.|||If you can afford then use Lumigent's (http://www.lumigent.com) ENTEGRA which is best used tool to audit the database events at all levels.
Showing posts with label dba. Show all posts
Showing posts with label dba. Show all posts
Thursday, March 8, 2012
Auditing a table for SQL Server
Audit User Activity
Hi All,
I'm an Oracle DBA that has inherited some SQL Server 2000 databases.
Can you audit a particular user in Sql Server 2000. We need to know exactly what a particular user is doing, (i.e. creating/dropping objects, and what data he is accessing)
what is the best way to do this??
Thanks,
DaveSQL Profiler (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_aa_2xiq.asp).
-PatP
I'm an Oracle DBA that has inherited some SQL Server 2000 databases.
Can you audit a particular user in Sql Server 2000. We need to know exactly what a particular user is doing, (i.e. creating/dropping objects, and what data he is accessing)
what is the best way to do this??
Thanks,
DaveSQL Profiler (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_aa_2xiq.asp).
-PatP
Subscribe to:
Posts (Atom)