locked
DB reindex on server 2012R2 RRS feed

  • Question

  • Hello

    We have installed WSUS and Server 2012R2. We would like to re-index the database. The only Microsoft document I've found on this procedure does not include Server 2012R2. Additionally any document I have found requires tools to be installed on the server that show incompatibility errors.

    Thus we cant run the "WSUSDBmaintenace" Script.

    can anyone offer advice on This

    Server:Windows 2012R2

    WSUS version: 6.3.96....

    using internal database

    Thanks

    Tuesday, April 26, 2016 6:30 PM

All replies

  • Hi Jeff,

    the WSUSDBMaintenance.sql script is equally applicable to WSUS 6.

    on both older and newer OS versions you will need to download and install the relevant SQL utilities (either sqlcmd or SSMS if you prefer the GUI).

    The connection string is slightly different for WS2012 because the WID is named slightly differently on the newer OS version.

    The details are mentioned in the Q&A on the script download page in Gallery, and are also discussed many other places on blogs etc

    https://technet.microsoft.com/en-us/library/dd939795(v=ws.10).aspx

    https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61

    https://www.hass.de/content/reindex-wsus-database-under-windows-2012


    Don [doesn't work for MSFT, and they're probably glad about that ;]

    Tuesday, April 26, 2016 9:17 PM
  • Hi Jeff in Va731,

    On WSUS 2012 R2, we may use the following method to reindex WSUS database:

    1.Download and install the following tools:

    Microsoft Command Line Utilities 11 for SQL Server:

    https://www.microsoft.com/en-us/download/details.aspx?id=36433

    ODBC driver 11 for SQL:

    https://www.microsoft.com/en-us/download/details.aspx?id=36434

    2. In CMD, direct to SQLCMD.exe path using command:

    cd C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn

    3. Cope the script and store it locally:

    https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61#content

    4. In CMD, run the following command:

    SQLCMD -E -S np:\\.\pipe\MICROSOFT##WID\tsql\query -i <script location>

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, April 27, 2016 6:15 AM
  • Hi, tried to all the steps and run the command SQLCMD -E -S np:\\.\pipe\MIC

    ROSOFT##WID\tsql\query -i D:\sqlscript\WsusDBMaintenance.sql

    Is it will show any process running etc ? How will get to know that it finished ?

    Friday, April 29, 2016 11:17 AM
  • Hi NNMRA,

    The command looks like this:

    When finish, it looks like this:

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, May 3, 2016 8:05 AM
  • Thanks. Now it looks like finished. Shall i approve and retry the updates to download ? Also please check the screenshot.

    Tuesday, May 3, 2016 9:11 AM
  • Hi NNMRAO,

    Yes, it's finished.

    Best Regards,

    Anne


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, May 4, 2016 6:10 AM
  • Hi, again facing same issue.

    Wednesday, May 4, 2016 6:45 AM
  • Still facing the same issue. Awaiting for the solution.
    Wednesday, May 18, 2016 9:15 AM
  • Am 23.05.2017 schrieb lcerni:

    Within the bat file I have this as the command

         SQLCMD -E -S np:\\.\pipe\MICROSOFT##WID\tsql\query -i C:\WSUSReIndexScript\WsusDBMaintenance.sql

    However, I am wondering since in the instructions it states 

    "

    In CMD, direct to SQLCMD.exe path using command:

    cd C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn

    "

    do I need to somehow place that directory in this line somewhere

         SQLCMD -E -S np:\\.\pipe\MICROSOFT##WID\tsql\query -i C:\WSUSReIndexScript\WsusDBMaintenance.sql

    Here is your sample:

    REM WSUSMaintanenance
    
    cd "C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn"
    SQLCMD -E -S np:\\.\pipe\MICROSOFT##WID\tsql\query -i C:\WSUSReIndexScript\WsusDBMaintenance.sql

    Winfried


    WSUS Package Publisher: http://wsuspackagepublisher.codeplex.com/
    http://technet.microsoft.com/en-us/windowsserver/bb332157.aspx
    http://www.wsuswiki.com/Home

    Tuesday, May 23, 2017 7:41 PM
  • Worked great. Thank you for the info. 

    Robert

    Thursday, July 6, 2017 6:00 PM