Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Delete Trigger to capture Login, Application, etc Expand / Collapse
Author
Message
Posted Sunday, February 10, 2013 5:30 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Monday, September 29, 2014 10:57 PM
Points: 4,242, Visits: 4,290
I have a situation where a developer is inserting a large number of records into a table.

They performed the load yesterday but this morning the records are gone.

This is in the development environment so a lot of people have permissions.

There is only one job that calls an SSIS package that deletes records from this dimension table but there is a WHERE Clause that restricts what records that get deleted so this package is not the culprit.

I have DDL Packages where I capture all DML operations.

I need to create a Trigger where I capture the Login, Datetime, Application that was used to delete the records.

Does anyone have a sample DML Delete Trigger that i could use as a reference?

Thank you!





For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Post #1418155
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse