Question

I created a trigger for auditing purposes that logs changes made to a particular table.

Is there any way for me to tell what computer the query that set the trigger off came from? I have full access to the database, but no access to software code.

Était-ce utile?

La solution

I'd include these in your auditing:

SELECT 
    HOST_NAME()  ModifiedByHost, 
    SYSTEM_USER  ModifiedByUser,
    APP_NAME()  ModifiedByAppName

HOST_NAME() will give you the computer.

http://technet.microsoft.com/en-us/library/ms178598.aspx

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top