最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

使用sp_monitor查看SQLServer统计信息

来源:动视网 责编:小采 时间:2020-11-09 11:09:30
文档

使用sp_monitor查看SQLServer统计信息

使用sp_monitor查看SQLServer统计信息:SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO,通过这些信息可以对自己的数 SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO
推荐度:
导读使用sp_monitor查看SQLServer统计信息:SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO,通过这些信息可以对自己的数 SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO


SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO,通过这些信息可以对自己的数

SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO,通过这些信息可以对自己的数据库性能状况有一个大致的了解。

下面的示例报告有关 SQL Server 繁忙程度的信息:

每个列名的解释:

列名说明

last_run

上次运行 sp_monitor 的时间。

current_run

本次运行 sp_monitor 的时间。

sp_monitor 自运行以来所经过的秒数。

cpu_busy

服务器计算机的 CPU 处理 SQL Server 工作所用的秒数。

io_busy

SQL Server 在输入和输出操作上花费的秒数。

空闲

SQL Server 已空闲的秒数。

packets_received

SQL Server 读取的输入数据包数。

packets_sent

SQL Server 已写入的输出数据包数。

packet_errors

SQL Server 在读取和写入数据包时遇到的错误数。

total_read

SQL Server 读取的次数。

total_write

SQL Server 写入的次数。

total_errors

SQL Server 在读取和写入时遇到的错误数。

connections

登录或尝试登录 SQL Server 的次数。

对于每一列,统计信息将以 number(number)-number% 或 number(number) 的格式输出。第一个number 是指重新启动 SQL Server 以来的秒数(对于cpu_busy、io_busy 和idle)或总数目(对于其他变量)。圆括号中的number 是指上次运行 sp_monitor 以来的秒数或总数目。百分比是自上次运行sp_monitor 以来的时间百分比。例如,如果报告中cpu_busy 显示为 4250(215)-68%,,则自 SQL Server 上次启动以来,CPU 工作了 4250 秒;自上次运行sp_monitor 以来,CPU 工作了 215 秒;自上次运行sp_monitor 以来占总时间的 68%。

如果需要保存数据的话可以使用下面的系统统计函数:

Table 1 System Statistical Functions

Function Description

@@CONNECTIONS The number of connections or attempted connections.

@@CPU_BUSY Timer ticks that the CPU has been working for SQL Server.

@@IDLE Time in timer ticks that SQL Server has been idle.

@@IO_BUSY Timer ticks that SQL Server has spent performing I/O operations.

@@PACKET_ERRORS Number of network packet errors that have occurred.

@@PACK_RECEIVED Number of packets read from the network.

@@PACK_SENT Number of packets written to the network.

@@TIMETICKS Number of millionths of a second in a timer tick.

@@TOTAL_ERRORS Number of read/write errors during I/O operations.

@@TOTAL_READ Number of disk reads.

@@TOTAL_WRITE Number of disk writes.

文档

使用sp_monitor查看SQLServer统计信息

使用sp_monitor查看SQLServer统计信息:SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO,通过这些信息可以对自己的数 SQL Server提供了sp_monitor存储过程可以方便我们查看SQL Server性能统计信息,包括CPU/Network/IO
推荐度:
标签: 查看 使用 sp
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top