SQL: Make sure to use ORIGINAL_LOGIN when auditing

added by DotNetKicks
8/24/2018 1:26:27 PM

1 Kicks, 1536 Views

I regularly see code where SQL Server DBAs and developers are trying to log which user/login took a particular action within the database. There are many functions which appear to return the information needed, but there's only one that should normally be used: ORIGINAL_LOGIN()