DBA > Job Interview Questions > Microsoft SQL Server FAQs

How can you determine which user is executing st

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

How can you determine which user is executing statements in Profiler?

You are trying to track down issues with a SQL Server 2005 application using Profiler. The part of the application you are checking uses the EXECUTE AS statement to change the context of every user to the user Bob. How can you determine which user is executing statements in Profiler?


Answer
Check the Sessionloginname data column.
Explanation
The SESSIONLOGINNAME column, not shown by default, will contain the original login name of the user even if their context has changed in the application.

(Continued on next question...)

Other Job Interview Questions