Can't delete database snapshot SQL Server, Error: 946
Can't delete database snapshot SQL Server, Error: 946
我需要使用 SQL Server 2014 删除数据库的快照(以便删除数据库本身)。当我尝试删除数据库时...
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'xxx'
GO
USE [master]
GO
DROP DATABASE [xxx]
GO
我收到以下错误...
Drop failed for Database 'xxx'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot open database 'xxx' version 706. Upgrade the database to the latest version. (Microsoft SQL Server, Error: 946)
https://drive.google.com/file/d/0B3S2sioQNnAwSEs1RmN6UDJ2N0U/view?usp=sharing
这可能是需要关闭连接的结果吗?
我找到了解决这个问题的方法。我只需要执行以下语句。
ALTER DATABASE [Your DB Here] SET OFFLINE
Drop database [Your DB snapshot here]
我需要使用 SQL Server 2014 删除数据库的快照(以便删除数据库本身)。当我尝试删除数据库时...
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'xxx'
GO
USE [master]
GO
DROP DATABASE [xxx]
GO
我收到以下错误...
Drop failed for Database 'xxx'. (Microsoft.SqlServer.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot open database 'xxx' version 706. Upgrade the database to the latest version. (Microsoft SQL Server, Error: 946)
https://drive.google.com/file/d/0B3S2sioQNnAwSEs1RmN6UDJ2N0U/view?usp=sharing
这可能是需要关闭连接的结果吗?
我找到了解决这个问题的方法。我只需要执行以下语句。
ALTER DATABASE [Your DB Here] SET OFFLINE
Drop database [Your DB snapshot here]