views:

1461

answers:

4

I want to install sql server 2008 express on my laptop that has 1 GB memory, but my database contains lots of binary data that I don't want spending all my RAM. I would much rather sacrifice sql performance (make it page) in favor of other applications.

Is it possible to limit the memory footprint of sql server?

+3  A: 

I've only got SQL Server 2005 Express, not 2008, but from SQL Server Management Studio Express, if I right-click on the root node in the tree (the server node) and select Properties, there's a "Memory" page with both minimum and maximum amounts of memory available to be set.

From the docs for these options:

Minimum server memory (in MB)
Specifies that SQL Server should start with at least the minimum amount of allocated memory and not release memory below this value. Set this value based on the size and activity of your instance of SQL Server. Always set the option to a reasonable value to ensure that the operating system does not request too much memory from SQL Server and inhibit Windows performance.

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 Server.

I'd be surprised if these options weren't in 2008, but you could always just install it and try.

Jon Skeet
+1  A: 

look here and here

essentially sp_configure 'max server memory' I think

Preet Sangha
A: 

You might also try giving cpu priority to your favored applications and letting SQL manage memory dynamically. It will release memory as needed by other apps, regardless of priority.

Hopefully you're not trying to run visual studio on that machine. It won't be much fun.

Sam
I am but I'm making up for it by running XP. Seems to be doing tolerably well.
BC
A: 

You can do it w/ osql: http://kb.hs-lab.com/content/7/113/en/how-to-limit-ram-usage-for-sql-2005-express-database.html

osql -E -S YOURSERVERNAME\PRINTLOGGER

sp_configure 'show advanced options',1

reconfigure with override

go

then

sp_configure 'max server memory',70?

reconfigure with override

go

kenyee