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:
ASYNC RESTORE DATABASE StackOverflow
FROM URL = 'https://YOUR/FACE/HERE.bak'
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.
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!