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)
Cause
This error can occur when you try to configure mirroring using the Configure
Database Mirroring Security Wizard.
The endpoints are created successfully:
However, when you try to 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:
thanks for solution
ReplyDeleteGlad my post helped!
Delete