SQL Server 数据库还原失败,数据库在使用中(database is in use) 的解决方案
use master
alter database DB_NAME set offline with rollback immediate;
恢复数据库
设置数据库在线
use master
alter database DB_NAME set online with rollback immediate;
alter database DB_NAME set offline with rollback immediate;
恢复数据库
设置数据库在线
use master
alter database DB_NAME set online with rollback immediate;