About SQL Server services consuming too much memory---limiting database memory usage

Source: Internet
Author: User
Tags server memory

Recently took over to maintain a good project, telnet to the server when the program execution special card, the use of Task Manager to view the system resource usage, monitoring for a period of time found that the CPU is small, but memory consumption is high, And then found that it is Sqlserver.exe this service occupies a large amount of memory, reached the nearly 2G server configuration 8G memory, restart the SQL service after the memory is only about 50M, but a few days later reached a near-2G memory footprint, the online search for the next optimization strategy.

1. Set up SQL Server memory allocation using the statement:

--a. Configuring Minimum Memory

--Set the minimum memory to 0MB

exec sp_configure N ' min server memory (MB) ', 16

--b. Configuring Maximum Memory

--Set the maximum memory to 256MB

exec sp_configure N ' max server memory (MB) ', 266

Execution Result:

Configuration options ' min server memory (MB) ' has changed from 14 to 16. Please run the RECONFIGURE statement to install.
Configuration options ' max server memory (MB) ' has changed from 444 to 266. Please run the RECONFIGURE statement to install.

Finally execute the following statement to install

Reconfigure with override

Execution Result:

The command was successfully completed.

System Service log:

Configuration options ' min server memory (MB) ' has changed from 14 to 16. Please run the RECONFIGURE statement to install.

Configuration options ' max server memory (MB) ' has changed from 444 to 266. Please run the RECONFIGURE statement to install.

2. Manual Operation settings

Right-click Local server--server properties--memory settings, click OK.

After the general setup, it is best to restart the SQL service.

About SQL Server services consuming too much memory---limiting database memory usage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.