Fix Suspended Database steps,and reset mirroring
2016-12-09 16:15
330 查看
-- RemovemirroringALTER DATABASE token SET PARTNER off -- dropdatabase on secondarydrop DATABASE token --disable job on primaryUSE msdb;GO EXECdbo.sp_update_job @job_name = N'LSBak_token', @enabled = 0;GO -- backup database on primary and copy to secondaryBackup database token TODISK='c:\MSSQL\DATA\token.bak' Backup log token TO DISK='c:\MSSQL\DATA\token_log.bak' --restore database on secondaryrestore database token from DISK='c:\MSSQL\DATA\token.bak'with norecovery restorel og token from DISK='c:\MSSQL\DATA\token_log.bak'with norecovery -- setmirroring on secondaryALTER DATABASE token SET PARTNER = 'TCP://CPCWRBISQLATP03:5022' -- setmirroring on primaryALTER DATABASE token SET PARTNER = 'TCP://CPCWRBISQLATS03:5022' -- enablejob on primaryUSE msdb;GO EXECdbo.sp_update_job @job_name = N'LSBak_token', @enabled = 1;GO Q:Msg 3101,Level 16, State 1, Line 1Exclusiveaccess could not be obtained because the database is in use.Msg 3013,Level 16, State 1, Line 1BACKUP LOG is terminating abnormally. A:checkthe session for databasename, and kill it. try again.sp_who2kill 55
相关文章推荐
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Database 11g: Quick Steps to Package and Send Critical Error Diagnostic Information to Support
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Database 11g: Quick Steps to Package and Send Critical Error Diagnostic Information to Support
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Top 10 steps to optimize data access in SQL Server: Part V (Optimize database files and apply partitioning)
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- Steps To Migrate-Move a Database From Non-ASM to ASM And Vice-Versa
- SQL Server Database Mirroring - Creating and using Mirror Endpoints in Principal, Mirror and Witness
- VCM tips: jar deployment path/install default user name and password/Oracle database schema clean/VPD file clean
- sqlmap.py Database injection and hak
- Android热更新之AndFix就是个大坑
- 和android热修复AndFix技术亲密接触
- 关于android studio错误:gradle project sync failed.please fix your project and try again的解决方案
- 5.Error running All Tests: Gradle project sync failed. Please fix your project and try again. 怎样解决?