在sql server中一些有用的的系统储存过程

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