Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to know the number of concurrent connections allowed in Azure SQL Database

I have following queries related to maximum number of simultaneous user connections allowed in Azure SQL Database.

1.For Azure SQL DB ,depending on the tier i.e. basic,standard and premium what is the number of concurrent connections supported by the database ?

2.How we can know this number ? Is there a query we can execute to know it or something in Azure portal UI ?

3.Can this allowed number of connections increased/modified ? If yes, how ?

As per Microsoft documentation ,there is one command "@@MAX_CONNECTIONS" which returns the maximum number of simultaneous user connections allowed on an instance of SQL Server (https://learn.microsoft.com/en-us/sql/t-sql/functions/max-connections-transact-sql?view=sql-server-2017").But this is not applicable for Azure SQL Database.

like image 368
Ayan Avatar asked Apr 16 '19 13:04

Ayan


2 Answers

1.For Azure SQL DB ,depending on the tier i.e. basic,standard and premium what is the number of concurrent connections supported by the database ?

Azure SQL database doesn't provide any concepts about the max number of concurrent connections. In theory it depends on hardware and OS capability. What we can get from Azure SQL database is: SQL Database resource limits for Azure SQL Database server.

The limits of Azure SQL Database maximum logins: enter image description here

2.How we can know this number ? Is there a query we can execute to know it or something in Azure portal UI ?

We could'n know this number, there is no such a query can help us achieve that, even using Azure portal UI.

3.Can this allowed number of connections increased/modified ? If yes, how ?

No, it can't.

The SQL command "@@MAX_CONNECTIONS" really works in Azure sql database.You can try this. enter image description here

Hope this helps.

like image 184
Leon Yue Avatar answered Nov 02 '22 23:11

Leon Yue


The following statement shows you the maximum number of connections for the current tier.

SELECT @@MAX_CONNECTIONS AS 'Max Connections';

If you are using Azure SQL Database elastic pools, the maximum number of sessions is 30k for all elastic pools. Currently there is no way to query this limit using T-SQL.

like image 27
Alberto Morillo Avatar answered Nov 03 '22 01:11

Alberto Morillo