Disable/Enable replication for replica DB when updating ConfigMgr


When installing any ConfigMgr update, and you are running replica Management Points, then you need to disable the replication between the site database and replica DB’s before installing the update.

The Microsoft documentation mentions this but glosses over the subject with no real guidance on how this is achieved.

https://docs.microsoft.com/en-us/sccm/core/servers/deploy/configure/database-replicas-for-management-points

‘Upgrades to System Center Configuration Manager: Before you upgrade a site from System Center 2012 Configuration Manager to System Center Configuration Manager, you must disable database replicas for management points. After your site upgrades, you can reconfigure the database replicas for management points.’

The following blog post takes you though the process from start to finish.

Disabling replication

Open up SQL Management Studio on the site database server . Connect to the Database Engine and then navigate to the Replication node in the Object Explorer. Right click and select ‘Disable Publishing and Distribution’.

disablempr-001

Click Next

DisableMPR-002.jpg

 

Select ‘Yes, disable publishing on this server’. Click Next.

DisableMPR-003.jpg

 

Click Next to confirm.

DisableMPR-004.jpg

Click Next

DisableMPR-005.jpg

Click Finish.

DisableMPR-006.jpg

When complete, no publications will exist. At this point you can update or hotfix the ConfigMgr site.

DisableMPR-007.jpg

 

Re-enable replication

When the site update has completed, then it is time to add the publication back to the ConfigMgr site database and re-subscribe the replica DB’s.

On the site database server open up SQL Management Studio and execute the following SP.

Use CM_<SITECODE>

Go

exec spCreateMPreplicaPublication

DisableMPR-010.jpg

DisableMPR-011.jpg

The SQL publication will be re-created.

DisableMPR-012.jpg

Connect to the database engine on a replica DB server and navigate to the Replication>Local Subscriptions node. Right click and ‘Delete’ the existing subscription.

DisableMPR-DropSub.jpg

After the subscription is removed right click and choose ‘New Subscriptions’

DisableMPR-013.jpg

The New Subscription Wizard will appear. Click Next.

DisableMPR-014.jpg

Click <Find SQL Server Publisher> from the Publisher drop down.

DisableMPR-015.jpg

Connect to the site database server when prompted. The publication will appear. Click Next.

DisableMPR-016.jpg

Click Next

DisableMPR-017.jpg

Select replica DB as the subscription DB. Click Next.

DisableMPR-018.jpg

Click the dots …

DisableMPR-019.jpg

Select to ‘Run under the SQL Service Agent service account’. Click OK then click Next.

DisableMPR-020.jpg

Select an appropriate Agent Schedule. I have set ‘Run continuously. Click Next.

DisableMPR-021.jpg

Choose ‘At first synchronisation’ and click Next.

DisableMPR-022.jpg

Click Next

DisableMPR-023.jpg

Click Finish to complete the subscription set-up.

DisableMPR-024.jpg

The subscription will be created. Repeat for all replica DB’s that you have in your environment.

DisableMPR-025.jpg

DisableMPR-026.jpg

 

4 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s