Bize Ulaşın / Contact Us

How to re-index WSUS database

12 / 01 / 2012 by WSUS Yorum yok / No Comments

Monthly re-indexing of WSUS database is a recommended task to maintain its performance. You can use WsusDBMaintenance script 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’ll need to use the sqlcmd utility.

You can easily install sqlcmd util without having SQL setup media. To do this

Install MS SQL Server Native Client first
X86 Package (sqlncli.msi) – 3511 KB
X64 Package (sqlncli_x64.msi) – 6486 KB
IA64 Package (sqlncli_ia64.msi) – 8365 KB

Then install sqlcmd util to your server
X86 Package (SQLServer2005_SQLCMD.msi) – 2528 KB
X64 Package (SQLServer2005_SQLCMD_x64.msi) – 4264 KB
IA64 Package (SQLServer2005_SQLCMD_ia64.msi) – 5410 KB

Then visit to obtain WsusDBMaintenance script. You can easily use the copy code button and paste clipboard into a new text document then rename it to WsusDBMaintenance.sql

To run Re-index

Run the command below, my sqlcmd is located under (I used the installation method above)C:Program FilesMicrosoft SQL Server90Toolsbinn folder if you have already have it please use appropriate path. And I also chose C:Program FilesUpdate ServicesDatabase folder for my WsusDBMaintenance.sql file, it is completely up to you.

sqlcmd -I -S \.pipeMSSQL$MICROSOFT##SSEEsqlquery -i “C:Program FilesUpdate ServicesDatabaseWsusDBMaintenance.sql”


If you get an error when you run the command please delete and type – (minus) characters by hand.

Leave a Reply

Your email address will not be published. Required fields are marked *

Kontrol / Control * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.