In this article I will demonstrate how to migrate an existing WSUS 3.0 SP1 server from a local SQL Express instance to a remote SQL Server 2005 Database Services instance.

Firstly be aware of these limitations when deploying WSUS with a remote SQL Server instance.

1. Download and install the SQLCmd tool on the WSUS server.

2. Install SQL Server 2005 "Client Tools Only" on the WSUS server so that you have access to the SQL Management Studio console.

3. Stop the IISAdmin and Update Services services in Computer Management.  Note the other services that IISAdmin will stop, usually the World Wide Web service and the HTTP SSL service.

4. Use SQLCmd to detach the SUSDB.

C:\>sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

1> use master
2> alter database SUSDB set single_user with rollback immediate
3> go

Changed database context to 'master'
Nonqualified transactions are being rolled back. Estimated rollback completion
100%
1> sp_detach_db 'SUSDB'
2> go
1> exit

5. Copy the SUSDB.mdf and SUSDB_Log.ldf files from the WSUS server to the remote SQL server.  Place them in the default locations for MDF and LDF files on the SQL server.

6. Attach the SUSDB to the remote SQL server.

wsusmove04

wsusmove05

7. Grant the WSUS server computer account permissions to the SUSDB on the remote SQL server.

8. Configure the WSUS server to use the remote SQL server for SUSDB by modifying the HKLM\Software\Microsoft\Update Services\Server\Setup\SQLServerName registry key.

wsusmove06

9. Start the IISAdmin, World Wide Web Publishing Service, HTTP SSL, and Update Services services.  Or you can just reboot the server.

10. Launch the WSUS administration console to verify the WSUS server is connecting to the database successfully.  If WSUS is not working properly double-check the services in the previous step or try restarting the server.  You can also review the Application event log for WSUS errors.

2 Responses to “How to migrate WSUS 3.0 from SQL Express to a remote SQL Server”

  1. Philip Smth Says:

    This is so helpful - but would you clarify point 7 please? I believe I’m failing in this step (and I’m not an SQL guy…).

    I’m trying to add a computer account to the security\logins group in SQL 2005 SP2, but I can only add user, group, or built-in security principal, no computer.

  2. Paul Says:

    Hi Philip, you can create a login for a computer account by typing the computer name into the “Login name” field directly, instead of searching for it.

    So for example, to add a login for the computer account WSUSSERVER in the domain LAB, you would type LAB\WSUSSERVER$ into the “Login name” field.

    Hope that helps.

Leave a Reply