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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment