Sql-server – How to safely resume a SQL Server Mirroring scheme that had a expired certificate

mirroringsql serversql-server-2012

We have a production database with a SQL Server 2012 Mirroring scheme with three machines: Principal, Mirror, Witness.

The mirroring was configured with a certificate that had only one year of expiry date. Now, the certificate is expired and the mirroring has failed. The Principal and Mirror machines are both with the database status Disconnected and the Mirror is also with "In Recovery" status.

To resume the mirror, I want to follow these tutorials: link1 and link2.

They basically suggest that I have to create new certificates and alter the Endpoint. My issue is how to safely resume the mirroring since the machines are disconnected for over a week. If I use ALTER DATABASE [mirrored_database_name] SET PARTNER RESUME, the Mirror machine will need A LOT of time to sync ALL information that was change in a week.

Will the Principal database be unavailable at this syncing or be with a bad performance? Or should I create a new mirroring session from the scratch? (i.e.: creating a new Full backup and Transaction Log backup for the Mirror machine)

Best Answer

Since Mirroring operates by shipping over a live transaction log to the secondary servers, you'll need to start a new mirroring session.

Your secondary database has been out of sync for a week and unless you've managed to maintain a transaction log on the primary that spans that entire time (hint: you haven't), you'll need to start with a fresh backup on the secondary to establish a mirror session again.

This is also faster than theoretically letting a week's worth of logs get re-applied to the secondary anyways.

As for the primary database's availability, yes it will be available during any sync (whether resuming after a pause or setting up a new mirror), because it's always sending transaction logs to the secondary but that does not interfere with it's own availability.