I'm following this tutorial on Microsoft Docs. I've reached the part where I use the "Data Migration Assistant", but after selecting the target Azure database and clicking "Next", I get the following error:
An unexpected error occurred. Current principal does not have CONTROL permission on securable AzureDatabaseName of class DATABASE.
I'm using the only user of the Azure SQL server - the server admin, which should have all permissions. I've verified that the user is 'db_owner' by using IS_ROLEMEMBER.
Am I missing something?
SQL virtual machines offer full administrative control over the SQL Server instance and underlying OS for migration to Azure. The most significant difference from SQL Database and SQL Managed Instance is that SQL Server on Azure Virtual Machines allows full control over the database engine.
You can migrate existing SQL Server databases running on: SQL Server on-premises. SQL Server on Azure Virtual Machines. Amazon Web Services (AWS) Elastic Compute Cloud (EC2).
About Azure Database for MySQL This relational database system offers high data protection with enterprise-grade security and support for virtually all regulatory compliance standards. It also provides common cloud benefits such as pay-as-you-go pricing and cost optimization controls.
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:
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://learn.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With