SQL Server 2012 – Quick Switch from Log Shipping to Mirroring

log-shippingmirroringsql serversql-server-2012

Need some Guidance/steps or any reference to link on how safety and quickly can I switch from Log-shipping to Mirroring as we have very small downtime to complete the activity [5-10 mins].

Also how would one ensure that the secondary LSN matches the one with primary so that mismatch might not cause a problem while setting up the mirroring as required above. Because if it does, then all the process of applying log backups will take additional time and goal above would not meet to change LS to mirror quickly.

Please suggest.

Best Answer

Below would be my steps :

  1. disable all backup and copy jobs on primary and secondary.
  2. manually run the copy and restore jobs couple of time to ensure that all the log backups are applied to secondary.
  3. remove logshipping using GUI
  4. restore database on secondary using NORECOVERY - if db is readonly or standby mode.
  5. Enable mirroring using scripts or wizard

this is your logshipping to mirroring conversion.

Make sure you take regular log backups on the principal else your log file will grow.