Home
%3CLINGO-SUB%20id%3D%22lingo-sub-769673%22%20slang%3D%22en-US%22%3ELesson%20Learned%20%23105%3A%20Error%20code%2040613%20in%20Azure%20SQL%20Database%20using%20DAC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-769673%22%20slang%3D%22en-US%22%3E%3CP%3EToday%2C%20I%20worked%20on%20a%20service%20request%20that%20our%20customer%20is%20connecting%20to%20Azure%20SQL%20Database%20using%20the%20port%201434%20and%20they%20received%20an%20error%20message%3A%26nbsp%3BSqlcmd%3A%20Error%3A%20Microsoft%20ODBC%20Driver%2013%20for%20SQL%20Server%20%3A%20Database%20'master'%20on%20server%20'servername'%20is%20not%20currently%20available.%20Please%20retry%20the%20connection%20later.%20If%20the%20problem%20persists%2C%20contact%20customer%20support%2C%20and%20provide%20them%20the%20session%20tracing%20ID%20of%20'%7BCACD45E2-1480-xxxxx%7D'.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWorking%20with%20this%20customer%20we%20found%20that%20they%20are%20using%3A%26nbsp%3Bsqlcmd%20-S%20servername.database.windows.net%20-U%20username%20-P%20password%20-A%2C%20but%20what%20is%20the%20reason%20of%20this%20error%20message%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFirst%20of%20all%2C%20the%20port%201434%20is%20using%20for%20DAC%20connection%20that%20is%20supported%20in%20Azure%20SQL%20Database%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Fconfigure-windows%2Fdiagnostic-connection-for-database-administrators%3Fview%3Dsql-server-2017%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fdatabase-engine%2Fconfigure-windows%2Fdiagnostic-connection-for-database-administrators%3Fview%3Dsql-server-2017%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3ESecond%2C%20it%20is%20not%20supported%20to%20connect%20to%20the%20master%20database%20of%20your%20server%20and%20you%20need%20to%20use%20the%20parameter%20database%20in%20your%20sqlcmd%20to%20connect%20to%20your%20user%20database.%20Remember%20that%20in%20Azure%20SQL%20Database%20every%20user%20database%20is%20running%20in%20a%20specific%20SQL%20Server%20instance%2C%20changing%20the%20parameter%20like%20this%20one%3A%26nbsp%3Bsqlcmd%20-S%20servername.database.windows.net%20-U%20username%20-P%20password%20-d%20databasename%20-A%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EThird%2C%20in%20some%20tools%20like%20Visual%20Studio%20or%20SQL%20SERVER%20Management%20Studio%2C%20specifying%20the%20databasename%20you%20will%20be%20able%20to%20connect.%20But%2C%20I%20don't%20recomend%20to%20use%20the%20DAC%20connection%20because%20you%20don't%20have%20all%20the%20resources%20in%20your%20Azure%20SQL%20Database.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEnjoy!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-769673%22%20slang%3D%22en-US%22%3E%3CP%3EToday%2C%20I%20worked%20on%20a%20service%20request%20that%20our%20customer%20is%20connecting%20to%20Azure%20SQL%20Database%20using%20the%20port%201434%20and%20they%20received%20an%20error%20message%3A%26nbsp%3BSqlcmd%3A%20Error%3A%20Microsoft%20ODBC%20Driver%2013%20for%20SQL%20Server%20%3A%20Database%20'master'%20on%20server%20'servername'%20is%20not%20currently%20available.%20Please%20retry%20the%20connection%20later.%20If%20the%20problem%20persists%2C%20contact%20customer%20support%2C%20and%20provide%20them%20the%20session%20tracing%20ID%20of%20'%7BCACD45E2-1480-xxxxx%7D'.%3C%2FP%3E%3C%2FLINGO-TEASER%3E

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-dat...
  • 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!!