Logo 
Search:

SQL Server Articles

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

@@CONNECTIONS - CONNECTIONS Function

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

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

@@CONNECTIONS function returns the number of connections, or attempted connections, since SQL Server was last started.


Syntax of @@CONNECTIONS Function :

@@CONNECTIONS

Return type of @@CONNECTIONS function is an integer.




Examples of @@CONNECTIONS Function :

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

SELECT CONVERT(VARCHAR(10),@@CONNECTIONS) + ' login attempts made on ' + CONVERT(VARCHAR(50),getdate())

Output
4782 login attempts made on Aug 25 2010  5:24PM

Above example returns 4782 means 4782 login attempts made since sql server was last started. 
  
Share: 


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

Sarita Patel
Sarita Patel author of @@CONNECTIONS - CONNECTIONS 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!