Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

@@CPU_BUSY (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

Returns the time that SQL Server has spent working since it was last started. Result is in CPU time increments, or "ticks," and is cumulative for all CPUs, so it may exceed the actual elapsed time. Multiply by @@TIMETICKS to convert to microseconds.


If the time returned in @@CPU_BUSY or @@IO_BUSY exceeds approximately 49 days of cumulative CPU time, you receive an arithmetic overflow warning. In that case, the value of @@CPU_BUSY, @@IO_BUSY and @@IDLE variables are not accurate.

Applies to: SQL Server (SQL Server 2008 through current version).

Topic link icon Transact-SQL Syntax Conventions


To display a report containing several SQL Server statistics, including CPU activity, run sp_monitor.

The following example shows returning SQL Server CPU activity as of the current date and time. To avoid arithmetic overflow when converting the value to microseconds, the example converts one of the values to the float data type.

SELECT @@CPU_BUSY * CAST(@@TIMETICKS AS float) AS 'CPU microseconds', 
   GETDATE() AS 'As of' ;

Here is the result set.

CPU microseconds As of

---------------- -----------------------

18406250 2006-12-05 17:00:50.600

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft