How to Restore a SQL Server Database into Azure SQL DB Managed Instances Redux

Anything Brent Can Do

There’s some things you can do with Managed Instances, and some ways you can look at data that you can’t do elsewhere.

For instance, you have the ability to start an restore ASYNC — that means if your session drops, the restore will continue headlessly in the background.

There’s nothing about this equation that requires you to be connected. You’re restoring to a cloud server from cloud storage. You’re a meaty third wheel.

The command looks something like this:

While it’s running, you can sorta-kinda check the status with this new DMV:

I say sorta-kinda because my restore of the Stack Overflow database hit 50% complete immediately… and then sat there.

Back like that

You can see all sorts of stuff in here:

  • Create database commands
  • Drop database commands
  • Restore database commands
  • Their status, including percent complete, success/failure
  • Any errors
  • Start time and last check-in from the process

What I need to look into more is how the session_activity_id ties into other DMVs.

Thanks for reading!

Previous Post
Azure SQL DB Managed Instances: New Wait Stats
Next Post
Azure SQL Managed Instances Brain Dump on CPU, Memory, HA/DR, and Backups

5 Comments. Leave new

  • Seems like this is no longer supported.

    Reply
  • suraj pudasaini
    December 18, 2020 9:01 am

    I am trying to take a backup of my on prem database to Blob storage , I was able to do it successful couple of times about a month ago but now i am getting an error mentioned below. My database size is 310 GB. I was able to backup smaller database. Urgent. Please help.
    10 percent processed.
    20 percent processed.
    Msg 3202, Level 16, State 1, Line 1
    Write on “https://cloudallybackups.blob.core.windows.net/backup/polencapitaldatawarehouse_backup_2020_12_18_112405.bak” failed: 1117(The request could not be performed because of an I/O device error.)
    Msg 3013, Level 16, State 1, Line 1
    BACKUP DATABASE is terminating abnormally.

    Completion time: 2020-12-18T11:42:55.1618997-05:00

    Reply
    • For urgent production support questions, you’ll want to call Microsoft or hire a consultant.

      Reply
      • suraj.pudasaini
        December 18, 2020 9:14 am

        I have a work around. I can take a back up on a disk and upload that back up on storage account. This takes more time. Just sharing issues here if someone might know or have encountered such error before.

        Reply
  • suraj pudasaini
    December 18, 2020 9:58 am

    Added This and it worked. No need a consultant or call Microsoft

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu
{"cart_token":"","hash":"","cart_data":""}