SQL Memory Leak

From FactotumNW Wiki

Jump to: navigation, search

To view the memory on your server, copy the following commands to a text file (eg. c:\checkmemory.sql): code:

USE master

EXEC sp_configure 'show advanced options', 1

RECONFIGURE WITH OVERRIDE

USE master

EXEC sp_configure 'max server memory (MB)'

USE master

EXEC sp_configure 'show advanced options', 0

RECONFIGURE WITH OVERRIDE



You can now check the 'max server memory' setting on your server by running the following from a command prompt on the server: code:

osql -E -S %computername%\MSFW -i c:\checksqlmemory.sql



To change the max memory size, use a script similar to the following (this sets it to 256Mb): code:

USE master

EXEC sp_configure 'show advanced options', 1

RECONFIGURE WITH OVERRIDE

USE master

EXEC sp_configure 'max server memory (MB)', 256

RECONFIGURE WITH OVERRIDE

USE master

EXEC sp_configure 'show advanced options', 0

RECONFIGURE WITH OVERRIDE



Again, save that to a text file (eg 'c:\setservermemory.sql') and run it with the command: code:

osql -E -S %computername%\MSFW -i c:\setchecksqlmemory.sql



from <http://www.mcse.ms/archive99-2005-5-1598572.html>

Personal tools