SQL Server Articles

Submit Article
Home » Articles » SQL Server » System Statistical Functions RSS Feeds

@@CPU_BUSY - CPU_BUSY Function

Posted By: Sarita Patel     Category: SQL Server     Views: 1788

This article explains about @@CPU_BUSY function in sql server with examples.

@@CPU_BUSY function returns the time based on the resolution of the system timer in milliseconds that the CPU has spent working since SQL Server was last started.

Syntax of @@CPU_BUSY Function :


Return type of @@CPU_BUSY function is an integer.

Examples of @@CPU_BUSY Function :

Example 1 : Use of @@CPU_BUSY function in select clause 

SELECT CONVERT(VARCHAR(10),@@CPU_BUSY) + ' ms spent for sql server since last started on ' + CONVERT(VARCHAR(50),getdate())

18 ms spent for sql server since last started on Aug 26 2010  9:33AM

Above example returns 18 means 18 milliseconds are spent.

Didn't find what you were looking for? Find more on @@CPU_BUSY - CPU_BUSY Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of @@CPU_BUSY - CPU_BUSY Function is from United States.
View All Articles

Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

No Comment Found, Be the First to post comment!