Migrating from Windows Internal Database (WID) to External SQL (WSUS 4 on Server 2016)

The following are the steps I used to migrate from a WSUS 4 Windows Internal Database on Server 2016 to SQL Server 2016 hosted on another Windows Server 2016 server.

First, stop the WSUS and IIS Admin services

Stop-Service -Name "IISADMIN"
Stop-Service -Name "WsusService"

Install SQL Server Management Studio

Open SSMS (Run as Administrator) and for Server Name, use \\.\pipe\Microsoft##WID\tsql\query

345235462345234

Run the query:

alter database SUSDB set single_user with rollback immediate
exec sp_detach_db 'SUSDB'

Now move the SUSDB files from C:\WINDOWS\WID\Data to the new SQL Server in “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA” and attach them with SQL Server Management Studio.

Make sure the WSUS server account is listed under Security/Logins if not create it. Map the login to the SUSDB under “User Mappings” and give it the “webService” role.

3456568467832

 

On the WSUS Server change the registry entry at “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerName” to reflect the name of the new SQL Server.

Start the services

Start-Service -Name "IISADMIN"
Start-Service -Name "WsusService"

 

The WID Database feature can now be removed from the WSUS server.

Uninstall-WindowsFeature -Name Windows-Internal-Database

 

 

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

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