How to quickly disconnect all connections to the current database

Source: Internet
Author: User
I used to execute this script to quickly disconnect all connections to the current database. Then I will execute this script to disconnect all connections, but when I reinstall SQLSERVER, it is inconvenient to find the script execution in the code library. In fact, the database can be detached and all connections can be dropped by 1USEmasterANSI_NULLSQ.

I used to execute this script to quickly disconnect all connections to the current database. Then I will execute this script to disconnect all connections, but when I reinstall SQLSERVER, it is inconvenient to find the script execution in the code library. In fact, the database can be detached to disconnect all connections. 1 USE master ANSI_NULLS Q

How to quickly disconnect all connections to the current database

I used to like to execute this script, and then execute this script when I want to disconnect all connections. But when I reinstall SQLSERVER, I need to execute this script in the code library.

It is inconvenient to find this script for execution. In Hong Kong Space and Hong Kong virtual hosts, in fact, the database can be detached from all connections.

1 USE cipher. (100) (30) (VARCHAR, spid) AS spId19FROM master... SysProcesses (dbid) spid dbid TmpCursor (@ killspId) TmpCursor extends TmpCursor, virtual host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.