简体   繁体   English

sql server 2008 express的有限memory使用?

[英]Limited memory usage of sql server 2008 express?

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.我想在具有 1 GB memory 的笔记本电脑上安装 sql server 2008 express,但我的数据库包含大量二进制数据,我不想花掉所有的 RAM。 I would much rather sacrifice sql performance (make it page) in favor of other applications.我宁愿牺牲 sql 性能(使其成为页面)来支持其他应用程序。

Is it possible to limit the memory footprint of sql server?是否可以限制 sql 服务器的 memory 占用空间?

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. 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可设置的 memory 的最小和最大数量。

From the docs for these options:从这些选项的文档中:

Minimum server memory (in MB)最小服务器 memory(以 MB 为单位)
Specifies that SQL Server should start with at least the minimum amount of allocated memory and not release memory below this value.指定 SQL 服务器应至少以分配的最小数量的 memory 开始,并且不释放低于此值的 memory。 Set this value based on the size and activity of your instance of SQL Server.根据您的 SQL 服务器实例的大小和活动设置此值。 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.始终将选项设置为合理的值,以确保操作系统不会从 SQL 服务器请求过多的 memory 并抑制 Windows 性能。

Maximum server memory (in MB)最大服务器 memory (MB)
Specifies the maximum amount of memory SQL Server can allocate when it starts and while it runs.指定 memory SQL 服务器在启动和运行时可以分配的最大数量。 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.如果您知道有多个应用程序与 SQL 服务器同时运行,并且您希望保证这些应用程序有足够的 memory 运行,则可以将此配置选项设置为特定值。 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. 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.但是,应用程序通常在启动时使用任何可用的 memory,如果需要,不需要更多。 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.如果以这种方式运行的应用程序与 SQL 服务器同时在同一台计算机上运行,则将该选项设置为一个值,以保证应用程序所需的 memory 不被 Z9778840A0101CB30C98228776 服务器分配。

I'd be surprised if these options weren't in 2008, but you could always just install it and try.如果这些选项不在2008 年,我会感到惊讶,但您总是可以安装并尝试。

look here and here这里这里

essentially sp_configure 'max server memory' I think我认为本质上是 sp_configure 'max server memory'

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: 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 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

You might also try giving cpu priority to your favored applications and letting SQL manage memory dynamically.您也可以尝试将 cpu 优先级分配给您喜欢的应用程序,并让 SQL 动态管理 memory。 It will release memory as needed by other apps, regardless of priority.它将根据其他应用程序的需要发布 memory,无论优先级如何。

Hopefully you're not trying to run visual studio on that machine.希望您没有尝试在该机器上运行 Visual Studio。 It won't be much fun.不会很有趣。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM