SQL SERVER DBA, Linux and Azure

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


TITLE: Database Properties
------------------------------
An error occurred while starting mirroring.
------------------------------
ADDITIONAL INFORMATION:

Alter failed for Database 'DBA'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=14.0.17289.0+((SSMS_Rel_17_4).181117-0805)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Database&LinkId=20476

------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

Solution:

There was a bug in SQL server management studio.. Please try to execute following stmts..


On mirror server
ALTER DATABASE DBA
   SET PARTNER = 'TCP://primaryservername.domain.com:5022'


On primary server

ALTER DATABASE DBA
   SET PARTNER = 'TCP://Mirrorservername.domain.com:5022'


Thanks




No comments:

Post a Comment