Database cannot be opened. It is in the middle of a restore. (Error 927)

This post describes how to fix the error:
Database cannot be opened. It is in the middle of a restore. (Microsoft SQL Server, Error: 927)

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

Cause

This error can occur when you try to configure mirroring using the Configure Database Mirroring Security Wizard.

The endpoints are created successfully:

Configure database mirroring security wizard configuring endpoints success

However, when you try to Start Mirroring:

Database properties start mirroring

The error occurs.

Resolution

To resolve the error, I had to start mirroring in SQL directly.

I set the partner to the Principal network address on the mirror SQL instance:

ALTER DATABASE AdventureWorksLT2019 SET PARTNER='TCP://SQL2019-2K19-1.test2019.net:5022'

I then set the partner to the Mirror network address on the principal SQL instance:

ALTER DATABASE AdventureWorksLT2019 SET PARTNER='TCP://SQL2019-2K19-1.test2019.net:5023'

And set the witness to the Witness network address on the principal SQL instance:

ALTER DATABASE AdventureWorksLT2019 SET WITNESS='TCP://SQL2019-2K19-1.test2019.net:5024'

The database should now be in a mirrored / synchronized state:

Database mirrored synchronized

Comments

Post a Comment

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

LG TV turn off Quick Start in settings