Hi CV!
I have an Azure SQL Database backup failing with the below errors in the Job Details:
Error Code: [30:414] Description: Failed to export Azure database [AzureDbName] to Azure storage. Please look at the SQLiDA log for more details. Source: AzureSQLProxyCilent, Process: SQLiDA
Checking the SQLiDA.log I can see that the database copy operation in the SQL Instance is succeeding, however exporting the BACPAC to the Azure Storage account configured in the agent properties is failing with the below error:
The storage account cannot be accessed. Please check the storage account name and key and try again.
SQLiDA.log shows errors trying to access the storage account.
10332 4 10/27 20:00:25 412305 ### CvAzureSQL.AzureSQL.LoggerDebug - Starting to copy from db [AzureDbName] to copied db [cv_copy_1603854025346_AzureDbName] in server [SQLAZUREVM].
10332 4 10/27 20:01:47 412305 ### CvAzureSQL.AzureSQL.LoggerDebug - Finished copying from db [AzureDbName] to copied db [cv_copy_1603854025346_AzureDbName] in server [SQLAZUREVM].
10332 4 10/27 20:01:47 412305 ### CvAzureSQL.AzureSQL.LoggerDebug - Starting to export from db [cv_copy_1603854025346_AzureDbName] to bacpac [AzureDbName.1603854025346.1603854107882.0.bacpac] in server [SQLAZUREVM.database.windows.net].
10332 2568 10/27 20:02:04 412305 CAzureSQLBackup::doAzureDBBackup(148): -Error-: Do SQL DB Backup Failed with error [The storage account cannot be accessed. Please check the storage account name and key and try again.
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at CvAzureSQL.AzureSQLRM.requestRESTAPI(String sMethod, String sRequest, String sBody)
at CvAzureSQL.AzureSQLRM.requestExportDB(String sFullyQualifiedServerName, ExportRequest export Req, String sDBName, String& sStatusURL) ].
10332 2568 10/27 20:02:04 412305 CAzureSQLCommon::initializeCOM() - - Already initialized.
10332 2568 10/27 20:02:04 412305 CAzureSQLCommon::setAzureADAccount(1928): -Debug-: Active Direcotry authentication credentials are not set for clientId [69].
10332 2568 10/27 20:02:04 412305 CSQLBackup::runAzureDBBackupInThread(2140): -Error-: Failed to backup database[AzureDbName].
Any ideas on how to fix this please?