Huang

Huang

This database is in single-user mode, which prevents the database from being deleted.

Today, when deleting a database, an error kept occurring, roughly meaning: This database is in single-user mode and is still connected, so it cannot be deleted (even if SQL Server is stopped and restarted).

After searching on Baidu, I found a solution, which is backed up here:

First, create a stored procedure in the master database to kill all connections, and then call it using:

After executing, you can perform operations on the database.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.