April 9, 2002 at 9:46 am
I have an Update Audit Trigger. When the user makes an update from the front-end it works well. Is there a way to ensure that if a user logs on to the SQL Server through Enterprise Manager or SQL Query Analyzer and makes any change to the data, it should register his/her username. The user could also log on Query Analyzer using Windows Authentication, in which case it should pick the name of the user and the box that is used to access the DB.
April 9, 2002 at 10:21 am
When you connect, your auth information is returned by user_name() and suser_name(). These are the db user and system user respectively. You can check for these in the trigger.
Steve Jones
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply