SQL SERVER – Stretch Database – ERROR: The Provided Location is Not Available for Resource Group

This was my first experiment with this feature called Stretch Database. I have started the wizard and encountered at the very end. Here is the error message.

Configure azure settings.

And here is the text of error message.

Operation to create resource group stretchgroup-australiacentral failed. Details : {“error”:{“code”:”LocationNotAvailableForResourceGroup”,”message”:”The provided location ‘australiacentral’ is not available for resource group. List of available regions is ‘centralus,eastasia,southeastasia,eastus,eastus2,westus,westus2, northcentralus,southcentralus,westcentralus,northeurope,westeurope, japaneast,japanwest,brazilsouth, australiasoutheast,australiaeast,westindia,southindia,centralindia, canadacentral,canadaeast,uksouth,ukwest,koreacentral,koreasouth, francecentral,southafricanorth’.”}}

It also gave an option to read the logs and I found the same error there also.

  1. [Informational] TaskUpdates: Message:Task : ‘Provision Azure Sql Server stretchserver-stretchdbdemo-20190317-031938571’ — Status : ‘Started’ — Details : ‘Task ‘Provision Azure Sql Server stretchserver-stretchdbdemo-20190317-031938571′ started ….’.
  2. [Informational] TaskUpdates: Message:Task : ‘Provision Azure Sql Server stretchserver-stretchdbdemo-20190317-031938571’ — Status : ‘Running’ — Details : ‘Task failed due to following error: Microsoft.SqlServer.Management.StretchDatabase.Model.Tasks. CreateResourceGroupFailedException: Operation to create resource group stretchgroup-australiacentral failed. Details : {“error”:{“code”:”LocationNotAvailableForResourceGroup”,”message”:”The provided location ‘australiacentral’ is not available for resource group. List of available regions is ‘centralus,eastasia,southeastasia,eastus,eastus2,westus,westus2, northcentralus,southcentralus,westcentralus,northeurope,westeurope, japaneast,japanwest,brazilsouth,australiasoutheast,australiaeast, westindia,southindia,centralindia,canadacentral,canadaeast,uksouth, ukwest,koreacentral,koreasouth,francecentral,southafricanorth’.”}}

at Microsoft.SqlServer.Management.StretchDatabase.Model.Tasks. ProvisionSqlAzureServerTask.CreateNewResourceGroup(ResourceManagement resourceManagementChannel, ServiceOperationStatus& status)
at Microsoft.SqlServer.Management.StretchDatabase.Model.Tasks. ProvisionSqlAzureServerTask.Perform(IExecutionPolicy taskExecutionPolicy)
   at Microsoft.SqlServer.Management.StretchDatabase. Model.Common.Task.Perform(IExecutionPolicy policy, CancellationToken token, ScenarioTaskHandler taskDelegate), retrying …’.

WORKAROUND/SOLUTION

I must say the error is intuitive and tells that the location is not available. But I was wondering where did I choose the location? So, I launched the wizard again and found the place (highlighted below)

SQL Server Management Studio error dialog.

The problem here is that the location came as the default (alphabetically first) and I didn’t pay attention to it.

As soon as I selected “South India” I was able to proceed and stretch the table to Azure.

Stretch Database demo.

 Have you tested this feature? Do you have any interesting learning?

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Azure, SQL Backup and Restore, SQL Error Messages, SQL Server, SQL Server Security
Previous Post
SQL SERVER – List Query Plan, Cache Size, Text and Execution Count
Next Post
SQL SERVER – Error: 825 – A Read of the File at Offset Succeeded After Failing 1 Time(s)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.