New answers tagged

3

No, if the user connects to SQL Server using a SQL Authentication login, there is no way to determine from that which Windows login was responsible. SQL Server can only record the information it has been provided, and when you use SQL Authentication, no Windows login / domain / group information is passed to SQL Server. You can look at DMVs like ...


2

You can use DMVs to see who's logged in at the time, but this won't get you any historic information. SELECT c.session_id AS spid, c.auth_scheme, s.login_name, s.[host_name], c.client_net_address FROM sys.dm_exec_connections AS c INNER JOIN sys.dm_exec_sessions AS s ON c.session_id=s.session_id; I suppose you could use this code in a logon trigger ...


2

You can query sys.dm_exec_sessions to find out the host name of the machine that is connecting to your SQL server instance with the application account. If you can track back the host name to an user machine, you should be able to determine whoo is using that account: SELECT host_name , program_name FROM sys.dm_exec_sessions WHERE login_name = ...


3

Unless you are actually deleting the user accounts in Active Directory and re-creating them, you don't actually need to do anything to the logins on SQL Server. SQL Server references the accounts using the Active Directory SID, not the name. You can test this by renaming an account in Active Directory and attempting to login to SQL Server with it. ...



Top 50 recent answers are included