Blog Post

Azure Database Support Blog
1 MIN READ

Lesson Learned #105: Error code 40613 in Azure SQL Database using DAC

Jose_Manuel_Jurado's avatar
Jul 23, 2019

Today, I worked on a service request that our customer is connecting to Azure SQL Database using the port 1434 and they received an error message: Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Database 'master' on server 'servername' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '{CACD45E2-1480-xxxxx}'.

 

Working with this customer we found that they are using: sqlcmd -S servername.database.windows.net -U username -P password -A, but what is the reason of this error message?

 

  • First of all, the port 1434 is using for DAC connection that is supported in Azure SQL Database - https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/diagnostic-connection-for-database-administrators?view=sql-server-2017 
  • Second, it is not supported to connect to the master database of your server and you need to use the parameter database in your sqlcmd to connect to your user database. Remember that in Azure SQL Database every user database is running in a specific SQL Server instance, changing the parameter like this one: sqlcmd -S servername.database.windows.net -U username -P password -d databasename -A 
  • Third, in some tools like Visual Studio or SQL SERVER Management Studio, specifying the databasename you will be able to connect. But, I don't recomend to use the DAC connection because you don't have all the resources in your Azure SQL Database. 

 

Enjoy!!

Published Jul 23, 2019
Version 1.0
No CommentsBe the first to comment