Let me share my experience with the FIX to SCCM Upgrade Issue because of SQL Based Replication. My name is Deb and this is my first post on this blog.
I will try to share my experience with SCCM, OSD, and Task Sequence more frequently with you all. Recently, I faced an issue during the SCCM CB in-place upgrade.
I will try to explain the issue and resolution in this post. SCCM CB upgrade from version 1802 to 1806. Normally, the SCCM upgrade process is straight forward but this time I faced multiple issues to complete the upgrade.
- FIX SCCM SQL Replication Issues Using Replication Link Analyzer
- Troubleshoot and FIX SCCM SQL Backlog Issues using SSMS
- FIX SCCM SQL Based Database Replication Failure Between CAS Primary
FIX SCCM Upgrade Issue because of SQL Based Replication
In the SCCM environment, we have an SCCM CAS server and multiple primary servers. During the SCCM CB upgrade, we found that the monitoring status was not changing for a few Primary sites and it was showing waiting.
I observed that SCCM CB upgrade status for a few hours like 4-5 hrs, but the status was unchanged on CAS console – monitoring workspace – Upgrade status. When we checked the SCCM primary site, I could see the primary site has been upgraded successfully.
But the status of the successful upgrade of the primary server was not reaching the SCCM CAS server. Because of this status issue, the SCCM upgrade was not proceeding further to the next stage.
Troubleshoot – SCCM Upgrade Issue
The first troubleshooting was to go through the console monitoring status. I checked the SCCM DB replication link status on the CAS site. SCCM SQL replication was failed between CAS and those primary sites.
I found that the SCCM DB replication link was in a failed state and that is why the primary server SCCM upgrade status was not able to reach the CAS server.
I rebooted the CAS server and SQL server to check whether there is any help with that or not, but no luck. Still, the issue was unchanged.
I started troubleshooting the SCCM upgrade issue with SCCM logs. I couldn’t find any errors in the sender.log and other logs.
I checked the logs on the CAS server like sender.log and rcmctrl.log etc. One interesting error message I found in rcmctrl.log for one of the primary servers.
Error: Failed to create drs init stored proc SMS_REPLICATION_CONFIGURATION_MONITOR 12/17/2018 1:33:06 PM 4576 (0x11E0)Error: Exception message: [Cannot drop type ‘SCCM_DRS_AlwaysOn_Server_MonitoringStatus_TYPETEMP‘ because it is being referenced by object ‘spUpsertAlwaysOn_Server_MonitoringStatus’. There may be other objects that reference this type.] SMS_REPLICATION_CONFIGURATION_MONITOR 12/17/2018 1:33:06 PM 4576 (0x11E0)Error: Could not create Drs initialization stored procedures or functions for table AlwaysOn_Server_MonitoringStatus, will retry on next cycle. SMS_REPLICATION_CONFIGURATION_MONITOR 12/17/2018 1:33:06 PM 4576 (0x11E0)
SCCM SQL Replication – SCCM Upgrade Issue
Further troubleshooting of SCCM replication was done using the following post “SQL Replication Troubleshooting Guide“.
As a next step, I tried to drop .PUB files on the CAS server rcm.box to forcefully initiate the replication of particular primary server site data. Eg: hardware_inventory_3-<primary site code>.pub.
The above step didn’t help me to resolve the SCCM upgrade issue and it’s still stuck. I raised a support case with Microsoft CSS. as I didn’t have enough time to troubleshoot because we should complete the SCCM upgrade within the change window.
Moreover, there was no mention of this issue in any of the TechNet forums so it seems to be an SCCM bug or a particular issue with our SCCM environment.
Resolution FIX – SCCM Upgrade Issue
Microsoft analyzed the SQL database, logs, and monitoring workspace of our SCCM infrastructure. Microsoft engineer found that the rcm.box folder size is also more because there are so many files are present on the rcm.box folder which was not getting removed.
Microsoft also tried to drop .PUB file and they got the same error as I mentioned above in the RCMCTRL.log file. Check out the below section to know What is this .PUB file?
Post analyzing the rcmctrl.log, MS found that the .PUB file was not able to re-initiate the sync because there was a change in the SQL database store procedure. It is changed to
How to change it back to the original stored procedure name ‘SCCM_DRS_AlwaysOn_Server_MonitoringStatus_TYPE‘?
- Open the SQL Management Studio with SQL Admin access
- Search for the stored procedure called “SCCM_DRS_AlwaysOn_Server_MonitoringStatus_TYPETEMP”
- Open the Stored Procedure and change
- ‘SCCM_DRS_AlwaysOn_Server_MonitoringStatus_TYPETEMP‘ to ‘SCCM_DRS_AlwaysOn_Server_MonitoringStatus_TYPE‘. (as you can see from the above screen capture)
Microsoft support engineer took the backup of SQL DB and changed the SCCM stored procedure name to fix the SCCM upgrade issue.
After modifying the SP, replication issues got fixed and CAS monitoring status got updated with the correct status of the primary server and the SCCM upgrade got successfully completed.
NOTE: It’s not recommended to update/modify SQL Database directly. If you see any error on SQL, then my recommendation is to raise a ticket with MS and get it fixed. Or You can try backing up SQL DB before running the following modification queries.
Result – SCCM Upgrade Issue Fixed
The above change in stored procedure helped to change the replication links active between the primary server and CAS. Once the replication link was active, the SCCM 1806 upgrade issue got fixed automatically.
What is SCCM .PUB file?
If you are an SCCM admin for several years you might know .SHA files. PUB files are similar to .SHA files. The SCCM .PUB files are helpful to manually initiate the SQL resource group replication sync without changing anything in SQL DB or without running any stored procedures like “spDrsSendSubscriptionInvalid“.
I don’t recommend using “spDrsSendSubscriptionInvalid” because this SP will initiate the re-replication between the sites and may cause a lot of Network Traffic and other issues.
Debabrata Pati has more than 7+ years of experience in IT. Skilled in MEMCM, Azure, and Powershell. More than five (5) years of experience in MEMCM (SCCM) administration, OSD, and Troubleshooting for the environment with more than 100K client devices.