How To Migrate a WSUS Database

If you have a WSUS server, whether the database is locally stored or located on a separate backend server, at some point you may be in the situation where you have to move the database to another machine. I found it difficult finding much in the way of documentation on this process, so I’ll describe it here.

In my case, I was doing a side by side migration from SQL Server 2000 to SQL 2005. While I found plenty of articles detailing the requirements for moving WSUS as a whole, I couldn’t find much on the process for moving just the database. I finally came across an article on TechNet that covered the steps pretty well, but was extremely detailed for what turned out to be a few fairly simple steps (though I still recommend checking out the article).

1) The first requirement is to install the WSUS backend server components on your new SQL Server. This is done by running the WSUS installation program with the /b switch: “wsussetup.exe /b”. In addition to the components, this will install a new SUSDB database on the server and add a WSUS Administrators local group. Add the computer account for your WSUS server to this group.

2) The next step is to copy your existing database to the new server using whatever method suits, overwriting the one just created by the WSUS setup program. I used the Copy Database Wizard, but a detach/attach or backup/restore would work as well. If your existing WSUS server DB is running locally on MSDE, this step is a bit more difficult, as you’ll have to export/import the data as described here.

3) Next you’ll need to stop the World Wide Web and Update Services on your WSUS box. You then edit the following registry key to reflect your new database server name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SQLServerName.

One final check, if you are moving from MSDE to a remote database, the following key needs to be changed from 1 to 0: HKLM\Software\Microsoft\Update Services\Server\Setup\WmsdeInstalled.

4) That’s it, restart your WWW and Update Services on WSUS, and the migration should be complete. As always, make sure you have good backups before attempting these steps. It also would be a good idea to leave a copy of the SUSDB on the original server for fall-back purposes should there be problems.

Advertisements

One Response

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: