Is there any way of tracing user's identity when he/she triggers a a delete trigger on T-SQL 2005, e.g. with UNIQUEIDENTIFIER? If I do record the UNIQUEIDENTIFIER, how do I trace it back to the user?
+2
A:
take a look at suser_sname() or user_name() for windows/sql login, of course if everyone uses the same login this won't help you
the deleted pseudo table will have all the rows that are to be deleted so in the worst case you can offload those somewhere else in case you need to get them back
SQLMenace
2009-02-04 15:53:00