Ads

27 July 2021

Alter failed for Database 'DBNAME '. (Microsoft.SqlServer.Smo), It is in the middle of a restore. (Microsoft SQL Server, Error: 927)

 First Solution 

This error will appear when we configure DB Mirroring. 

Solution 1:

Please ensure you restored the latest log backup on the mirrored server and then click on start mirroring again on principal.
 
Solution 2:
 
Set the endpoints on both mirror and principal servers by executing the below commands on each server.

On Mirror Server:
 
 ALTER DATABASE DBNAME SET PARTNER = ‘TCP://PrincipalServername.com:5022’

On Principal Server:
 
 ALTER DATABASE DBNAEM SET PARTNER = ‘TCP://MirrorServername.com:5022’