在sql server中一些有用的的系统储存过程
2009-02-27 16:46
190 查看
To view the current server activity
USE master
EXEC sp_who
To view the data space information for a database
USE examsysdb
EXEC sp_spaceused 'TB_PagePersistenceInfo'
To view the log space information for a database
use master
select * from sysperfinfo
To view general statistics about SQL Server activity and usage
USE master
EXEC sp_monitor
For each column, the statistic is printed in the form number(number)-number% or number(number). The first number refers to the number of seconds (for cpu_busy, io_busy, and idle) or the total number (for the other variables) since SQL Server was restarted. The number in parentheses refers to the number of seconds or total number since the last time sp_monitor was run. The percentage is the percentage of time since sp_monitor was last run. For example, if the report shows cpu_busy as 4250(215)-68%, the CPU has been busy 4250 seconds since SQL Server was last started up, 215 seconds since sp_monitor was last run, and 68 percent of the total time since sp_monitor was last run.
Reports the account, the type of account, the privilege level of the account, the mapped login name of the account, and the permission path by which an account has access to Microsoft® SQL Server™.
USE master
exec xp_logininfo
USE master
EXEC sp_who
To view the data space information for a database
USE examsysdb
EXEC sp_spaceused 'TB_PagePersistenceInfo'
To view the log space information for a database
use master
select * from sysperfinfo
To view general statistics about SQL Server activity and usage
USE master
EXEC sp_monitor
For each column, the statistic is printed in the form number(number)-number% or number(number). The first number refers to the number of seconds (for cpu_busy, io_busy, and idle) or the total number (for the other variables) since SQL Server was restarted. The number in parentheses refers to the number of seconds or total number since the last time sp_monitor was run. The percentage is the percentage of time since sp_monitor was last run. For example, if the report shows cpu_busy as 4250(215)-68%, the CPU has been busy 4250 seconds since SQL Server was last started up, 215 seconds since sp_monitor was last run, and 68 percent of the total time since sp_monitor was last run.
Reports the account, the type of account, the privilege level of the account, the mapped login name of the account, and the permission path by which an account has access to Microsoft® SQL Server™.
USE master
exec xp_logininfo
相关文章推荐
- 一些有用的系统存储过程及用法
- 一些有用的系统存储过程及用法
- 一些有用的系统存储过程.
- SQL server 系统储存过程在VB中的应用
- 一些有用的系统存储过程及用法
- 常见问题及解决办法 整理之5(一些有用的系统存储过程及用法)
- SQL Server 2005中几个有用的系统存储过程,系统表,系统函数
- SQL Server 2005中几个有用的系统存储过程,系统表,系统函数
- SQL Server一些有用的语句
- SQL Server常用的系统存储过程应用实例
- XP系统安装SQL Server 2005开发版具体过程与注意问题 收藏
- 通过系统存储过程手动执行SQL Server中的Job
- sql server系统存储过程及安全配置
- SQL Server 阻止了对组件 'Ole Automation Procedures' 的 过程'sys.sp_OACreate' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configur
- SQL SERVER 判断是否存在并删除某个数据库、表、视图、触发器、储存过程、函数
- 在做进销存系统的过程中经常遇到获取时间查询的一些总结
- [原创] 自己定义一些有用的系统右键菜单项
- 学习《JSP项目开发全程实录》中的企业人力资源管理系统(spring1.2+sturts1.2+hibernate3.0)的一些过程总结之管理员登录ACTION的实现
- SQL Server 2005/2008 系统视图和系统存储过程DDL语句
- Sql Server 常用系统存储过程大全