You need to run Perfmon (start->control panel->administrative tools->performance). The counters you want, I believe, are in SQL Server:Memory Manager. Target Server Memory is how much it's allowed to take if needed, Total Server Memory is how much it's currently using. If you click on Explain it'll pop open a box with the details.
By default it's uncapped, and should use all but a couple gb of memory (it leaves that for the OS). However, there are various bugs and memory leaks that can cause it to go into paging.
与您的问题相关,如果您在共享环境中使用 SQL Server 可以访问的 RAM 量,您可能需要考虑限制 SQL Server 可以访问的 RAM 量,即在不仅仅托管 SQL Server 的服务器上:“
开始”>“所有程序> Microsoft SQL Server 2005:SQL Server Management Studio。
使用任何具有管理员权限的帐户进行连接。
右键单击数据库>特性。
从左窗格中选择“内存”,然后将“服务器内存选项”更改为您认为应该分配给 SQL Server 的任何内容。
这将有助于减少 SQL Server 消耗所有服务器 RAM 的情况。
Related to your question, you may want to consider limiting the amount of RAM SQL Server has access to if you are using it in a shared environment, i.e., on a server that hosts more than just SQL Server:
Start > All Programs > Microsoft SQL Server 2005: SQL Server Management Studio.
Connect using whatever account has admin rights.
Right click on the database > Properties.
Select "Memory" from the left pane and then change the "Server memory options" to whatever you feel should be allocated to SQL Server.
This will help alleviate SQL Server from consuming all the server's RAM.
The simplest way to see ram usage if you have RDP access / console access would be just launch task manager - click processes - show processes from all users, sort by RAM - This will give you SQL's usage.
As was mentioned above, to decrease the size (which will take effect immediately, no restart required) launch sql management studio, click the server, properties - memory and decrease the max. There's no exactly perfect number, but make sure the server has ram free for other tasks.
The answers about perfmon are correct and should be used, but they aren't as obvious a method as task manager IMHO.
进入 Management Studio 并运行 sp_helpdb,它将提供指定数据库的详细磁盘使用情况。在不带任何参数值的情况下运行它将列出实例中所有数据库的高级信息。
Go to management studio and run sp_helpdb <db_name>, it will give detailed disk usage for the specified database. Running it without any parameter values will list high level information for all databases in the instance.
发布评论
评论(6)
您需要运行Perfmon(开始->控制面板->管理工具->性能)。我相信您想要的计数器位于 SQL Server:Memory Manager 中。目标服务器内存是在需要时允许使用的内存量,总服务器内存是当前使用的内存量。如果您单击“解释”,它将弹出一个包含详细信息的框。
默认情况下,它是无上限的,并且应该使用除了几 GB 内存之外的所有内存(它将内存留给操作系统)。然而,有各种错误和内存泄漏可能导致它进入分页状态。
You need to run Perfmon (start->control panel->administrative tools->performance). The counters you want, I believe, are in SQL Server:Memory Manager. Target Server Memory is how much it's allowed to take if needed, Total Server Memory is how much it's currently using. If you click on Explain it'll pop open a box with the details.
By default it's uncapped, and should use all but a couple gb of memory (it leaves that for the OS). However, there are various bugs and memory leaks that can cause it to go into paging.
与您的问题相关,如果您在共享环境中使用 SQL Server 可以访问的 RAM 量,您可能需要考虑限制 SQL Server 可以访问的 RAM 量,即在不仅仅托管 SQL Server 的服务器上:“
这将有助于减少 SQL Server 消耗所有服务器 RAM 的情况。
Related to your question, you may want to consider limiting the amount of RAM SQL Server has access to if you are using it in a shared environment, i.e., on a server that hosts more than just SQL Server:
This will help alleviate SQL Server from consuming all the server's RAM.
请注意,服务器总内存并不是 SQL Server 当前使用的内存量。
参考微软这篇文章:
http://msdn.microsoft.com/en-us/library/ms190924.aspx
Be aware that Total Server Memory is NOT how much memory SQL Server is currently using.
refer to this Microsoft article:
http://msdn.microsoft.com/en-us/library/ms190924.aspx
如果您具有 RDP 访问权限/控制台访问权限,查看 RAM 使用情况的最简单方法就是启动任务管理器 - 单击进程 - 显示所有用户的进程,按 RAM 排序 - 这将为您提供 SQL 的使用情况。
如上所述,要减小大小(将立即生效,无需重新启动)启动 sql management studio,单击服务器、属性 - 内存并减小最大值。没有确切的完美数字,但请确保服务器有空闲的内存用于其他任务。
关于 perfmon 的答案是正确的并且应该使用,但它们并不像任务管理器恕我直言那样明显。
The simplest way to see ram usage if you have RDP access / console access would be just launch task manager - click processes - show processes from all users, sort by RAM - This will give you SQL's usage.
As was mentioned above, to decrease the size (which will take effect immediately, no restart required) launch sql management studio, click the server, properties - memory and decrease the max. There's no exactly perfect number, but make sure the server has ram free for other tasks.
The answers about perfmon are correct and should be used, but they aren't as obvious a method as task manager IMHO.
进入 Management Studio 并运行
sp_helpdb
,它将提供指定数据库的详细磁盘使用情况。在不带任何参数值的情况下运行它将列出实例中所有数据库的高级信息。Go to management studio and run
sp_helpdb <db_name>
, it will give detailed disk usage for the specified database. Running it without any parameter values will list high level information for all databases in the instance.