saratcm
asked on
How to track which users logged in to sql server
Hi All,
How to track which users logged in to sql server?
do they need to have only windows login to track them or sql logins to will work to track them?
How to track which users logged in to sql server?
do they need to have only windows login to track them or sql logins to will work to track them?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks for the comments, will this give information only for the users who r currently logged in or also for currently logged off of or users no longer in that session( disconnected)?
I mean in case if I want to find out which user logged in in last 30 min or so and they might have closed their session by the time I am executing this cmd
I mean in case if I want to find out which user logged in in last 30 min or so and they might have closed their session by the time I am executing this cmd
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I would use SQL Profiler and build traces that would track audit login and logoff events.
There is a great topic on this at http://msdn.microsoft.com/en-us/library/aa905160(SQL.80).aspx
There is a great topic on this at http://msdn.microsoft.com/en-us/library/aa905160(SQL.80).aspx
ASKER
Thanks
select * from sys.sysprocesses
it will list all process and what users are connected