Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Connected users

Author  Topic 

Newbie2005
Starting Member

29 Posts

Posted - 2006-05-23 : 21:07:48

How I can find if any user connected to a DB?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-23 : 21:11:36
sp_who or sp_who2


KH

Go to Top of Page

Newbie2005
Starting Member

29 Posts

Posted - 2006-05-23 : 21:16:36
thanks I just found it
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-05-23 : 21:20:56
[code]

select loginame from master..sysprocesses
where dbid = db_id('dbname')

[/code]

--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -