I need to copy an entire Azure SQL Database from one subscription to another.
The challenge I have is that it has a certificate with symmetrical key and if I try to export it to a .bacpac file I get this error:
SQL71626 (certificate/symmetric key is not supported in Microsoft Azure SQL Database v12)
Like all things IT there are probably 101 ways of doing this, and a number of sites explain some options (but none that I have found mention encryption and how best to deal with it).
Some additions info:
The destination subscription already exists
It has a SQL Server, I can add more if required.
Best Answer
Yes, you can Copy the SQL database with encryption from one Azure subscription to another. But you have to move your database along with an Azure SQL Server. Not just the database itself. You can follow my steps as a workaround.
I tested this successfully with the following steps:
Create a certificate and symmetric key. Example from Microsoft documentation. Certificate and Symmetric key.
Create another resource group in the same subscription as the staging area. Create a new Azure SQL Server and copy the database once the backup is available. You need this because when you move the resource they will not available at source after the move.
Move-AzResource
command. Details here and here.If you try to move only the database this the error message you get.