I had this issue when I tried to swap the databases after bacpac restore.
“Could not rename the database ‘DbName’. The database is in single-user mode, and a user is currently connected to it”
Given below the steps I followed to address this error
SELECT request_session_id FROM sys.dm_tran_locks
WHERE resource_database_id = DB_ID('DbNameWithQuotes')
On executing this statement,…
Continue Reading AnithaEswaran’s Article on their blog
The database is in single-user mode, and a user is currently connected to it.
I had this issue when I tried to swap the databases after bacpac restore. “Could not rename the database ‘DbName’. The database is in single-user mode, and a user is currently connected to it” Given below the steps I followed to address this error SELECT request_session_id FROM sys.dm_tran_locks WHERE resource_database_id = DB_ID(‘DbNameWithQuotes’) On executing this…
Blog Syndicated with AnithaEswaran’s Permission