HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

Restoring ANY database to Azure MI fails

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
failsanyrestoringdatabaseazure

Problem

Our freshly provisioned Azure SQL managed instance fails restoring backups from URL.

According to the server log the restore itself seems to finish after a certain amount of time but errors in following processes lead to a termination of the whole process...

The error message prompted by SSMS is


Msg 22003, Level 16, State 1, Line 7

Stale/aborted version cleanup was aborted for database id '5' due to database shutdown.

Msg 3013, Level 16, State 1, Line 7

RESTORE DATABASE is terminating abnormally.

The relevant part of the server log can be found here.

I tried backup files from different SQL Server versions (2012, 2016, 2019) -- even the backup of an empty database causes this error...

Did anybody experience something similar? Google does not seem to help at all.

The command used is:

RESTORE DATABASE Test FROM  URL = N'https://STORAGEACCOUNT.blob.core.windows.net/STORAGECONTAINER/Test.bak'


The necessary credential got created via:

CREATE CREDENTIAL [https://STORAGEACCOUNT.blob.core.windows.net/STORAGECONTAINER]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'sv=xxxxxxxxxxxxxxxxxxxxxx';


I removed STORAGECACCOUNT and STORAGECONTAINER as well as most of the SECRET.

Solution

Just got feedback from Microsoft, this is a known issue which is currently being fixed.

As per their recommendation creating the backups with the option CHECKSUM leads to restorable backups.

BACKUP DATABASE [DBNAME] TO URL = N'https://.blob.core.windows.net//on_prem_db_full.bak'
WITH CHECKSUM

Code Snippets

BACKUP DATABASE [DBNAME] TO URL = N'https://<storage_account>.blob.core.windows.net/<backup_container>/on_prem_db_full.bak'
WITH CHECKSUM

Context

StackExchange Database Administrators Q#265522, answer score: 8

Revisions (0)

No revisions yet.