A New Template for Joomla!


How to Restrict the Memory Usage for SQLSERVR.EXE

In Task Manager I noticed that sqlservr.exe is using a lot of RAM. Here's how to restrict it.

First you will need to figure out which instance of SQL is the problem. In Task Manager, go to View > Select Columns, and tick PID. Now you can see the PID (Process Identifier) for the SQL instance we are interested in. In my case the PID was 2388.

You can use tasklist /svc to get more information about what these processes are. If you pipe it through the "find" command you will quickly see which SQL instance has the PID we found earlier:

tasklist /svc | find "2388"


Now we use the following commands to restrict the amount of memory this instance can use.

osql -E -S YOURSERVERNAME\sbsmonitoring  [hit enter]
sp_configure 'show advanced options',1 [hit enter]
reconfigure with override  [hit enter]]
go  [hit enter]
sp_configure 'max server memory', 100 [hit enter]
reconfigure with override  [hit enter]
go  [hit enter]

Check the Task Manager again, the memory should be dropping.