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 Administration (2000)
 Find out who connected to database

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2005-12-03 : 07:01:43
I want to detach a database but said that there are 3 connections using this database. How to find out who/which pc was connected to this database?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-03 : 07:11:08
use sp_who

-----------------
[KH]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-03 : 07:16:31
Also
sp_who2 and run profiler

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-12-03 : 15:22:58
You should be able to find out better from sp_who or sp_who2. Profiler is good for seeing the actual queries they are running and actions performed. They can have active connections though and not be doing anything. Profiler doesn't do such a good job of showing that. Just fyi.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-12-05 : 00:09:42
Thanks Derrick

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

activecrypt
Posting Yak Master

165 Posts

Posted - 2005-12-05 : 00:46:53
Hi,
or use sp_who3 from Mr. Vyas site , http://vyaskn.tripod.com


Regards

Andy Davis
Activecrypt Team
--------------------------------------------
SQL Server Encryption Software
http://www.activecrypt.com
Go to Top of Page
   

- Advertisement -