August 10, 2009 at 1:16 pm
Hello
How can I kill all connection with T-sql? If I delete a DB with the managementstudio, then I can choose 'kill all connection'. For this I search the T-sql code.
Thanks
mick
August 10, 2009 at 1:23 pm
Check out this link
http://msdn.microsoft.com/en-us/library/aa933230(SQL.80).aspx
August 10, 2009 at 1:43 pm
Well, this will bump everyone else off and keep them off until you reset that database to MULTI_USER mode:
ALTER DATABASE YourDBName SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
August 10, 2009 at 11:04 pm
Hello
Thanks for your answers!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply