Question

Locked

How do I determine connected users to a SQL Server 2005 database?

By compulew ·
A db cannot be restored when there is an open connection. How do I determine who or what has an open connection?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

From SQL Management Studio

by Tony Hopkinson In reply to How do I determine connec ...

Connect to the server, Select Management -> Activity Monitor.

Collapse -

Another way

by scott_heath In reply to How do I determine connec ...

Tony is right, but you can also use the stored procedure sp_who2. Or make a custom stored proc that takes a dbname as a parameter and used DB_ID and a join between sys.processes and master.dbo.sysdatabases to show only the relevant connections. :)

Regards,
Scott

http://scottisageek.spaces.live.com

Back to Networks Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums