Quantcast
Channel: Active questions tagged audit - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 147

Use trigger on DELETE to retrieve original SQL command and user who did it

$
0
0

I'm trying to create an audit log to store all delete commands on some tables, on MSSQL 2012.

What I need is the username that executed it and the command executed, then I can insert them on a log table.

I'm finding many example for creating trigger, but none that shows how to retrieve these info.


Viewing all articles
Browse latest Browse all 147

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>