April 25, 2012

sp_getProcessorUsage (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_getProcessorUsage()

MetaData:

   
CREATE PROCEDURE sys.sp_getProcessorUsage
AS
BEGIN

IF(DB_NAME() != 'msdb')
BEGIN
RAISERROR(14416,-1,-1)
RETURN 14416
END
IF ( HAS_PERMS_BY_NAME(null, null, 'VIEW SERVER STATE') != 1 )
BEGIN
RAISERROR(38002, -1, -1, 'View Server State')
RETURN 38002
END
SELECT sys.fn_getProcessorUsage_internal()
END

No comments:

Post a Comment

Total Pageviews