Hi All,
Working in MS SQL, you must have faced below error at least once.
Issue: How to drop SQL Server database currently in use and in Single user mode.
Error:
"changes to the state or options of database 'AxDB' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it."
Solution:
This built-in stored procedure shows all connections to a database
exec sp_who2
And this query kills a connection to the database, for example connection SPID #53
kill 53
Thank you!
No comments:
Post a Comment