question

HemantSudehely-0557 avatar image
0 Votes"
HemantSudehely-0557 asked ·

AZURE SQL MI Error: Stale/aborted version cleanup was aborted for database id '10' due to database shutdown.

Hi, I am trying to restore SQL server .bak file to Azure SQL Managed Instance database through SSMS but getting an error

Msg 22003, Level 16, State 1, Line 18 Stale/aborted version cleanup was aborted for database id '10' due to database shutdown. Msg 3013, Level 16, State 1, Line 18 RESTORE DATABASE is terminating abnormally.

I am using command
CREATE CREDENTIAL [https://STORAGEACCOUNT.blob.core.windows.net/backups]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
, SECRET = '<<by using original key>>'
RESTORE DATABASE [TestDataBase] FROM URL =
'https://STORAGEACCOUNT.blob.core.windows.net/backups/TestDataBase.bak'

I have also tried by using SSMS restore wizard but no luck.

Does anyone face this issue or any help will be great help...

azure-data-factoryazure-sql-database
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@HemantSudehely-0557
Please let us know if you need further help. If this helped you, Please mark the reply as accepted answer so as to close the issue and others can get help from the same.
Thanks
Navtej S

0 Votes 0 ·

1 Answer

NavtejSaini-MSFT avatar image
1 Vote"
NavtejSaini-MSFT answered ·

Hi @HemantSudehely-0557

We have checked the internal resources for similar issues that users are facing and found the following:

The restore of database failed may have failed cause of DBCC CHECKDB that is run as part of the workflow has failed due to version store cleanup errors. As part of DBCC CHECKDB we run version store cleanup and due to some defect version store cleanup has failed. This manifests when DBCC CHECKDB is run in single user mode. We fixed the defect and the fix will be deployed in near future(during this month-June 2020). We apologize for the inconvenience caused by this issue.

Workaround : Below are the two option to self-mitigate the problem until the fix is deployed:

1) Take backups with CHECKSUM. This way we will not do DBCC CHECKDB at migration time as we have some confidence that the database is physically consistent. Taking backups with CHECKSUM is generally a good practice to make sure that the consistency of the database is intact.

2) Retry. The current understanding of the issue is that it is transient and is not specific to any backup. Restore fails about 9% of the time, so we appreciate your patience. The fix is deploying with next deployment.

You may also refer the below document for reference.

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-get-started-restore

Hope this helps.

Thanks
Navtej S

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.