Overview
Maintenance of the Windows Server Update Services (WSUS) is periodically required for optimal performance. This includes:
- Regular upkeep to prevent patch failures and timeouts (e.g., exit code 340).
- Troubleshooting when encountering errors such as:
Often, these issues are caused by the WSUS configuration or insufficient maintenance. Below are both basic and advanced steps to keep WSUS running smoothly.
Basic Maintenance Operations on WSUS
Check if there is sufficient disk space, CPU consumption, Memory leak, connectivity checks and usual IT concerns, and verify the WSUS specifications match our specifications in Hardware and Software Specifications
Run run the WSUS Server Cleanup
From the Administration Console, click Options and then click Server Cleanup Wizard.
The first step in the wizard will be to select the options you would like to clean.
Once the cleaning process is completed, click on the Finish button to close the wizard. In the summary, you will find the free space details.
Note: we recommend scheduling this with the below automated script
https://www.powershellgallery.
Optional Advanced: Reindexing the database (relevant only for large WSUS deployments with performance issues)
The performance of large WSUS deployments will degrade over time if the WSUS database isn't maintained properly. The SQL script in this article can be run by SQL Server administrators to reindex and defragment WSUS databases. It shouldn't be used on WSUS 2.0 databases.
This script does basic maintenance tasks on SUSDB:
- Identifies indexes that are fragmented, and defragments them. For certain tables, a fill factor is set to improve insert performance.
- Updates potentially out-of-date table statistics.
Please download the following script to continue Maintenance Tasks on SUSDB.sql
1. Download and Start Microsoft SQL Server Management Studio and connect to the base instance where the WSUS database is running.
Note: If you are using the Windows internal database, you must install Microsoft SQL Server Management Studio on the WSUS server and use as server name : \\.\pipe\Microsoft##WID\tsql\query
using Windows authentication.
2. Right-click on SUSDB and click on New Query.
3. Paste the script into the query box and click on Execute.
Wait while the request is being processed. Once the query is executed, the result is displayed under the messages tab
Note: You can first check if indexes already exist before creating them.
Please download the following modified script Query-Maintenance-on-SUSDB.sql
Reduce the size of the base
Always from SSMS, right-click on the database SUSDB then go to Tasks -> Shrink 3 and click on Database.
Click OK to start the database reduction.
Once optimization is complete, the window closes automatically.
Comments
0 comments
Please sign in to leave a comment.