backup and restore SQL
2015-05-18 16:52
316 查看
TITLE: Microsoft SQL Server Management Studio
------------------------------
Restore failed for Server 'sacsql204'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=12.0.2000.8+((SQL14_RTM).140220-1752)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Exclusive access could not be obtained because the database is in use.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3101)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2480&EvtSrc=MSSQLServer&EvtID=3101&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
解决方案:
disconnect other users by scripts belowe:
USE master
GO
ALTER DATABASE YourDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE YourDatabaseName SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE YourDatabaseName SET MULTI_USER
GO
ALTER DATABASE YourDatabaseName SET ONLINE WITH ROLLBACK IMMEDIATE
GO
------------------------------
Restore failed for Server 'sacsql204'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=12.0.2000.8+((SQL14_RTM).140220-1752)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Exclusive access could not be obtained because the database is in use.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3101)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2480&EvtSrc=MSSQLServer&EvtID=3101&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
解决方案:
disconnect other users by scripts belowe:
USE master
GO
ALTER DATABASE YourDatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE YourDatabaseName SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE YourDatabaseName SET MULTI_USER
GO
ALTER DATABASE YourDatabaseName SET ONLINE WITH ROLLBACK IMMEDIATE
GO
相关文章推荐
- [转]Configure Network Drive Visible for SQL Server During Backup and Restore Using SSMS
- backup and restore database on Microsoft SQL Server 2005
- [SQL Server][FILESTREAM] -- How to Backup and Restore a SQL Server FILESTREAM Enabled Database
- 在MSDB中清除SQL Server 还原备份历史数据(Purging MSDB Backup and Restore History from SQL Server)
- BackupAndRestoreSmallWorks.sql
- SQL Server Database Backup and Restore in C#
- How to backup and restore database in SQL Server
- SQL Server backup and restore
- [转]SQL SERVER – Backup Timeline and Understanding of Database Restore Process in Full Recovery Model
- Howto: Backup and restore your system!
- Backup SQL Server 2008 R2 Restore on SQL 2008
- shrink log和查询数据库 backup,restore,shrink 进度 和 还原历史 的sql (for sqlserver)re
- Backup and Restore Search Service Application
- 转载:Restore SQL Server database and overwrite existing database
- Experience on Namenode backup and restore --- checkpoint
- Backup and Restore MySQL Database using mysqlhotcopy
- SQLBackupAndFTP The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "xxxx"
- win 7 backup and restore
- Transfer postgres database to another server - backup and restore
- Howto: Backup and restore your system!