Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am running Windows update on my SQL Servers (which are in a Principal-Mirror partnership, in High Safety mode).

I am starting with updating the mirror and I was wondering, to increase safety, should I pause mirroring and stop SQL Server Services and then run Windows Update? Or is this totally unnecessary?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Suggest you to PAUSE mirroring and then patch the windows.

Ideally, I would follow below approach :

  • If you have a witness configured, turned it OFF as during the patching, if sql server service is restarted or the server reboots, then a witness will initiate a failover.

    ALTER DATABASE [db_name] SET WITNESS OFF
    
    • Always patch the current mirrored server, so if things go wrong, then you atleast have your principal ON.

      • Reboot the mirror server (if necessary)
    • Now failover to the newly patched mirror server. Run below T-SQL on the current Principal server ALTER DATABASE [your database] SET PARTNER FAILOVER

    • Once the failover is completed, patch the current mirror (which was originally primcipal)

      • Reboot if necessary
    • Now failback to the original principal server.

    • Add back the witness (if removed from step 1)

      ALTER DATABASE [db_name] SET WITNESS = 'TCP://[FQDN]:[port_number]'

    • As a saftey measure, run DBCC CHECKDB on your databases.

From BOL :

enter image description here

share|improve this answer
    
I thought if Witness and Mirror are unavailable, Principal will refuse all transactions? –  Dina Feb 5 at 20:58
    
@Dina that is not true. Why would Principal refuse connections ? Readup on database mirroring to avoid any confusion. –  Kin Feb 5 at 21:03
    
Right, I'm confusing myself with this scenario: sqlblog.com/blogs/tibor_karaszi/archive/2010/04/16/… –  Dina Feb 5 at 21:09
    
@Dina Good point and I can see why the confusion happens. The scenario that the article describes is called split-brain scenario. Also, if you see my answer, I have explicitly told to turn-off the witness. HTH. –  Kin Feb 5 at 21:16

Normally if the updates are SQL based (and certain conditions are met), the program will handle the stopping/starting of related services.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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