debugMinor
Cannot remove Mirroring / nor restore or delete database:Error 3456 (SQL Server 2012)
Viewed 0 times
cannoterror34562012deletesqlremovedatabasenormirroring
Problem
I have a database that was a mirrored partner and went into suspended state. (Mirror Server was shut down).
I took the principal database out of mirroring using SSMS. But now I am unable to restore the mirror database so that I can set up the mirroring again.
When I run
Error 3456 (Could not redo log record)
When I run
Is there any other way to drop this database safely? I cannot take it offline and cannot delete it for the same reasons. It seems I cannot remove mirroring on the Mirror, for some reason. Thank you
Edit:
I should probably give more background. The situation came about because I shut down the OS before stopping SQL Server & SQL Agent services. (Assuming that the OS would trigger a safe shut down of these services, like others, not wise).
This probably caused some sort of corruption which makes the DB un-editable, even to remove it from mirroring. Aside from shutting down SQL Server and moving the
I took the principal database out of mirroring using SSMS. But now I am unable to restore the mirror database so that I can set up the mirroring again.
When I run
ALTER DATABASE X SET PARTNER OFF on the mirror, SQL Server logs Error 3456 (Could not redo log record)
When I run
RESTORE on this database from a backup - SQL Server tells me I cannot because the database is involved in mirroring. Is there any other way to drop this database safely? I cannot take it offline and cannot delete it for the same reasons. It seems I cannot remove mirroring on the Mirror, for some reason. Thank you
Edit:
I should probably give more background. The situation came about because I shut down the OS before stopping SQL Server & SQL Agent services. (Assuming that the OS would trigger a safe shut down of these services, like others, not wise).
This probably caused some sort of corruption which makes the DB un-editable, even to remove it from mirroring. Aside from shutting down SQL Server and moving the
.mdf / .ldf files then restarting it - are there other options? Can I actually try editing the .ldf file to remove the offending record, or something like that?Solution
First shutting down Windows without stopping SQL Server first didn't cause this. That won't do anything bad to the database as all services are cleanly shutdown when Windows is told to turn off.
I assume that the principle is offline and can't be brought online?
Try forcing the database to come online.
That should bring the database online which should then allow you to remove mirroring and drop the database (or do whatever else you need to do with it).
I assume that the principle is offline and can't be brought online?
Try forcing the database to come online.
ALTER DATABASE X SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSSThat should bring the database online which should then allow you to remove mirroring and drop the database (or do whatever else you need to do with it).
Code Snippets
ALTER DATABASE X SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSSContext
StackExchange Database Administrators Q#33235, answer score: 3
Revisions (0)
No revisions yet.