Partager via


Reindex the WSUS Database

Applies To: Windows Server 2003 with SP2, Windows Server 2008 R2, Windows Server 2008 R2 with SP1, Windows Server Update Services, Windows Small Business Server 2011 Standard

We recommend that you reindex the WSUS database at least once a month.

The WsusDBMaintenance script allows you to reindex any version of the WSUS database, SQL Server or Windows Internal Database.

If you are using Windows Internal Database for the WSUS database, you need to use the sqlcmd utility. For more information about the sqlcmd utility, see sqlcmd Utility.

To use this script with Windows Internal Database, you should run the following command:

sqlcmd -S np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query -i <scriptLocation>\WsusDBMaintenance.sql

where <scriptLocation> is the directory that contains the WsusDBMaintenance script.