January 24, 2011 at 5:54 am
I'm trying to troubleshoot an report that keeps generating deadlocks and bringing the SQL server down. While I am looking at the querys that are causing the deadlocks; I wanted to get the user accounts that were running the queries. Activity monitor only shows me the sessionID and generic ASP user account. I wonder if there is a way to tie the sessionID back to a user account somehow?
Thanks
Nick
January 24, 2011 at 5:58 am
If you're seeing the ASP login, it means that the actual user never logged into SQL, just the ASP process. Hence SQL will have no knowledge of who originated the requests, it only knows who logged it, which in this case is the ASP login.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 24, 2011 at 7:30 am
You should pass in the user ID as a parameter for stored procedures. This would allow you to better understand what is happening.
you can get the command a session is running, which might help as well. Try double clicking the session.
January 25, 2011 at 5:50 am
Thank you both for the reply! I'll see how the loginID(UserID) is stored, maybe it's somewhere in the ASP application, and see if I can use that to pass some information to the server so that I can match the application's UserID to the sql sessionID (currently SQL just shows the ASP user) in a manor that I can report on.
Thanks again.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply