|
Limiting memory usage for SQL Server 2005 Express Edition |
Top Previous Next |
|
Method 1: sp_configure: Limit SQL Server memory usage Use the sp_configure system stored procedure with the max server memory option to limit the amount of memory in the buffer pool used by an instance of SQL Server or MSDE. This will prevent SQL Server from using more than the specified amount of memory, thus leaving remaining memory available to start other applications quickly. You cannot set max server memory to a value less than 4 MB. 16 MB or more is recommended especially if you are using replication. max server memory is an advanced option. You need to enable advanced options before you can use it. Run the following SQL statements from the SQL window in any database manager to limit the amount of server memory used to70 MB: Enable advanced options:
USE
master Set the maximum amount of memory to70 MB:
USE
master Display the newly set configuration:
USE
master Set 'show advanced options' back to default:
USE
master Method 2:
First, go with
your Task Manager and under View -> Select Columns check PID and
Virtual Memory Size. tasklist /svc | find "sql" You'll get something like this:
sqlservr.exe
1621
MSSQL$ACCESSCONTROL If this is true, you may limit it via Command prompt entering these commands (what you need to type is marked bold): C:>osql -E -S YOURSERVERNAME\PRINTLOGGER
1>
sp_configure 'show advanced options',1 Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.
1>
sp_configure 'max server memory',70 DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Configuration
option 'max server memory (MB)' changed from 2147483647 to
70. 1> exit
Note: Replace
YOURSERVERNAME and number 70 with values to match your
system!
The
70 MB limit here shown is just a guess, and our recommendation is
to use some value between 70 and 300, depending on your free
RAM.
|
| Converted from CHM to HTML with chm2web Standard 2.85 (unicode) |