Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Audit - finding Username with Triggers

Author  Topic 

TMDOSS
Starting Member

33 Posts

Posted - 2010-03-31 : 15:38:45
I need to create the trigger to Capture who is changing values in the Table.(User name and data) I think I need to user Isnerted table.
Can u help

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-03-31 : 16:24:53
How does the application authenticate users to the database server? Is there one generic account and the app uses application authentication? Or does everyone use their own SQL or Windows account to login?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-04-01 : 03:58:26
This may help:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=170215
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-01 : 05:04:31
Inserted table will have only actual data you insert. for grabbing user name info use USER_NAME() or SYSEM_USER function

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

TMDOSS
Starting Member

33 Posts

Posted - 2010-04-01 : 09:40:31
It's 3rd Party Software.it uses Windows account to login
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-01-14 : 08:39:56
quote:
Originally posted by TMDOSS

It's 3rd Party Software.it uses Windows account to login


then SUSER_SNAME() should give the user in scope

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -