CONTROL DATABASE issue when migrating SQL database to Azure CONTROL DATABASE issue when migrating SQL database to Azure azure azure

CONTROL DATABASE issue when migrating SQL database to Azure


I had the same issue. This seems to be a bug in Azure SQL databases. If you have dots in the database name it does not work. I replaced the dots with slashes and it worked for me.

You do not need to recreate the database. A rename worked fine for me:

  1. You have to make sure, that no-one else is using the database!
  2. Connect to master table and execute the following script on the Azure SQL Server:

    USE master;
    GO
    ALTER DATABASE [my.database]Modify Name = [my-database] ;
    GO

Here is a link on how to rename Azure SQL databases:

https://docs.microsoft.com/en-us/sql/relational-databases/databases/rename-a-database


Also make sure to create a firewall rule for your incoming connection. This error can be a bit of a red herring.


I deleted everything - the database, the sql server, and the resource group. Then I recreated everything using the same names, except the database name - which previously contained dots - and this time the migration tool worked. I guess I just encountered some bug.