June 16, 2011 at 12:52 am
Hi Folks,
I am tasked to identify the application users as to who is making certain changes in the database. The users coconnect to the database via the application. The users login to application using the NT account. The application uses a service account to connect to the sql server. The sql server tells me the changes being done by the service account but I need to track the user who is using the application. I think every user session will have a rerespective process in sql server through which we can get the user details, not sure how to get that. Can somebody please help? I need to get the user login id and not just the laptop from which he is connecting. this is a web aplication hosted on IIS.
June 16, 2011 at 2:47 am
Run a trace, select logins event. thats what i would do.
June 16, 2011 at 7:50 am
Yes, but this will tell me only about the service account which the application is using and not the logins of the users who are connected to the application.
June 16, 2011 at 8:10 am
The SQL connection could not possibly know the windows login ID of the person who established a database connection. You will have to do this in your application. You can add some additional fields in your tables to track who last updated the record. How you get that info will depend on your authentication method.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
June 16, 2011 at 8:43 am
Sean is correct. SQL Server only has the information about which account logs into it. If the application proxies other users, then you would need to modify that application to either submit or track which user is connecting.
June 16, 2011 at 12:45 pm
June 16, 2011 at 12:53 pm
It might, it depends on how security is set up. However if you have the service account for your application logging in, that isn't impersonating the user. Each user would need a login to the SQL Server, which would then be used by the service account to impersonate the user.
June 17, 2011 at 12:01 am
Thank u friends, I got it. I was discussing with the expert developers and they are also suggesting the same, will work with my devp. team on this. thanks.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply