Welcome -
Guest!
Login
/
Register Now
|
Search:
Home
Articles
Forum
Interview FAQ
Activities
News
Videos
Poll
Links
People
Groups
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:
2051
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 :
@@CPU_BUSY
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())
Output
18 ms spent for sql server since last started on Aug 26 2010 9:33AM
Above example returns 18 means 18 milliseconds are spent.
Share:
Previous Post:
@@PACK_RECEIVED - PACK_RECEIVED Function
Next Post:
@@PACK_SENT - PACK_SENT Function
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
author of @@CPU_BUSY - CPU_BUSY Function is from
United States
.
View All Articles
Related Articles and Code:
Program of nesting member functions, private member functions and array of objects
Example 4 of using function and local variables in functions
Program to read numbers from two files using fscanf function and write it in another file using fprintf function in ascending order
Program which creates an Array of character. Make one function with one argument as a character and that function throw a user defined exception
Write a function to perform string operation i.e. split, join, length, substring using pointer without using any string function
FUNCTION XSTRCHR() WHICH SCANS A STRING FROM START TO END IN SEARCH OF A CHARACTER
Program to concatenate of two strings without using strcat function
Program to copy one string s2 to another string s1 using strcopy function from string.h
Program to copy one string s2 to another string s1 without using strcopy function
Display student details born in year 1980 to 1982 using to_char() function
Program to read string using gets() function and display in upper case
User Defined Functions
Function
String functions
To show the use of stack in function calls
Write a query to add days in todays date using sysdate function
Write a query to add and subtract months using add_months function
Write a query to change the format of date using to_char function
Write a query to change the case of strings using lower and upper function
NUMERIC FUNCTIONS
Other Interesting Articles in SQL Server:
HAS_DBACCESS Function
UPPER Function
COS Function
ASIN Function
@@SPID - SPID Function
IS_MEMBER Function
Between Operator
CHECKSUM_AGG Function
DIFFERENCE Function
VAR Function
@@TOTAL_ERRORS - TOTAL_ERRORS Function
GETUTCDATE Function
INDEX_COL Function
USER_NAME Function
Operators Allowed in the WHERE Clause with examples
ANY / SOME Logical Operator
CURSOR_STATUS Function
IDENT_INCR Function
NEWID Function
NULLIF Function
Please enter your Comment
*
*
Comment should be atleast 30 Characters.
Please put code inside [Code] your code [/Code].
Please login to post comment
No Comment Found, Be the First to post comment!
SQL Server
View All
Aggregate Functions
Analytical Functions
Configuration Function...
Constraints
Cursor
Cursor Functions
Data Control Language
Data Definition Lang
Data Manipulation Lang
Data Type
Database
Date Time Functions
Functions
Index
Interview FAQ
Joins
Math Functions
Meta Data Functions
Miscellaneous
Operator
Rowset Functions
Security Functions
Select Query
Sequence
Stored Procedures
String Functions
Sub Query
System Functions
System Statistical Fun...
Text and Image Functio...
Transaction Control La...
Trigger
View
Assembly Language
Artificial Intelligence
C Programming
C++ Programming
Visual C++
OOAD
Cobol
Java
Asp.net MVC
Rest and WCF Services
Entity Framework
Knockout.Js
Unix / Linux / Ubuntu
Networking
OOPs Concept
HTML
Dos
SQL
System Analysis & Design
Gadgets
Internet
CSS
Javascript
.Net Framework
Asp.net
C#
VB.Net
Python
Perl
Oracle
Software Engineering
RDBMS Terms
AJAX Framework
Design Pattern
UML
WPF
WCF
SEO
PowerShell
Visual Studio
WWF
BizTalk Server
Azure
General
Testing
Online Certifications
PHP
My SQL
LinQ
Project Management
Silverlight
XML
MS Office
Windows OS
DHTML
Sharepoint