Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2016 _can't start mirror

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)

like image 293
Cubone Avatar asked Jun 24 '16 07:06

Cubone


People also ask

Does SQL 2016 support mirroring?

As of February 2016, Microsoft states: “[Database Mirroring] will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Use AlwaysOn Availability Groups instead.”

How do I check if SQL Server is mirroring enabled?

To view the status of a database mirroring session After connecting to the principal server instance, in Object Explorer, click the server name to expand the server tree. Expand Databases, and select the database to be mirrored. Right-click the database, select Tasks, and then click Mirror.


1 Answers

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.

like image 165
Ramesh Avatar answered Oct 13 '22 11:10

Ramesh