What's the fastest way to kill all database connections? Properly, I should say... without pulling the cord on the server.
I'm glad you asked! 😉 The easiest/fastest way that I am aware of is to set the database into SINGLE_USER. This will sever all active connections to the database aside from your own. Like this:
--
kill all connections to a database
USE master;
ALTER DATABASE SSISDB -- change to your dbname
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
When you've done your thing and you're ready to let them back in, you'll set it back to MULTI_USER, like this:
--
set it back into multi user
USE master;
ALTER DATABASE SSISDB -- change to your dbname
SET MULTI_USER;
Easy peasy.
You could also use a cursor to go through all active processes in the database, killing them sequentially... but, I don't often recommend the cursor method, if it can be avoided.
great job! The author giving the present post, this is very unique and worthy content. I am waiting for your another post...
ReplyDeleteOracle Training in Chennai
Oracle Training institute in chennai
Tableau Training in Chennai
Spark Training in Chennai
Unix Training in Chennai
Power BI Training in Chennai
Oracle DBA Training in Chennai
Oracle Training in Chennai
Oracle Training institute in chennai
You have provided a nice article, Thank you very much for this one. And I hope this will be useful for many people. And I am waiting for your next post keep on updating these kinds of knowledgeable things
ReplyDeleteSEO Training in Chennai
SEO Course in Chennai
Advanced Java Training in Chennai
Hadoop Course in Chennai
Big Data Analytics Courses in Chennai
Big Data Course in Chennai
Selenium Training in Chennai
SEO Training in Tambaram
ReplyDeleteGreat post. keep sharing such a worthy information
Selenium Training in Chennai
Selenium Training in Bangalore
Selenium Training in Coimbatore
Selenium course in Chennai
Selenium Course in Bangalore
Selenium Course in Coimbatore
Software Testing Course in Chennai
Hacking Course in Bangalore
Great experience for me by reading this blog. Thank you for wonderful article.
ReplyDeleteAngularjs Training in Chennai
Angularjs Training in Bangalore
angularjs training institute in bangalore
Angular Training in hyderabad
best angularjs training in bangalore
Angular course in hyderabad
Salesforce Training in Bangalore
Hadoop training in bangalore
Nice article. I liked very much. All the informations given by you are really helpful for my research. keep on posting your views.
ReplyDeleteccna training institute in coimbatore
best ccna training institute in coimbatore
best ccna institute in madurai
ccna training madurai
best ccna institute in bangalore
ccna institute in bangalore
Thank you all for the compliments! I will keep posting!
ReplyDeleteAmazing Post. keep update more information.
ReplyDeleteAviation Academy in Chennai
Air Hostess Training in Chennai
Airport Management Courses in Chennai
Ground Staff Training in Chennai
Aviation Courses in Chennai
Air Hostess Training Institute in Chennai
Airline Courses in Chennai
Airport Ground Staff Training in Chennai
Amazing Post. keep update more information.
ReplyDeleteWeb Designing Course in chennai
web Designing Training in Chennai
Web Designing Course Online
Really wonderful blog! Thanks for taking your valuable time to share this with us. Keep us updated with more such blogs.
ReplyDeleteAWS Certification in Chennai
AWS Online Training
AWS Training in Coimbatore