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.

  • Do you need your secondary replica to be available for business? Did you consider Always On Availability Group? Jan 31 '18 at 23:05
  • @SqlWorldWide no we are not using Always on as its implementation is something we are still testing Feb 1 '18 at 19:50

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.

  • thanks a lot. Also how can we confirm the LSN thing before i go ahead and set mirroring Feb 1 '18 at 19:51
  • something similiar to select last_restored_file from msdb.dbo.log_shipping_monitor_secondary where secondary_database = 'yourdb' and check your log backup folder
    – Kin Shah
    Feb 1 '18 at 21:14
  • one quick question. I thought there is a way to script out mirror config just like LS but cannot see that way. Is there a way to do this similar to LS? Feb 2 '18 at 0:28
  • No .. but there might be scripts available on internet. I personally write dynamic tsql to generate final script for mirror setup.
    – Kin Shah
    Feb 2 '18 at 0:51
  • thanks, if possible can you share on. Appreciate that Feb 2 '18 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.