When we ran Sql Server in a virtual machine we were able to use the following sql to drop in use databases.
use master
ALTER DATABASE [TargetDatabase] set single_user with rollback immediate;
Drop database [TargetDatabase]
According to the Managed Instance Documentation and our testing set single_user
is not supported. Is there an alternative way to drop in use databases?
I would recommend doing it using powershell. That is more efficient and goes through checks
Remove-AzSqlInstanceDatabase -InstanceName '' -ResourceGroupName '' -Name '' -Verbose
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.