General discussion

Locked

whose process are using my database?

By ohJani ·
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?

This conversation is currently closed to new comments.

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

All Comments

Collapse -

whose process are using my database?

by roc180 In reply to whose process are using m ...

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

Collapse -

whose process are using my database?

by ohJani In reply to whose process are using m ...

Poster rated this answer

Collapse -

whose process are using my database?

by ohJani In reply to whose process are using m ...

This question was closed by the author

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

Related Discussions

Related Forums