Migrate from SQL to WID? How? RRS feed

  • Question

  • Hi,

    Does anyone know how to move database from SQL to WID in WSUS? I can find a lot of guides to move from WID to SQL, but not the other way around.

    I have reached the 10GB limit in SQL Express so I need to find another solution. Shrinking does not help.

    Allan Kjær

    Friday, October 27, 2017 8:58 AM

All replies

  • First, SQL Express and WID are essentially the same - except one is an added on program and the other is built into the system for easy deployment.

    Second, Have a peek at my Adamj Clean-WSUS script. It is the last WSUS Script you will ever need!


    What it does:

    1. Add WSUS Index Optimization to the database to increase the speed of many database operations in WSUS by approximately 1000-1500 times faster.
    2. Remove all Drivers from the WSUS Database (Default; Optional).
    3. Shrink your WSUSContent folder's size by declining multiple types of updates including by default any superseded updates, preview updates, expired updates, Itanium updates, and beta updates. Optional extras: Language Packs, IE7, IE8, IE9, IE10, Embedded, NonEnglishUpdates, ComputerUpdates32bit, WinXP.
    4. Remove declined updates from the WSUS Database.
    5. Clean out all the synchronization logs that have built up over time (configurable, with the default keeping the last 14 days of logs).
    6. Compress Update Revisions.
    7. Remove Obsolete Updates.
    8. Computer Object Cleanup (configurable, with the default of deleting computer objects that have not synced within 30 days).
    9. Application Pool Memory Configuration to display the current private memory limit and easily set it to any configurable amount including 0 for unlimited. This is a manual execution only.
    10. Checks to see if you have a dirty database, and if you do, fixes it. This is primarily for Server 2012 WSUS, and is a manual execution only.
    11. Run the Recommended SQL database Maintenance script on the actual SQL database.
    12. Run the Server Cleanup Wizard.

    It will email the report out to you or save it to a file, or both.

    Although the script is lengthy, it has been made to be super easy to setup and use so don't over think it. There are some prerequisites and instructions at the top of the script. After installing the prerequisites and configuring the variables for your environment (email settings only if you are accepting all the defaults), simply run:

    .\Clean-WSUS.ps1 -FirstRun

    If you wish to view or increase the Application Pool Memory Configuration, or run the Dirty Database Check, you must run it with the required switch. See Get-Help .\Clean-WSUS.ps1 -Examples

    If you're having trouble, there's also a -HelpMe option that will create a log so you can send it to me for support.


    As you're already dealing with a large database, I would run through the -QuarterlyRun after -FirstRun completes. This will actually remove declined WSUS Updates from the actual metabase.

    Third, to answer your question directly, you would load up SSMS, detach the database (figuring out where the physical files are), install WID, open SSMS as an admin, connect to the WID database named pipe string and then attach the database. You would then have to reconfigure using wsusutil to use the named pipe string as the server name the same way you would switch it to an SQL server.

    WID2008 = 'np:\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query'
    WID2012Plus = 'np:\\.\pipe\MICROSOFT##WID\tsql\query'

    Adam Marshall, MCSE: Security

    • Proposed as answer by Elton_Ji Monday, October 30, 2017 2:14 AM
    Sunday, October 29, 2017 3:14 AM
  • Hi Allan,

    Please try to use the "Clean-WSUS" script which suggested by Adamj .

    Then, check if that Database is smaller than before.\


    In addition , I didn't find an article mentioned the 10GB limitation of WID database .

    Further more , to check the limitation I'd suggest you build another WSUS server using WID , then, try to export/import method to clone the existing WSUS :


    The exported CAB file got 2GB limitation , please try to export it to .gz format :


    Hope it is useful to you .

    Best Regards,


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

    Monday, October 30, 2017 2:39 AM