Azure Managed Instance Database Backup and Restore including CDC Data?

sguidos 10 Reputation points
2023-12-06T20:18:57.43+00:00

I currently have a database on an Azure SQL Managed Instance, with Change Data Capture ("CDC") enabled and working. How can I get a full copy of this database, including the CDC tables and data, into a different development server for testing? Backup/Restore? Import/Export Data Tier Application? BACPAC vs DACPAC vs BAK? SSMS, Azure Data Studio, SSDT, SqlPackage.exe?

The AI-generated answer says to use SSMS or Azure Data Studio, but I cannot get either to work for me. SSMS gives me the error "The backup operation for a database with service-managed transparent data encryption is not supported on SQL Database Managed Instance." Azure Data Studio gives me the error "Backup Database: Backup failed for Server 'xxxxxx.yyyyyyyy.database.windows.net'.
An exception occurred while executing a Transact-SQL statement or batch." Help!

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 120K Reputation points MVP
    2023-12-06T22:06:48.16+00:00

    Backup/Restore would be the way to go, but you would need to change to customer-managed key for TDE to be able to do that.

    There is copy/move-facility as described here: https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/database-copy-move-how-to?view=azuresql-mi&tabs=azure-portal. But the last bullet point is disappointing:

    You'll need to reconfigure transactional replication, change data capture (CDC), or distributed transactions after you move a database that relies on these features.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.