Captools/net Documentation

SQL Memory Usage

SQL Memory Usage

Previous topic Next topic  

SQL Memory Usage

Previous topic Next topic  

If you view the Windows Task Manager Process tab you may note that your SQL Server is consuming significant amounts of memory.  In this example, about 150 Meg of memory is being used, but with lots of data, you may see well over 1 GB of memory usage.




The reason for this is that Microsoft SQL Server is designed to use as much memory as it needs to efficiently perform its functions, and is designed to only release memory if the operating system requests memory for other applications.  This behavior is further explained in the following links, which also provide tips on reclaiming SQL server memory:


Reclaiming memory from SQL Server :


SQL Server Won't Release Memory :


SQL Server Memory Options :


How to adjust memory usage by using configuration options in SQL Server :


My SQL Server isn’t releasing memory, but it’s barely doing anything. What gives? :



Probable Solutions:


1) Manually Start\Stop SQL Server

   a) After your Automatic Tasker runs and results in SQL Server taking up all the memory on the machine close all programs and run the Captools/net Server Control Panel.

   b) Under "Services" menu click the "Stop Captools/net Database" and wait for the program to come back.

   c) Then under "Services" menu click the "Start Captools/net Database" and wait for the program to come back.

   d) Now check the task manager and verify that the SQL Server process has released the memory.

   e) To further release memory used by Captools/net, under "Services" menu click the "Re-start all Captools/net Programs" and wait for the program to come back.

   Note :- You can create a simple batch file to do this stopping and starting of SQL Server and save it on your Desktop.


2) Automatically Stop\Start SQL Server

   a.) Simply configure Captools/net Tasker to run the Automatic Back-up Task which will stop and start the SQL Server.

   b.) In the Captools/net Desktop Program, under the "Home" menu click the "Schedule Tasks" item.

   c.) On this page, make sure that the Automatic Backups Tasks is enabled and has the same frequency as all the other Tasks or set it to daily.


3) Configure SQL Server to avoid consuming so much memory in the first place.

   Note that this may affect the performance of Captools/net depending on the total memory of the computer.

   a) Run SQL Server Management Studio Express (this product can be downloaded from (use the search tool on the website to find the applicable download).

   b) Login and right click in the CAPTOOLSDBINST (or other instance) instance and select "Properties".

   c) Click on the "Memory" page.

   d) Refer to the below screen shot and look for the "Maximum server memory (in MB)" setting and read this explanation:

       Maximum server memory (in MB)

       Specifies the maximum amount of memory SQL Server can allocate when it starts and while it runs. This configuration option can be set to a specific value if you

       know there are multiple applications running at the same time as SQL Server and you want to guarantee that these applications have sufficient memory to run. If these

       other applications, such as Web or e-mail servers, request memory only as needed, then do not set the option, because SQL Server will release memory to them as

       needed. However, applications often use whatever memory is available when they start and do not request more if needed. If an application that behaves in this manner

       runs on the same computer at the same time as SQL Server, set the option to a value that guarantees that the memory required by the application is not allocated by SQL


   e) Based on how many other applications are running, Set the "Maximum server memory (in MB)" to a value equal to about 50-70% of the total memory in the OS. The number of accounts in

       Captools/net and the amount of historical data also need to be considered while settings this option.