|
|
select * from sys.sysprocesses
returns you a host of information about the login name, Windows user name, processes running on an instance of SQL Server etc.. Check out the hostname, nt_username, loginame, nt_domain columns returned on executing the above query.
Read more about sys.sysprocesses over here
http://msdn2.microsoft.com/en-us/library/ms179881.aspx
You can also try out the stored procedures sp_who
EXEC sp_who
EXEC sp_who2
sp_who provides information about current users, sessions, and processes in an instance of SQL Server
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |






comments
0 Responses to "How to find out the users logged in to a SQL Server 2005 database"Post a Comment