打开活动监视器 (SQL Server Management Studio)Open Activity Monitor (SQL Server Management Studio)

适用对象: yesSQL ServeryesAzure SQL 数据库noAzure SQL 数据仓库no并行数据仓库APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

活动监视器将在被监视的实例上运行查询以获取有关活动监视器显示窗格的信息。Activity Monitor runs queries on the monitored instance to obtain information for the Activity Monitor display panes. 当刷新间隔设置为小于 10 秒时,运行这些查询所用的时间可能会对服务器性能产生影响。When the refresh interval is set to less than 10 seconds, the time that is used to run these queries can affect server performance

检查你的权限!Check your permissions!

若要查看实际的活动,必须拥有 VIEW SERVER STATE 权限。To view actual activity, you must have VIEW SERVER STATE permission. 若要查看活动监视器的“数据文件 I/O”部分,除了 VIEW SERVER STATE 之外,您还必须具有 CREATE DATABASE、ALTER ANY DATABASE 或 VIEW ANY DEFINITION 权限。To view the Data File I/O section of Activity Monitor, you must have CREATE DATABASE, ALTER ANY DATABASE, or VIEW ANY DEFINITION permission in addition to VIEW SERVER STATE.

若要终止进程,用户必须是 sysadmin 或 processadmin 固定服务器角色的成员。To KILL a process, a user must be a member of the sysadmin or processadmin fixed server roles.

打开活动监视器Open Activity Monitor

键盘快捷键Keyboard shortcut

  • 键入“Ctrl+Alt+A”可随时打开活动监视器。 Type CTRL+ALT+A to open Activity Monitor at any time.

提示!Hint! 将鼠标悬停在 SSMS 中的任何图标上方可了解该图标是什么,以及哪个键盘快捷键可激活它!Hover over any icon in SSMS to learn what it is and what keyboard shortcut activates it!

工具栏Toolbar

在标准工具栏上,单击“活动监视器”图标 。From the Standard toolbar, click the Activity Monitor icon. 该图标位于中间,就在“撤消/重做”按钮的右边。It is in the middle, just to the right of the undo/redo buttons. Activity_Monitor_iconActivity_Monitor_icon

如果尚未连接到想要监视的 SQL Server 的实例,请完成“连接到服务器” 对话框。Complete the Connect to Server dialog box if you are not already connected to an instance of SQL Server you want to monitor.

在启动时启动活动监视器和对象资源管理器Launch Activity Monitor and Object Explorer on startup

  1. “工具” 菜单中,单击 “选项”From the Tools menu, click Options.

  2. 在“选项”对话框中,展开“环境”,再选择“启动”。 In the Options dialog box, expand Environment, and then select Startup.

  3. 在“启动时”下拉列表中,选择“打开对象资源管理器和活动监视器”。 From the At startup drop-down list, select Open Object Explorer and Activity Monitor.

  4. 单击“确定” 。Click OK.

期待您的反馈 :如果在本文中发现过时或不正确的内容(如步骤或代码示例),请告诉我们。We are listening: If you find something outdated or incorrect in this article, such as a step or a code example, please tell us. 可以单击此页底部的“反馈” 部分中的“本页” 按钮。You can click the This page button in the Feedback section at the bottom of this page. 我们通常在第二天阅读有关 SQL 的每项反馈。We read every item of feedback about SQL, typically the next day. 谢谢。Thanks.

open_object_explorer

设置活动监视器刷新间隔Set the Activity Monitor refresh interval

  1. 打开活动监视器。Open the Activity Monitor.

  2. 右键单击“概述” ,选择“刷新间隔” ,然后选择活动监视器获取新实例信息所用的间隔。Right-click Overview, select Refresh Interval, and then select the interval in which Activity Monitor should obtain new instance information.