Discussion Locked

whose process are using my database?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Where can i see all the active connections that attached to a particular database? I always get permission error when i tried to restore a backup db. It said i can't restore becos the database is currently in used. What i normally do is stopped SQL Server 7.0 then restart again so that i can get rid of all the connections, but this include all the other connections that attached to other database (in the same SQL Server). Can i only disconnect those connections which affect my database without disturbing the others? If yes, how?

3 replies

by roc180

Yes, use the Kill procedure from query analyzer. The only parameter you need is the spid (connection id) of the user you want to bounce, to obtain the spid use sp_who to determine all active connections to your DB and their spid.

Your statement would look like: Kill 5

Good Luck

Neal Martinelli

This discussion is closed to new replies.