Archive

Posts Tagged ‘SQL Configuration’

SQL Server – Difference between @@CONNECTIONS and @@MAX_CONNECTIONS

January 13, 2014 Leave a comment

@@MAX_CONNECTIONS in SQL Server returns maximum number of simultaneous user connections allowed. Maximum user connections allowed by SQL Server by default is 32,767; this number also depends on application and server hardware limits. This cam also be configured at server-level to avoid too many connections.

@@CONNECTIONS returns number of connection attempts (successful/failed) made to SQL Server since SQL Server is started. Since this include all attempts it can be greater than @@MAX_CONNECTIONS.

SELECT [ConnectionAttempts] @@CONNECTIONS,

       [MaximumAllowed] @@MAX_CONNECTIONS

Result Set:

ConnectionAttempts MaximumAllowed

394024473          32767

 

(1 row(s) affected)

As you can see from the example above number of connection attempts can be higher.

Hope This Helps!

Vishal

If you like this post, do like my Facebook Page –> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe

Create SQL Server Alias – CliConfg.exe

May 5, 2011 1 comment

If you are working with a number of SQL Server instances (or have really complex server/instance names!), you may already be familiar with aliases and using it to connect to instances. We create aliases for instances using SQL Server Configuration Manager.

image

However, SQL Server Configuration Manager is not shipped with OS and it will not be available on client machines.

To define an alias on a client machine, you can use the classic SQL Server Client Network Utility. You can launch this by going to Start > Run > CliConfg.exe

image

CliConfg.exe provides same functionality with a slightly different interface.

image

If you check "Dynamically determine port", make sure that SQL Server Browser is running on the server.

Hope This Helps!

Vishal

If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe