Friday, February 17, 2012

Connected user list to a sql server database

Hi,
Is there any way to get the list of user names connected to a particular
database? Can any one give me the T-sql statement to get the list of users.
Venkat
Hi
Here is the query
Select Loginame,spid,db_name(dbid) from master..sysprocesses where
db_name(dbid)='dbname'
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
"Venkat" wrote:

> Hi,
> Is there any way to get the list of user names connected to a particular
> database? Can any one give me the T-sql statement to get the list of users.
> --
> Venkat
>
>

No comments:

Post a Comment