If you check the setting in any of your Azure SQL databases, you will see that the value_in_use
column value is zero for Remote admin connections
. Meaning ‘Remote admin connections’ are not allowed from remote clients. There is no way to change that at the time of writing this question. sp_configure
is not available for Azure SQL Database.
SELECT * FROM sys.configurations
WHERE NAME = 'remote admin connections'
ORDER BY NAME;
Does that mean Remote admin connections
are not allowed for Azure SQL Databases?
Best Answer
As per Microsoft documentation, Diagnostic Connection for Database Administrators is available for the Azure SQL database. If you are not familiar with DAC, read this official documentation from Microsoft.
Ref: Diagnostic Connection for Database Administrators
There is a tip in the same document.
In my test, I can still connect to the Azure SQL database with DAC using SSMS or SQLCMD. I did make the Microsoft Azure SQL team aware and suggested changing the value from zero to one.
In SSMS, follow the same process that you use to connect to on-premises SQL Server. Do not use the ‘Connect Object Explorer’ connections. Open a ‘New Query’ window and then connect. Prefix server name with ‘ADMIN:’.
During my testing, I get an error message but the connection was successful (SSMS 18.8).
If you do not mention the database name, you will only connect to the master database. You cannot switch context to any user databases. You will get an error if you try to change the context from Master to another database. Every database in an Azure SQL server has to be connected separately depending on which one you want to work with.
To connect to any database other than
master
type your database name in the connection string.For SQLCMD, you can use this command. You must use -d switch for the database name. If you are using Azure Active Directory for authentication use -G switch.
For On-Premises SQL Server, you will use
sys.endpoints
system catalog view to see details about a DAC. This system catalog view does not exist in Azure SQL Database.Caption: Output of
sys.endpoints
from SQL 2019 CU 9For Azure SQL Database, use the below query to determine who is using DAC and all other details about the DAC session. Dimitri Furman from Microsoft provided this query.