How do I change the WSUS Server to the Replica Mode??

How do I change the WSUS Server to the Replica Mode??

This is asked very frequently in WSUS Community. At this moment it is not possible to change the WSUS Server to Replica Mode. Whilst installation, there is an option to select WSUS for replica and that's it. There is no UI or an option to configure the same after installation. If you really need this feature add it to WSUS WSUS Wiki Wish List on http://www.wsuswiki.com/WishList

Published Saturday, September 10, 2005 10:22 PM by Mohammed Athif Khaleel

Comments

Thursday, October 13, 2005 7:35 PM by Mohammed Athif Khaleel

# re: How do I change the WSUS Server to the Replica Mode??

Just uninstall Windows Server Update Services (WSUS)- it'll give you the option to uninstall the database and the update files. Untick all the boxes, so you are ONLY uninstalling WSUS and not the database or the update files. Finish the uninstall then reinstall. This time don't select the Replica mode. It will remember all your settings.

Oli
Sunday, May 07, 2006 5:15 AM by Mohammed Athif Khaleel

# re: How do I change the WSUS Server to the Replica Mode??

With WSUS 3.0, you can easily move between Replica and Autonomous modes without a reinstall. Way to go!!

~PatchAholic
Monday, June 26, 2006 6:19 PM by M Frahm

# re: How do I change the WSUS Server to the Replica Mode??

I did the uninstall & reinstall thing with WSUS 2.0 SP1, but it retained its replica status even though I did not select replica.
Tuesday, July 04, 2006 12:18 PM by SpJam

# re: How do I change the WSUS Server to the Replica Mode??

Executing External Command:

%ProgramFiles%\Update Services\tools\osql\osql.exe -S -=>SQL-Server-Name<=- -E -b -n -Q "USE SUSDB exec dbo.spEnableReplica 'UpstreamServer', 80"

To return from mode Replica to mode Master it is more complex, but I have made it.

PS: osql.exe help
Tuesday, July 04, 2006 12:59 PM by SpJam

# re: How do I change the WSUS Server to the Replica Mode??

Ok...
simple script to returm to Master mode.
!on you risk!

[ %1=You SQL Server ]

rem restore values after exec spEnableReplica stored procedure
rem *******
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB UPDATE dbo.tbConfigurationA SET SyncToMU = '1' UPDATE dbo.tbConfigurationB SET AutoRefreshDeployments = '1' UPDATE dbo.tbConfigurationC SET ReplicaMode = '0' UPDATE dbo.tbConfigurationC SET AutoDeployMandatory = '1' UPDATE dbo.tbAutoDeploymentRule SET Enabled = '0'"

rem
rem add removed values in tables

%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbTargetGroupInAutoDeploymentRule(AutoDeploymentRuleID, TargetGroupID) values (1, 'A0A08746-4DBE-4a37-9ADF-9E7652C0B421')"
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbTargetGroupInAutoDeploymentRule(AutoDeploymentRuleID, TargetGroupID) values (2, 'A0A08746-4DBE-4a37-9ADF-9E7652C0B421')"
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbUpdateClassificationInAutoDeploymentRule(AutoDeploymentRuleID, UpdateClassificationID) values (1, 1)"
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbUpdateClassificationInAutoDeploymentRule(AutoDeploymentRuleID, UpdateClassificationID) values (1, 5)"
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbUpdateClassificationInAutoDeploymentRule(AutoDeploymentRuleID, UpdateClassificationID) values (2, 1)"
%ProgramFiles%\Update Services\tools\osql\osql.exe -S %1 -E -b -n -Q "USE SUSDB Insert into dbo.tbUpdateClassificationInAutoDeploymentRule(AutoDeploymentRuleID, UpdateClassificationID) values (2, 5)"
Wednesday, July 05, 2006 1:42 AM by Mohammed Athif Khaleel

# re: How do I change the WSUS Server to the Replica Mode??

Hi SPJAM,
Thanks for the script.

Athif
Wednesday, August 23, 2006 3:05 AM by WdP

# re: How do I change the WSUS Server to the Replica Mode??

This works great!!
Wednesday, August 23, 2006 9:02 PM by Tankless water heater

# Good site

This site is very interesting. Good job =)
<a href="http://tanklesswaterheater.storage9.com">Tankless water heater</a>
<a href="http://tanklesswaterheater.bht0a.info">Tankless water heater</a>
Sunday, August 27, 2006 5:24 AM by Jeorge Lukasing

# re: How do I change the WSUS Server to the Replica Mode??

Very many thanks for a good work. Nice and useful. Like it!
Thursday, September 21, 2006 1:04 PM by Alex

# re: How do I change the WSUS Server to the Replica Mode??

WOW, Thank you very much for this script!

worked like a charm :-)

Tuesday, November 07, 2006 2:42 PM by Barrey

# re: How do I change the WSUS Server to the Replica Mode??

The script worked well for us, had to place quotes around the pathname to OSQL.exe, then it worked well.

I also found that all of our WSUS installs used the default database naming, so I replaced the %1 with %COMPUTERNAME%\WSUS and now it's a clickable batchfile.

Since we had to move ~20 clients to standalone mode, this will be a huge timesaver for us.

Thanks!

-B