Trace shows the incorrect Session Login Name

Published Jan 15 2019 02:00 PM 65 Views
Microsoft
First published on MSDN on Jul 01, 2011

The is more of an FYI blog post but I have read several blog and forum posts on this subject and I decided to dig into the behavior which revealed a trace bug.

For the vast majority of events the Session Login Name represents the originating session credentials where as the Login Name represents the current session credentials and everything works correctly.   The login name could be different for instance if there was an execute as in progress.

I found was the Existing Connection event incorrectly produces the session login name of the user who is starting the trace instead of the user associated with the login information of the existing connection.

I have filed a defect to get this addressed in future releases of the SQL Server.

Bob Dorr - Principal SQL Server Escalation Engineer


%3CLINGO-SUB%20id%3D%22lingo-sub-316608%22%20slang%3D%22en-US%22%3ETrace%20shows%20the%20incorrect%20Session%20Login%20Name%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-316608%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Jul%2001%2C%202011%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThe%20is%20more%20of%20an%20FYI%20blog%20post%20but%20I%20have%20read%20several%20blog%20and%20forum%20posts%20on%20this%20subject%20and%20I%20decided%20to%20dig%20into%20the%20behavior%20which%20revealed%20a%20trace%20bug.%3C%2FP%3E%0A%20%20%3CP%3EFor%20the%20vast%20majority%20of%20events%20the%20Session%20Login%20Name%20represents%20the%20originating%20session%20credentials%20where%20as%20the%20Login%20Name%20represents%20the%20current%20session%20credentials%20and%20everything%20works%20correctly.%26nbsp%3B%26nbsp%3B%20The%20login%20name%20could%20be%20different%20for%20instance%20if%20there%20was%20an%20%3CEM%3E%20execute%20as%20%3C%2FEM%3E%20in%20progress.%3C%2FP%3E%0A%20%20%3CP%3EI%20found%20was%20the%20Existing%20Connection%20event%20%3CEM%3E%20incorrectly%20produces%20the%20session%20login%20name%20of%20the%20user%20who%20is%20starting%20the%20trace%20%3C%2FEM%3E%20instead%20of%20the%20user%20associated%20with%20the%20login%20information%20of%20the%20existing%20connection.%3C%2FP%3E%0A%20%20%3CP%3EI%20have%20filed%20a%20defect%20to%20get%20this%20addressed%20in%20future%20releases%20of%20the%20SQL%20Server.%3C%2FP%3E%0A%20%20%3CP%3EBob%20Dorr%20-%20Principal%20SQL%20Server%20Escalation%20Engineer%3C%2FP%3E%0A%20%20%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-316608%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Jul%2001%2C%202011%20The%20is%20more%20of%20an%20FYI%20blog%20post%20but%20I%20have%20read%20several%20blog%20and%20forum%20posts%20on%20this%20subject%20and%20I%20decided%20to%20dig%20into%20the%20behavior%20which%20revealed%20a%20trace%20bug.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-316608%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Etroubleshooting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EUtilities%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Jan 15 2019 02:00 PM
Updated by: