您的位置:首页 > 数据库

SQL Server的一些系统变量

2010-04-27 15:09 169 查看
SQL Server的一些系统变量

sp_configure 'min server memory' --服务器最小内存gosp_configure 'max server memory' --服务器最大内存'gosp_configure 'index create memory'--创建索引占用的内存go--sp_configure 'min  memory per query'--每次查询占用的最小内存
--获取磁盘读写情况select  @@total_read as '读取磁盘的次数',  @@total_write as '写入磁盘的次数',--  @@total_error as '磁盘写入错误数',  getdate() as '当前时间'
--获取I/O工作情况select --  @@id_busy,--SQL自上次启动以来的用于执行输入和输出操作的时间  @@timeticks, --每个时钟周期对应的微秒数--  @@id_busy*@@timeticks as 'I/O 操作毫秒数',  getdate() as '当前时间'
--查看SQL SEVER CPU活动,工作情况select  @@cpu_busy,--自上次启动以来的工作时间  @@timeticks, --每个时钟周期对应的微秒数   @@cpu_busy*cast(@@timeticks as float)/1000 as 'cpu工作时间(秒)',--  @@idie*cast(@@timeticks as float)/1000 as 'CPU空闲时间(秒)'  getdate() as '当前时间'

--获取网络数据包统计信息select  getdate() as '当前时间',  @@pack_received as'输入数据包数量',  @@pack_sent as '输出数据包数量'--,--  @@packet_error as '错误包数量'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: