SQL Server 2016 _can't start mirror

折月煮酒 提交于 2020-01-24 12:48:26

问题


After upgrading SQL Server 2014 to SQL Server 2016 (both Enterprise editions), I can't start mirror.

This works normally on SQL Server 2014.

After I restore (WITH NORECOVERY) mirror database with full and log backups of primary database I normally run configure setup.

After click on Start mirror I get this error:

Database 'DatabaseName' cannot be open. It is in the middle of a restore. (Microsoft SQL Server, Error:927)


回答1:


Issue with SQL 2016 GUI. Its worked with TSQL commands.

Mirror Server:

USE MASTER; GO ALTER DATABASE SET PARTNER = 'TCP://PrincipalServer:5022' GO

Principal server:

USE MASTER;

ALTER DATABASE SET PARTNER = 'TCP://MirrorServer:5022' GO

before executing these commands, you should have Full and log backup restore on DR with no recovery.




回答2:


I had the same error message (and was using SSMS 2016 GUI), however the problem was solved by ensuring that all three instances (principal, mirror and witness) were running as the same (windows) service account.




回答3:


I had the same problem. Turns out that some people said that it's a GUI problem. I ran the following TSQL's to solve the problem:

--On Mirror Server, execute the following TSQL:

USE MASTER;
GO
ALTER DATABASE <Database_Name> SET PARTNER = 'TCP://<Principal Server>:5022'
GO

--On Principal Server, execute the following TSQL:

USE MASTER;
GO
ALTER DATABASE <Database_Name> SET PARTNER = 'TCP://<Principal Server>:5023';
GO
ALTER DATABASE <Database_Name> SET WITNESS = 'TCP://<Principal Server>:5024';
GO

Hope it helps.



来源:https://stackoverflow.com/questions/38008208/sql-server-2016-cant-start-mirror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!