Trace shows application account, not logged in user
I'm trying to audit and track the stored procedures that the users call. When I set up the trace, it shows a blank NTUserName field and the LoginName is the account name of the .NET app. How do I get the trace to show the activities of the logged in (Windows authenticated) user?
If the application is making the calls to SQL Server with an application account, then that account is the only thing SQL Server sees and so the only thing it can record. The only way to get the user login information is to make sure the application is forwarding that account credential instead of using its own account. Unfortunately, that may involve recongifuring the app in question and making sure that all users of the application have the necessary permissions on SQL Server under their own log in. Depending on what your exact goal is, you may be better off configuring the application to separately log what user is doing what.