How to take backup of azure SQL-Managed Instance backup to azure blob

Viewed 10013

I am having a SQL-Managed Instance database now I wanted to take backup in .bak format to blob storage. The current Command I am using is

WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
, SECRET = 'Pasted my sas token generated from azure portal blob storage'
go

BACKUP DATABASE [DB_Name]
TO URL = 'blob url/cointainer name/testing.bak'with checksum;

But by this I am getting a error: "BACKUP DATABASE failed. SQL Database Managed Instance supports only COPY_ONLY full database backups which are initiated by user."

I have also tried to give "COPY_ONLY" instead of checksum but then again I am facing a error: "Msg 41922, Level 16, State 1, Line 6 The backup operation for a database with service-managed transparent data encryption is not supported on SQL Database Managed Instance. Msg 3013, Level 16, State 1, Line 6 BACKUP DATABASE is terminating abnormally. "

Note: I have a database of approx size 800GB

3 Answers

To prevent the original error message and you are comfortable with the increased security risks you can remove encryption:

Alter database [database_name] set encryption Off

use [database_name]

DROP DATABASE ENCRYPTION KEY

Related