I have a small dilemma and hopefully someone can give me some insight.
I have to create auditing triggers to capture events on tables happening within my application. Normally this is no problem with the SYSTEM_USER variable but we now have a custom user table with one SQL Server Service account, so essentially everything will look like the service account is performing all the actions.
How can I pass that user or store the user name somewhere and access it from a trigger to insert into my log table?
Chris