Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure SQL DB Error, This location is not available for subscription

Tags:

I am having pay as you go subscription and I am creating an Azure SQL server.

While adding server, on selection of location, I am getting this error:

This location is not available for subscriptions 

Please help.

like image 591
Tarik Khan Avatar asked Mar 21 '20 17:03

Tarik Khan


2 Answers

There's an actual issue with Microsoft servers. They have too many Azure SQL database creation requests. They're currently trying to handle the situation. This seems to affect all types of subscriptions even paid ones. I have a Visual Studio Enterprise Subscription and I get the same error (This location is not available for subscriptions) for all locations.

See following Microsoft forum thread for more information:

https://social.msdn.microsoft.com/Forums/en-US/ac0376cb-2a0e-4dc2-a52c-d986989e6801/ongoing-issue-unable-to-create-sql-database-server?forum=ssdsgetstarted

like image 97
Marc-Antoine Jutras Avatar answered Oct 01 '22 04:10

Marc-Antoine Jutras


As the other answer states, this is a (poorly handled) restriction on Azure as of now and there seems to be no ETA on when it shall be lifted

In the meantime, you can still get an SQL database up and running in Azure, if you don't mind doing a bit of extra work and don't want to wait - just set up a Docker instance and put MSSQL on it!

  • In the Azure Portal, create a container instance. Use the following docker image: https://hub.docker.com/r/microsoft/mssql-server-windows-express/
  • while creating, you might have to set the ACCEPT_EULA environment variable to "Y".
  • after it boots up (10-20 minutes for me), in the portal, connect to it with the "sqlcmd" command and set up your login. In my case, I just needed a quick demo db, so I took the "sa" login, ran "alter login SA with password ='{insert your password}'" and "alter login SA enable". See here for details: https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-login-transact-sql?view=sql-server-ver15#examples

and voila, you have an SQL instance on Azure. Although it's unmanaged and poorly monitored, it might be enough for a short-term solution. The IP address of the docker instance can be found in the Properties section of the container instance blade.

like image 30
Filip Avatar answered Oct 01 '22 05:10

Filip