From the docs, it would seem that restoring a full database backup file is possible, but can one also restore transaction logs?
(the idea is to minimize downtime in a migration from on-prem to MI).
Thanks.
No, log shipping to Managed Instance is not possible; it only supports the restore of full backups. See this thread:
And the limited syntax diagram for RESTORE
in the documentation for Managed Instance:
The docs imply that RESTORE ... FROM URL
will implicitly add WITH RECOVERY
and so there will be no opportunity for logs to be applied after the initial restore. So your downtime will be >= the time it takes to take a COPY_ONLY full backup, put it somewhere MI can access, restore it, and re-point your app(s). You might also want to read through this tutorial, for a different approach.
I work in the SQL Managed Instance Product Group. We have now (Feb 2021) enabled log shipping as a part of an external service called Log Replay Service (LRS). The reason we could not enable log shipping directly from T-SQL was due to security concerns.
The LRS service when invoked will execute the log-shipping in NORECOVERY
mode behind the scenes on Managed Instance. More about this release in the documentation:
Migrate databases from SQL Server to SQL Managed Instance by using Log Replay Service (Preview).
DMS and LRS are both the same tech using log shipping to move data to Managed Instance. Here are the differences between DMS and LRS for your migration options:
.exe
locally, no admin permissions, or cannot open network ports), you
could use LRS yourself with PowerShell and CLI commands to manually orchestrate log shipping to Managed Instance.If you want to minimize downtime in a migration from on-prem to MI Microsoft suggest to use the built in feature that you can find on Azure Migrate called Data Migration Assistant:
https://learn.microsoft.com/en-us/azure/dms/tutorial-sql-server-managed-instance-online
https://azure.microsoft.com/en-us/resources/videos/online-migrations-using-azure-dms/