Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Tracking a user through connection pool in Profiler

$
0
0

Currently all instances of our main app report an Appname of ".Net SqlClient Data Provider" and a LoginName of "XYZUser", and an NTUserName that is blank. 

This is a C# rich/smart app using WCF to talk to middle-tier stuff hosted by IIS - if I understand correctly.  I gather this is a common app architecture these days.

Anyway, me being a SQL geek, my concern is I'd *like* to be able to track Profiler rows by the user who submitted them!

I'm currently unclear whether the app uses the same connection and SPID for hours at a time, or whether each command might be on a different SPID.  Certainly there is some connection pooling involved.

So, certainly we can and should change the AppName!  As long as they've constructed this to use the same SQL login of "XYZUser", I guess we're stuck with that.  So here's a question - as long as we *are* using SQL logins, can we assign values to the NTUserName field, or is it forced blank by the magic of ADO or WCF or other framework voodoo?  I vaguely recall, perhaps incorrectly, that back in the day we could stuff values in there, or somewhere, where they would show up in Profiler.  Or is there some other field that can be used this way, per connection or per command?

Thanks.

Josh




Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>