Jay Paloma's Tech and Music Blog

Sometimes, this writer can no longer distinguish between the two.

Posts Tagged ‘SQL Server

Often Overlooked Step when Configuring WSUS to Use SQL Server Always On

leave a comment »


Documenting this issue on my personal tech blog because I got stuck with this for the past couple of weeks.

Scenario

  • Windows Server 2016, for ConfigMgr Primary Site Server and multiple Software Update Points
  • Multiple SUPs mean multiple WSUS
  • WSUS Servers using a common SQL Server, per Microsoft best practice
  • SQL Server is running Always On AG

 

Problem

Once all the WSUS Servers are configured, and the SUSDB is added to the Availability Group, both WSUS still looks ok. But when you execute failover, one or all all of the WSUS will fail.

 

Possible Reason

When you run the postinstall of WSUS, it configures the SUSDB, and adds the required logons on the current Primary Replica. But when you add the SUSDB into the Availability Group, the logons are not created on the current Secondary Replica(s) as of that time. Therefore you have to add a logon on all SQL Server Replicas of all WSUS Servers that will use the said SUSDB.  This is an often overlooked step, as per this forum post.

I haven’t seen an official support statement for or against using WSUS in an AlwaysOn availability group.

That said, as the only way you’re going to be able to make use of an AlwaysOn (unless it’s part of a System Center deployment) is by changing the database settings found in the registry under “HKLM\SOFTWARE\Microsoft\Update Services\Server\Setup” (based on WSUS on Server 2012 R2), so I doubt it’s something they’ve seriously thought about.
In principle, the implementation steps would look like this:
1. Set up WSUS as per normal using the actual hostname of the initial SQL Server.
2. Take a back up of the WSUS database (a pre-requisite for including in the availability group).
3. Add the WSUS database to the preferred availability group.
4. Create a login for the computer account of the WSUS server on each SQL Server that is part of the AlwaysOn group (an often overlooked step until a failover actually occurs).
5. Stop the WSUS service.
6. Update the registry settings.
7. Start the WSUS service.

Referencing myself on the existing logins of the current Primary Replica, I created logins on the other Secondaries for all my WSUS Servers, and have given them public, securityadmin and sysadmin roles. My multiple WSUS worked after this step.

And when I say “works,” it means that I can open the WSUS console

  • Simultaneously on all WSUS Servers at the same time
  • After failing over to all my Always On replicas

 

Summary:

This was how I setup my multiple WSUS (assumes Always On AG is fully setup)

  1. Create WSUS1, use SQL and connect it to the AG Listener
  2. Create WSUS2, use SQL and connect it to the AG Listener
  3. Configure SUSDB for Always On requirements (Full Recovery Model, perform Full Backup)
  4. Add SUSDB to Availability Group
  5. Add all the necessary logins of all WSUS Servers on all SQL Server replicas
  6. Test
    • Connect WSUS1 and WSUS2 consoles, both should display properly
    • Failover one by one to all SQL Replicas, both WSUS consoles should still  display properly

Hope this helps!

jay paloma  |  10 sep 2017  |  singapore

Advertisements

Written by jpaloma

September 10, 2017 at 11:57 AM

SCCM 1606 SQL Server Views Documentation

leave a comment »


If you are working on SCCM custom reports, you may have wished that there should be a reference out that you could use as reference to navigate through the countless database views available in SQL Server for SCCM. There is in fact such a reference, published by Microsoft last November 2016

Download the SCCM ConfigMgr SQL Views reference from here: https://gallery.technet.microsoft.com/SCCM-Configmgr-2012-R2-SQL-5fefdd3b

Other useful references

jay paloma  |  26 mar 2017  |  singapore

Written by jpaloma

March 26, 2017 at 6:56 PM