May 18, 2011 at 4:55 am
Hi,
i want to kill spids of particular database.by killing kill command i am killing single spid.not multiple.how can u solve the problem
May 18, 2011 at 6:17 am
Not sure I understand what you are asking. so you want to close all the connections to 1 database? Why not take it offline and bring it right back?
May 18, 2011 at 6:19 am
If you're trying to isolate it for a restore or some other operation, set it to restricted user and use the ROLLBACK IMMEDIATE command. It will immediately cause all connections to go into a rollback, so be very judicious in it's use.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 18, 2011 at 6:26 am
Grant Fritchey (5/18/2011)
If you're trying to isolate it for a restore or some other operation, set it to restricted user and use the ROLLBACK IMMEDIATE command. It will immediately cause all connections to go into a rollback, so be very judicious in it's use.
I'd even consider single user. We have an erp that shall remain nameless but that requires dbo access for all 100+ users.
So single user would be required here (yes I had the issue while upgrading the app, not fun!).
May 18, 2011 at 7:05 am
Just as another option the attached script kills all connections to a DB but single user mode would work as well.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply