WSUS – Limit SQL (Windows Internal Database) memory

You may discover your WSUS servers SQL instance using most of the available memory – to limit its maximum memory usage, you can either do it via command line or via gui.

Configure via GUI

  1. Open SQL Management Studio
  2. Connect to \\.\pipe\Microsoft##WID\tsql\query for WSUS 4 (Server 2012) or \\.\pipe\mssql$microsoft##ssee\sql\query for WSUS 3 using Windows Authentication
  3. Right click the server in Object Explorer and choose Properties
  4. Select Memory from the left hand side, then specify Maximum server memory (in MB) to whatever you want.
  5. Hit OK and then restart the sql service

Configure via command line

  1. Open a cmd window
  2. Enter the following command depending on version:
  3. Enter the following commands:
    exec sp_configure 'show advanced option', '1';
  4. To view currently set max server memory:
    exec sp_configure;
  5. To reconfigure:
    exec sp_configure 'max server memory', 2048;
    reconfigure with override;
  6. quit
  7. Restart the SQL service
This entry was posted in Technology and tagged , , , . Bookmark the permalink.

14 Responses to WSUS – Limit SQL (Windows Internal Database) memory

  1. TrixyB says:

    Hi Nick,

    I wanted to thank you for this info. Your information has helped me fix a new WSUS server on 2008 R2 that I only installed yesterday that was taking all the available memory, now I have limited it to 1GB for SQL.

    Thanks again,


  2. Baz says:

    Thank Nick. You also solved the issue of logging in as well.

  3. Don says:

    I had to “Run As Administrator” on SQL Server Management Studio to get this to work for me. Just FYI.

  4. Pablo says:

    How can I limit virtual memory that Windows Internal Database consumes?

  5. IngoS says:

    Great info that helped me a lot and saved me time!
    Cheers IngoS

  6. k.balu says:

    thanks, great info using oql worked for me but management studio failed opening the property window with RegQueryValueEx error 2
    Studio is started as admin, any suggestions?

    — error message —>
    A severe error occurred on the current command. The results, if any, should be discarded.
    ‘RegQueryValueEx()’ hat den Fehler ‘2’, ‘Das System kann die angegebene Datei nicht finden.’ zur├╝ckgegeben. (.Net SqlClient Data Provider)

    For help, click:

    Server Name: \.pipeMicrosoft##WIDtsqlquery
    Error Number: 0
    Severity: 11
    State: 0

    Program Location:

    at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
    at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)

  7. Ian B says:

    Is there a way to do this without installing SSMS (which in turn requires .NET 3.5, which is a pain in the rear on 2012R2)?

  8. Don says:

    Thank you! I’m running a SBS 2011 box and WSUS seems to be sucking up all the RAM. Your instructions are clear and it seems to have fixed my issue. Thank you very much, sir.

  9. Lewis says:

    Whats the least amount of memory WID can have so that WSUS still works ok?

  10. opatta says:

    I have WSUS 6.3 on WID on Server 2012R2 and 9 of 10GB of memory eaten by database. I tried commandlines as above but got “osql not recognised”. Any help ?

  11. Brian says:

    Thank you so much for this. It was so easy to fix with this ­čÖé

Leave a Reply

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