@@CONNECTIONS and @@MAX_CONNECTIONS | SansSQL

Monday, December 29, 2008

@@CONNECTIONS and @@MAX_CONNECTIONS

@@CONNECTIONS returns the number of attempted connections, either successful or unsuccessful since SQL Server was last started.Connections are different from users. For example, Applications can open multiple connections to SQL Server without the user observing the connections.
Syntax: - Select @@CONNECTIONS
@@MAX_CONNECTIONS is the maximum number of connections allowed simultaneously to the SQL server. The number returned is not necessarily the number currently configured. The actual number of user connections allowed also depends on the version of SQL Server installed and the limitations of your applications and hardware.
To Change the max connections, Use sp_configure
Syntax: - Select @@MAX_CONNECTIONS
@@CONNECTIONS is incremented with each login attempt, therefore @@CONNECTIONS can be greater than @@MAX_CONNECTIONS.
 
Example: -
SELECT GETDATE() AS 'Current Date and Time',
@@CONNECTIONS AS 'Login Attempts',
@@MAX_CONNECTIONS AS 'Max Connections Allowed'

6 comments:

Unknown said...

Its reallly Awsum!!!! bhai..

Unknown said...

Hi i have a question is 32767 is the maximum size of user allowed in sql server its same in all sql server version or every edition contain different number.

Huongkvb said...

Aivivu chuyên vé máy bay, tham khảo

vé máy bay đi Mỹ Vietnam Airline

vé máy bay từ mỹ về việt nam hãng ana

đặt vé máy bay từ nhật về việt nam

đặt vé máy bay từ đức về việt nam

vé máy bay giá rẻ từ Canada về Việt Nam

vé máy bay hàn quốc hà nội

khách sạn cách ly tại hà nội

Chuyến bay cho chuyên gia nước ngoài

Jone Martin said...

Before your blog, I didn't know about this connection. Thank you for telling me this difference. At this time, Furnace Repair Services In Fort Worth TX bring the chance for you, you can save your investment save under the experts.

Tom said...

nice

Tom said...

Hey poeple! I know that its not really simple to write a excellent essya but you can attempt to this service! Check this website and be the best! This professional personal statement writing services is the best on! So go or it and enjoy! Like this one!

Post a Comment

Ads