Migrating a WSUS Database from WID to SQL
Overviewin
-
- In this video guide, we will be covering how to migrate WSUS Database (SUSDB) from Windows Internal Database instance to SQL Server
stance.
Topics in Video
- Overview of WID limitation and why you want to move to SQL - https://youtu.be/Ms-5lzF9538?t=24
- Review WSUS configuration and how to validate if you are using WID for the SUSDB - https://youtu.be/Ms-5lzF9538?t=67
- Detach SUSDB from the WID instance - https://youtu.be/Ms-5lzF9538?t=187
- Copy WSUS database (SUSDB.mdf and SUSDB_log.ldf) from default WID install path and attach in SQL Instance - https://youtu.be/Ms-5lzF9538?t=355
- Run one-time re-indexing in SQL of the SUSDB since it likely was never done in the WID instance - https://youtu.be/Ms-5lzF9538?t=458
- Remove the WID Connectivity role service (UpdateServices-WidDB) - https://youtu.be/Ms-5lzF9538?t=603
- Install the SQL Server Connectivity role service (UpdateServices-DB) - https://youtu.be/Ms-5lzF9538?t=627
- Run WsusUtil postinstall command and reconfigure WSUS to use a SQL Server instead of WID - https://youtu.be/Ms-5lzF9538?t=658
- Validate WSUS console loads and shows the exact same data as before the move - https://youtu.be/Ms-5lzF9538?t=898
- Validate SCCM software update point sync works from WSUS - https://youtu.be/Ms-5lzF9538?t=908
Commands and Notes:
- Connect to WID instance in SQL Management Studio of sqlcmd (Server 2012 or Newer): \\.\pipe\MICROSOFT##WID\tsql\query
- Connect to WID instance in SQL Management Studio of sqlcmd (Server 2008 R2 or Older): \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query
- Powershell command to see WSUS installed role services: Get-WindowsFeature -Name UpdateServices*
- Powershell command to remove WSUS WidDB: Remove-WindowsFeature -Name UpdateServices-WidDB
- Powershell command to install WSUS SQL Database Connectivity: Install-WindowsFeature -Name UpdateServices-DB
- WsusUtil command: WsusUtil.exe postinstall SQL_INSTANCE_NAME="SCUP.CONTOSO.LOCAL" CONTENT_DIR="J:\WSUS"
- SQL_INSTANCE_NAME and CONTENT_DIR should be changed to for your environment details
Helpful Resources:
- sqlcmd Utility - /en-us/sql/tools/sqlcmd-utility?view=sql-server-2017
- Migrating the WSUS Database from WID to SQL - /en-us/windows-server/administration/windows-server-update-services/manage/wid-to-sql-migration#migrating-the-wsus-database
- Re-index the WSUS 3.0 Database - https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61