Cluster-Aware Updating Windows 2012R2 with SQL Server 2014 AlwaysOn availability groups #Cau #winserv #SQL

Cluster Aware Updating or CAU is a great tool for patching your cluster but there are some situations that you need to be carefully when using CAU.

Patching your SQL Clusters is no problem unless you have a Windows Server 2012 cluster with SQL Server AlwaysOn availability groups.

then you can’t use CAU the #NNFW (next next finish way) For Cluster.

Windows Server 2012 cluster with SQL Server AlwaysOn availability groups

I’ll not showing the Setup for this you can jump to my blog https://robertsmit.wordpress.com/?s=cau

but what I do show you is the basic steps for updating the Windows Server 2012 cluster with SQL Server AlwaysOn availability groups

image

Here is my SQL Cluster and it is a two node cluster ready for patching but most of the time the advanced options are skipped.

who cares about a pre and after setup I just want to install the updates.   let me show you why this is important !

image 

imageimage

My cluster is hitting the download and after this one node is set on Pause.

image

Eh pause but what about my SQL Server AlwaysOn availability group yes this is no longer working. eh the DBA guy is calling you right now Winking smile

How CAU Affects SQL Server AlwaysOn Availability Groups

Disclaimer: Microsoft does not support the use of CAU to update Windows Server 2012 clusters with SQL Server AlwaysOn availability groups. CAU is currently not aware of AlwaysOn availability groups. When CAU brings a node into maintenance mode to update the node, AlwaysOn availability groups are affected by the following known issues. Potential mitigations for these issues are provided to be transparent about our findings, and are meant for your non-production test environment only. These mitigations are not guaranteed to solve all issues. 

http://msdn.microsoft.com/en-us/library/jj907291.aspx

review the document, please download the Patching SQL Server Failover Cluster Instances with Cluster-Aware Updating (CAU)

Main reason why you must be careful :

Do not use the Failover Cluster Manager to manipulate availability groups:

 

  • Do not change any availability group properties, such as the possible owners.

  • Do not use the Failover Cluster Manager to fail over availability groups. You must use Transact-SQL or SQL Server Management Studio.

 

But what Can you do ?

first connecting to all the SQL boxes and clicking on the SQL Server AlwaysOn availability group that is a lot of work.

Connect to the server instance that hosts the replica whose database you want to suspend.

  1. Suspend the database by using the following ALTER DATABASE statement:

    ALTER DATABASE database_name SET HADR SUSPEND

Well a TSQL Script still connecting to my SQL box manually

Using PowerShell

To suspend a database

  1. Change directory to the server instance that hosts the replica whose database you want to suspend.

  2. Use the Suspend-SqlAvailabilityDatabase cmdlet to suspend the availability group.

  3. For example, the following command suspends data synchronization for the availability database MVPDB in the availability group MVPSQLAG01 

    Suspend-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MVPSQLAG01\Databases\MVPDB


To resume a secondary database

  1. Change directory to the server instance that hosts the replica whose database you want to resume. 

  2. Use the Resume-SqlAvailabilityDatabase cmdlet to resume the availability group.

  3. For example, the following command resumes data synchronization for the availability database MVPDB in the availability group MVPSQLAG01

    Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MVPSQLAG01\Databases\MVPDB

    Note

So I placed the scripts on the CSV from my Cluster 

image

 

image

 

 

Disclaimer: Microsoft does not support the use of CAU to update Windows Server 2012 clusters with SQL Server AlwaysOn availability groups. CAU is currently not aware of AlwaysOn availability groups. When CAU brings a node into maintenance mode to update the node, AlwaysOn availability groups are affected by the following known issues. Potential mitigations for these issues are provided to be transparent about our findings, and are meant for your non-production test environment only. These mitigations are not guaranteed to solve all issues. 

Greetings,

Robert Smit

https://robertsmit.wordpress.com/?s=cau

Microsoft Azure Virtual Machine Readiness Assessment #azure #cloud

Microsoft Azure Virtual Machine Readiness Assessments for Active Directory, SharePoint Server and SQL Server. Also available on Windows Azure Portal here: http://www.windowsazure.com/en-us/downloads/vm-readiness-assessment

Automated Assessment

  • This tool will provide a high level checklist and a detailed report.
  • The checklist outlines areas which are ready to move and areas which may need additional configuration or design changes.
  • The detailed report offers expert guidance and advice tailored to your environment.
Expert Advice
  • Your report shows areas that are ready to move and areas that need additional configuration or design changes.
  • Click into each area to get expert guidance and advice tailored to your specific situation.

 

The installation is real easy but I noticed that the discovery is not always working. In my case I did run this on the SQL server.

 

image

When the Installer is finished I ran the Assessment toolkit.

image

In this case I used SQL server the method is the same only the result is different.

 

imageimage

Two easy steps with some questions and basically there is no right and wrong ( I checked unsure )

 

image

Yes it is not the MAP toolkit just one server at the time.

Windows  Microsoft Assessment and Planning Toolkit

The Microsoft Assessment and Planning Toolkit makes it easy to assess your current IT infrastructure for a variety of technology migration projects. This Solution Accelerator provides a powerful inventory, assessment, and reporting tool to simplify the migration planning process.

image

after a little coffee break the scan is done and the report is ready. You can save and edit this as it is a Word file.

 

 

image

As I did the Next Next method I need some planning when I migrate this SQL server to Azure.

the report is in detail and 62 pages long. It could be handy if you don’t know anything about this server.

image

But if you want to test the migration and already running VMM and have a S2S VPN to Azure read my other blog post.

https://robertsmit.wordpress.com/2014/08/27/azure-site-recovery-service-asrs-hyper-v-to-azure-recovery-mvpbuzz/