Migrate databases from SQL Server to SQL Managed Instance using Log Replay Service (Preview)

Published Feb 18 2021 06:53 AM 4,624 Views
Microsoft
This article explains how to manually configure database migration from SQL Server 2008-2019 to SQL Managed Instance using Log Replay Service (LRS) currently in public preview. This is a cloud service enabled for Managed Instance based on the SQL Server log shipping technology. LRS should be used in cases when there exist complex custom migrations and hybrid architectures, when more control is needed, when there exists little tolerance for downtime, or when Azure Data Migration Service (DMS) cannot be used.

 

Note that both DMS and LRS use the same underlying migration technology and the same APIs. With releasing LRS, we are further enabling complex custom migrations and hybrid architecture between on-prem. SQL Server and SQL Managed Instances.

 

When to use Log Replay Service

 

LRS cloud service can be used directly with PowerShell, CLI cmdlets, or API, to manually build and orchestrate database migrations to SQL Managed Instance. You might want to consider using LRS cloud service in some of the following cases:

 

  • More control is needed for your database migration project
  • There exists a little tolerance for downtime on migration cutover
  • DMS executable cannot be installed in your environment
  • DMS executable does not have file access to local database backups
  • No access to host OS is available, or no Administrator privileges
  • Unable to open networking ports between your environment and Azure
  • Network throttling, or proxy blocking issues in your environment
  • Backups are stored directly to Azure Blob Storage using TO URL option
  • There exists a need to use differential backups
Note: Recommended automated way to migrate databases from SQL Server to SQL Managed Instance is using Azure DMS. This service is using the same LRS cloud service at the back end with log shipping in NORECOVERY mode. You should consider manually using LRS to orchestrate migrations in cases when Azure DMS does not fully support your scenarios.


How does it work

 

Building a custom solution using LRS to migrate databases to the cloud requires several orchestration steps shown in the diagram and outlined in the table below.

 

The migration consists of making full database backups on SQL Server with CHECKSUM enabled, and copying backup files to Azure Blob Storage. LRS is used to restore backup files from Azure Blob Storage to SQL Managed Instance. Azure Blob Storage is used as an intermediary storage between SQL Server and SQL Managed Instance.

 

LRS will monitor Azure Blob Storage for any new differential, or log backups added after the full backup has been restored, and will automatically restore any new files added. The progress of backup files being restored on SQL Managed Instance can be monitored using the service, and the process can also be aborted if necessary.

 

LRS does not require a specific backup file naming convention as it scans all files placed on Azure Blob Storage and it constructs the backup chain from reading the file headers only. Databases are in "restoring" state during the migration process, as they are restored in NORECOVERY mode, and cannot be used for reading or writing until the migration process has been fully completed.

 

In case of migrating several databases, backups for each database need to be placed in a separate folder on Azure Blob Storage. LRS needs to be started separately for each database and different paths to separate Azure Blob Storage folders needs to be specified.

 

LRS can be started in autocomplete, or continuous mode. When started in autocomplete mode, the migration will complete automatically when the last backup file name specified has been restored. When started in continuous mode, the service will continuously restore any new backup files added, and the migration will complete on the manual cutover only. It is recommended that application and the workload are stopped and the final log-tail backup taken before manual cutover is executed. The final cutover step will complete restoring the last backup file and will make the database come online for read and write use on SQL Managed Instance.

 

Once LRS is stopped, either automatically on autocomplete, or manually on cutover, the restore process cannot be resumed for a database that was brought online on SQL Managed Instance. To restore additional backup files once the migration was completed through autocomplete, or manually on cutover, the database needs to be deleted and the entire backup chain needs to be restored from scratch by restarting the LRS.

 

log-replay-service-conceptual.png

 

Operation Details
1. Copy database backups from SQL Server to Azure Blob Storage.

- Copy full, differential, and log backups from SQL Server to Azure Blob Storage container using Azcopy or Azure Storage Explorer.

- Use any file names, as LRS does not require a specific file naming convention.
- In migrating several databases, a separate folder is required for each database.

2. Start the LRS service in the cloud.

- Service can be started with a choice of cmdlets:
PowerShell start-azsqlinstancedatabaselogreplay
CLI az_sql_midb_log_replay_start cmdlets.

- Start LRS separately for each different database pointing to a different backup folder on Azure Blob Storage.

- Once started, the service will take backups from the Azure Blob Storage container and start restoring them on SQL Managed Instance.
- In case LRS was started in continuous mode, once all initially uploaded backups are restored, the service will watch for any new files uploaded to the folder and will continuously apply logs based on the LSN chain, until the service is stopped.

2.1. Monitor the operation progress. - Progress of the restore operation can be monitored with a choice of or cmdlets:
PowerShell get-azsqlinstancedatabaselogreplay
CLI az_sql_midb_log_replay_show cmdlets.
2.2. Stop\abort the operation if needed.

- In case that migration process needs to be aborted, the operation can be stopped with a choice of cmdlets:
PowerShell stop-azsqlinstancedatabaselogreplay
CLI az_sql_midb_log_replay_stop cmdlets.

- This will result in deletion of the database being restored on SQL Managed Instance.
- Once stopped, LRS cannot be continued for a database. Migration process needs to be restarted from scratch.

3. Cutover to the cloud when ready.

- Stop the application and the workload. Take the last log-tail backup and upload to Azure Blob Storage.

- Complete the cutover by initiating LRS complete operation with a choice of cmdlets:
PowerShell complete-azsqlinstancedatabaselogreplay
or CLI az_sql_midb_log_replay_complete.

- This will cause LRS service to restore the last backup file. The service will stop and database will come online for read and write use on SQL Managed Instance.

- Repoint the application connection string from SQL Server to SQL Managed Instance, and start the application. You will need to orchestrate this step yourself, either through a manual connection string change in your application, or automatically (e.g. if your application can, for example, read the connection string from a property, or a database).

Requirements for getting started

 

SQL Server side

  • SQL Server 2008-2019
  • Full backup of databases (one or multiple files)
  • Differential backup (one or multiple files)
  • Log backup (not split for transaction log file)
  • CHECKSUM must be enabled for backups (mandatory)

Azure side

  • PowerShell Az.SQL module version 2.16.0, or above (install, or use Azure Cloud Shell)
  • CLI version 2.19.0, or above (install)
  • Azure Blob Storage container provisioned
  • SAS security token with Read and List only permissions generated for the blob storage container

RBAC permissions

  • Subscription Owner role, or
  • Azure operator needs to have the Managed Instance Contributor RBAC Role, or
  • Custom role with the following permission:
    Microsoft.Sql/managedInstances/databases/*

Migrating multiple databases

  • Backup files for different databases must be placed in separate folders on Azure Blob Storage.
  • LRS needs to be started separately for each database pointing to an appropriate folder on Azure Blob Storage.
  • LRS can support up to 100 simultaneous restore processes per single SQL Managed Instance.

Best practices

The following are highly recommended as best practices:

  • Run Data Migration Assistant to validate your databases are ready to be migrated to SQL Managed Instance.
  • Split full and differential backups into multiple files, instead of a single file.
  • Enable backup compression.
  • Use Cloud Shell to execute scripts as it will always be updated to the latest cmdlets released.
  • Plan to complete the migration within 36 hours since LRS service has been started. This is a grace period preventing system managed software patches once LRS has been started.

Important: 

  • Database being restored using LRS cannot be used until the migration process has been completed. This is because underlying technology is restore in NORECOVERY mode.
  • Read-only access to databases during the migration is not supported by LRS.
  • Once migration has been completed either through the autocomplete, or on manual cutover, the migration process is finalized as LRS does not support restore resume.

 

Steps to execute

 

Create Azure Blob container

 

Azure Blob Storage is used as an intermediary storage for backup files between SQL Server and SQL Managed Instance. Follow these steps to create Azure Blob Storage container:

 

  1. Create a storage account
  2. Crete a blob container inside the storage account

 

Make backups on the SQL Server

 

Backups on the SQL Server can be made with either of the following two options:

 

  • Option 1: Backup to the local disk storage, then upload files to Azure Blob Storage, in case your environment is restrictive of direct backup to Azure Blob Storage.
  • Option 2: Backup directly to Azure Blob Storage with "TO URL" option in T-SQL, in case your environment and security procedures allow you to do so. 

First, modify the database to use the full recovery mode.

T-SQL

-- To permit log backups, before the full database backup, modify the database to use the full recovery model.

USE master

ALTER DATABASE SampleDB

SET RECOVERY FULL

GO

 

Then, make backups on SQL Server and ensure that CHECKSUM option is enabled. This is mandatory for the LRS to start. It is also recommended that COMPRESSION option is enabled as well.

 

Proceed with one of the two options - backing up to the local disk, or directly to Azure Blob Storage, depending on your circumstances.

 

Option 1: Make backup on the local disk

 

Use the below sample code to set the recovery to full for a database, and then make full, diff and log backup on SQL Server with storage to a local disk. Backups made on the local storage will need to be copied to Azure Blob Storage.

T-SQL

-- Example on how to make full database backup to the local disk

BACKUP DATABASE [SampleDB]
TO DISK='C:\BACKUP\SampleDB_full.bak'
WITH INIT, COMPRESSION, CHECKSUM

GO

 

-- Example on how to make differential database backup to the locak disk

BACKUP DATABASE [SampleDB]
TO DISK='C:\BACKUP\SampleDB_diff.bak'
WITH DIFFERENTIAL, COMPRESSION, CHECKSUM
GO

 

-- Example on how to make the log backup

BACKUP LOG [SampleDB]
TO DISK='C:\BACKUP\SampleDB_log.trn'
WITH CHECKSUM
GO

 

Note: You can use any filename structure for the backup files. LRS does not require a specific backup file naming convention as it scans all files placed on Azure Blob Storage. LRS constructs the backup chain from reading the file headers only, regardless of what their filename is.

 

Upload backups from SQL Server to Azure Blob Storage

 

Use some of the following approaches to upload backups from the local disk to to the Azure Blob Storage:

 

  • Using SQL Server native BACKUP TO URL functionality.
  • Using Azcopy, or Azure Storage Explorer to copy backups to a blob container.
  • Using Storage Explorer in Azure Portal.
  • Schedule Agent job on SQL Server to continuously makes backups to Azure Blob Storage

 

Option 2: Make backups from SQL Server directly to Azure Blob Storage

 

In case your operating procedures and networking allows backups directly to Azure Blob Storage, this option is faster in ensuring your backups are stored on Azur Blob Storage and ready to be used by LRS.

 

Generate the SAS token for write access to the Azure Blob Storage in Azure portal. Use the below code sample to add the access token to the blob storage on SQL Server. Note, the 'SHARED ACCESS SIGNATURE' needs to replaced with the SAS token.

T-SQL

/* Example:
USE master
CREATE CREDENTIAL [https://msfttutorial.blob.core.windows.net/containername]
WITH IDENTITY='SHARED ACCESS SIGNATURE'
, SECRET = 'sharedaccesssignature'
GO */

 

USE master
CREATE CREDENTIAL [https://<storageaccount>.blob.core.windows.net/<containername>]
-- this name must match the container path, start with https and must not contain a forward slash at the end
WITH IDENTITY='SHARED ACCESS SIGNATURE'
-- this is a mandatory string and should not be changed
, SECRET = 'sharedaccesssignature'
-- this is the shared access signature key that you obtained in section 1.
GO

 

Then use the below code sample to make the backup directly to the Azure Blob Storage URL.

T-SQL

-- Example on how to make full database backup to Azure Blob Storage
BACKUP DATABASE [SampleDB]
TO URL = ‘https://<storageaccount>.blob.core.windows.net/<containername>/SampleDB_full.bak'
WITH INIT, COMPRESSION, CHECKSUM
GO

 

-- Example on how to make differential database backup to Azure Blob Storage
BACKUP DATABASE [SampleDB]
TO URL = ‘https://<storageaccount>.blob.core.windows.net/<containername>/SampleDB_diff.bak'
WITH DIFFERENTIAL, COMPRESSION, CHECKSUM
GO

 

-- Example on how to make the log backup to Azure Blob Storage
BACKUP LOG [SampleDB]

TO URL = ‘https://<storageaccount>.blob.core.windows.net/<containername>/SampleDB_log.trn'
WITH CHECKSUM
GO

 

For additional details on how to make backups from SQL Server to Azure Blob Storage, see Tutorial: Use Azure Blob Storage service with SQL Server.

 

Create SAS authentication token with List and Read permissions on Azure Blob Storage for LRS

 

Please pay a particular attention to this section as #1 issue with not being able to start LRS is because of not having valid SAS authentication token to Azure Blob Storage, or not copying it properly.

 

LRS needs permissions to access backup files on the Azure Blob Storage. Generate SAS authentication token to the entire storage container (not a specific file, or files) with Read and List permissions only following these steps:

 

  • Access storage account using Azure portal
  • Navigate to Storage Explorer (#1 in the screenshot below)
  • Expand Blob Container
  • Right click on the blob container (#2 in the screenshot below)
  • Select Get Shared Access Signature (#3 in the screenshot below)

SAS TOKEN 01.PNG

 

  • Select the token expiry timeframe. (#4 in the screenshot below)
  • Select the time zone for the token - UTC or your local time zone which is your browser's time. (#5 in the screenshot below)
    • Please note that time zone of the start and expiry time for the SAS token and your SQL Managed Instance might be different.
    • Ensure that SAS token has the appropriate time validity taking time zones into consideration for the entire duration of your migration.
    • As the best practice, and if possible, it is recommended that you set the time zone to somewhat earlier and later time of your planned migration window to avoid issues with different time zones.
  • Ensure Read and List only permissions are selected. (#6 in the screenshot below)
    • No other permissions must be selected, or otherwise LRS will not be able to start. This security requirement is by design (e.g. LRS must not be able to write to your storage container).
  • Click on the Create button. (#7 in the screenshot below)

SAS TOKEN 02.PNG

 

SAS authentication will be generated with the time validity that you have specified earlier. Note that you will need the URI version of the token generated - as shown in the screenshot below.

The generated token.PNG

 

Copy parameters from SAS token generated

 

To be able to properly use the SAS token to start LRS, we need to understand its structure. The URI of the SAS token generated consists of two parts - 1. StorageContainerUri and 2. StorageContainerSasToken, separated with a question mark (?), as shown in the image below.

 

Storage container URI.png

 

  • The first part starting with "https://" until the question mark (?) is used for the StorageContainerURI parameter that is fed as in input to LRS. This gives LRS information about the folder where database backup files are stored.
  • The second part, starting after the question mark (?), in the example "sp=" and all the way until the end of the string is StorageContainerSasToken parameter. This is the actual signed authentication token, valid for the duration of the time specified. Note that this part does not necessarily need to start with "sp=" as shown, and that your case might differ.

Important to note is that you need to copy the first part before the question mark, and use it as StorageContainerURI parameter, and that you need to copy the second part after the question mark and use it for StorageContainerSasToken. The question mark (?) is not used in either of the parts we need to copy.

 

Copy parameters as follows:

 

1. Copy the first part of the token starting from https:// all the way until the question mark (?) and use it as StorageContainerUri parameter in PowerShell or CLI for starting LRS, as shown in the screenshot below.

SAS TOKEN - part 1.PNG

 

2. Copy the second part of the token starting from question mark (?), all the way until the end of the string, and use it as StorageContainerSasToken parameter in PowerShell or CLI for starting LRS, as shown in the screenshot below.

 

SAS TOKEN - part 2.PNG

 

Important: 

  • Permissions for the SAS token for Azure Blob Storage need to be Read and List only. In case of any other permissions granted for the SAS authentication token, starting LRS service will fail. These security requirements are by design.
  • The token must have the appropriate time validity. Please ensure time zones between the token generated and managed instance are taken into consideration.
  • Ensure that StorageContainerUri parameter for PowerShell or CLI is copied from the URI of the generated token, starting from https:// until the questions mark (?). Do not include the question mark.
  • Ensure that StorageContainerSasToken parameter for PowerShell of CLI is copied from the URI of the generated token, starting from the question mark (?), until the end of the string. Do not include the question mark.


Log in to Azure and select subscription


Use the following PowerShell cmdlet to log in to Azure:

PowerShell

Login-AzAccount

 

Select the appropriate subscription where your SQL Managed Instance resides using the following PowerShell cmdlet:

PowerShell

Select-AzSubscription -SubscriptionId <subscription ID>

 

Start the migration


The migration is started by starting the LRS service. The service can be started in autocomplete, or continuous mode. When started in autocomplete mode, the migration will complete automatically when the last backup file specified has been restored. This option requires the start command to specify the filename of the last backup file. When LRS is started in continuous mode, the service will continuously restore any new backup files added, and the migration will complete on the manual cutover only.

 

Start LRS in autocomplete mode

 

To start LRS service in autocomplete mode, use the following PowerShell, or CLI commands. Specify the last backup file name with -LastBackupName parameter. Upon restoring the last backup file name specified, the service will automatically initiate a cutover.

 

Start LRS in autocomplete mode - PowerShell example:

PowerShell

Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-Name "ManagedDatabaseName" `
-Collation "SQL_Latin1_General_CP1_CI_AS" `

-StorageContainerUri "https://storage4dani.blob.core.windows.net/lrs-container" `
-StorageContainerSasToken "sp=rl&st=2021-02-27T20:38:25Z&se=2021-02-28T20:38:25Z&sv=2020-02-10&sr=c&sig=itBHvhmJxcGrArSka7ra%2Fbgj3YMlYEhQH773jmt5E%2F0%3D" `
-AutoCompleteRestore `

-LastBackupName "last_backup.bak"

 

Start LRS in autocomplete mode - CLI example:

CLI

az sql midb log-replay start -g mygroup --mi myinstance -n mymanageddb -a --last-bn "last_backup.bak"

--storage-uri "https://storage4dani.blob.core.windows.net/lrs-container" 
--storage-sas "sp=rl&st=2021-02-27T20:38:25Z&se=2021-02-28T20:38:25Z&sv=2020-02-10&sr=c&sig=itBHvhmJxcGrArSka7ra%2Fbgj3YMlYEhQH773jmt5E%2F0%3D"

 

Start LRS in continuous mode

 

Start LRS in continuous mode - PowerShell example:

PowerShell

Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-Name "ManagedDatabaseName" `
-Collation "SQL_Latin1_General_CP1_CI_AS" `

-StorageContainerUri "https://storage4dani.blob.core.windows.net/lrs-container" `
-StorageContainerSasToken "sp=rl&st=2021-02-27T20:38:25Z&se=2021-02-28T20:38:25Z&sv=2020-02-10&sr=c&sig=itBHvhmJxcGrArSka7ra%2Fbgj3YMlYEhQH773jmt5E%2F0%3D"

 

Start LRS in continuous mode - CLI example:

 

CLI

az sql midb log-replay start -g mygroup --mi myinstance -n mymanageddb
--storage-uri "https://storage4dani.blob.core.windows.net/lrs-container" 
--storage-sas "sp=rl&st=2021-02-27T20:38:25Z&se=2021-02-28T20:38:25Z&sv=2020-02-10&sr=c&sig=itBHvhmJxcGrArSka7ra%2Fbgj3YMlYEhQH773jmt5E%2F0%3D"

 

Scripting LRS start in continuous mode

 

PowerShell and CLI clients to start LRS in continuous mode are synchronous. This means that clients will wait for the API response to report on success or failure to start the job. During this wait the command will not return the control back to the command prompt. In case you are scripting the migration experience, and require the LRS start command to give control back immediately to continue with rest of the script, you can execute PowerShell as a background job with -AsJob switch. For example:

 

PowerShell

$lrsjob = Start-AzSqlInstanceDatabaseLogReplay <required parameters> -AsJob

 

When you start a background job, a job object returns immediately, even if the job takes an extended time to finish. You can continue to work in the session without interruption while the job runs. For details on running PowerShell as a background job, see the PowerShell Start-Job documentation.

 

Similarly, to start a CLI command on Linux as a background process, use the ampersand (&) sign at the end of the LRS start command.

 

CLI

az sql midb log-replay start <required parameters> &

 

Important: Once LRS has been started, any system managed software patches will be halted for the next 47 hours. Upon passing of this window, the next automated software patch will automatically stop the ongoing LRS. In such case, migration cannot be resumed and it needs to be restarted from scratch.

 

Monitor the migration progress

 

To monitor the migration operation progress, use the following PowerShell command:

PowerShell

Get-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-Name "ManagedDatabaseName"

 

To monitor the migration operation progress, use the following CLI command:

CLI

az sql midb log-replay show -g mygroup --mi myinstance -n mymanageddb


Stop the migration

In case you need to stop the migration, use the following cmdlets. Stopping the migration will delete the restoring database on SQL Managed Instance due to which it will not be possible to resume the migration.

 

To stop\abort the migration process, use the following PowerShell command:

PowerShell

Stop-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-Name "ManagedDatabaseName"

 

To stop\abort the migration process, use the following CLI command:

 

CLI

az sql midb log-replay stop -g mygroup --mi myinstance -n mymanageddb

 

Complete the migration (continuous mode)

 

In case LRS is started in continuous mode, once you have ensured that all backups have been restored, initiating the cutover will complete the migration. Upon cutover completion, database will be migrated and ready for read and write access.

 

To complete the migration process in LRS continuous mode, use the following PowerShell command:

 

PowerShell

Complete-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
-InstanceName "ManagedInstance01" `
-Name "ManagedDatabaseName" `

-LastBackupName "last_backup.bak"

 

To complete the migration process in LRS continuous mode, use the following CLI command:

 

CLI

az sql midb log-replay complete -g mygroup --mi myinstance -n mymanageddb --last-backup-name "last_backup.bak"

 

Successful migration (example)

 

Upon completion of restoring all backups if LRS was started in autocomplete mode, or on manual complete if LRS was started in continuous mode, PowerShell or CLI will show success of the operation.

 

Shown in the screenshot below is successful completion of LRS stared in autocomplete mode, restoring AdventureWorks2019 database on SQL Managed Instance.

Successful restore 01.PNG

On completion of the process, databases successfully restored will be available for read and write operations on SQL Managed Instance. Shown in the screenshot below is example of AdventureWorks2019 database successfully restored on SQL Managed Instance.

Successful restore 02..PNG

 

Functional limitations

 

Functional limitations of Log Replay Service (LRS) are:

 

  • Database being restored cannot be used for read-only access during the migration process.
  • System managed software patches will be blocked for 47 hours since starting LRS. Upon expiry of this time window, the next software update will stop LRS. In such case, LRS needs to be restarted from scratch.
  • LRS requires databases on the SQL Server to be backed up with CHECKSUM option enabled.
  • SAS token for use by LRS needs to be generated for the entire Azure Blob Storage container, and must have Read and List permissions only.
  • Backup files for different databases must be placed in separate folders on Azure Blob Storage.
  • LRS needs to be started separately for each database pointing to separate folders with backup files on Azure Blob Storage.
  • LRS can support up to 100 simultaneous restore processes per single SQL Managed Instance.

 

Troubleshooting

 

Once you start the LRS, use the monitoring cmdlets (get-azsqlinstancedatabaselogreplay or az_sql_midb_log_replay_show) to see the status of the operation. If after some time LRS fails to start with an error please check for some of the most common issues:

 

  • Verify if there already exists a database with the same name on SQL MI that you are trying to migrate from SQL Server? If this is the case, resolve this conflict by renaming one of databases.
  • Did you backup database on the SQL Server using the CHECKSUM option?
  • Are the permissions on the SAS token Read and List only for the LRS service?
  • Did you copy the StorageContainerUri parameter from the generated token URI starting from "https://" until the question mark (?), and without including the question mark?
  • Did you copy the  StorageContainerSasToken from the generated token URI starting from the question mark (?), not including the question mark itself, all the way until the end of the string?
  • Is the SAS token validity time applicable for the time window of starting and completing the migration? Did you take into consideration differences in time zones used for SQL Managed Instance and the SAS token? Try re-generating the SAS token with extending the token validity of the time window before and after the current date.
  • Is the spelling for the database name, resource group name, and managed instance name correct?
  • In case of autocomplete, did you specify a valid filename for the last backup file?
  • In case of scripting the LRS start in continuous mode, to have the PowerShell return execution immediately to the next script command, did you start it as a background process with "-AsJob" switch?

 

Disclaimer

 

Please note that products and options presented in this article are subject to change. This article reflects the user-initiated manual failover option available for Azure SQL Managed Instance in February, 2021.

 

Closing remarks

 

If you find this article useful, please like it on this page and share through social media.

 

To share this article, you can use the Share button below, or this short link: https://aka.ms/mi-logshipping.

5 Comments
Senior Member

Why is it that the log replay server has only one scenario: moving on-premise databases to the cloud? Why is there no scenario for a permanent logship scenario?

 

We've a fairly common scenario where a remote database has intermittent connectivity and once in a while will ship the log files to a central database.

 

Or a SaaS vendor that will not open up their database -because cloud-, but can ship the logs to our side.

Microsoft

@Johannes_Vink Thank you on your question. I do not entirely understand your use case from the description, but I can attempt to re-interpret it in my own words. I believe you are asking if there could be a way to "permanently" do log shipping from SQL Server to SQL Managed Instance. By permanent I presume the operation could be running for moths? I also presume that you would like to use database on SQL Managed Instance for R/O access, otherwise I do not see the point to do continuous log shipping for months, correct? Assuming this is a correct interpretation of your question and the use case, here is my response to this:

  • It is not possible to have R/O database on SQL Managed Instance while LRS (log shipping) operation is running. There exist technical limitations preventing us from implementing this.
  • There are mandatory security updates and maintenance patches we must apply at least once a month (or more often in some cases) on SQL Managed Instance to be in compliance. These automated software patches can be impactful, meaning a brief restart of the SQL engine is needed, which will interrupt the restore process. Once interrupted, LRS cannot be resumed.

If your use case requires continuous replication from SQL Server to SQL Managed Instance, assuming you need to use the data as well on Managed Instance, perhaps transactional replication can be considered as an option. 

 

Hope this helps! Thank you.

Senior Member

@Danimir Ljepava Your assumptions are correct. Read-only in a second database and running for months, even years.

 

I was happy when I read about the new log ship service as use it on the on-premise side, but your points make sense. 

 

Just a thought: read-only can also be achieved by restricting the user access to the database. If no-one is allowed to make changes, you enter a state of read-only ;)

 

But resuming the log ship service, that is not something that can be overcome. Also when it reaches the end of the restore chain and then stops. And that a subsequent restore means deleting the database and restore everything again. I now understand that the use case is a one-time migration to Azure, not a continuous log ship service.

 

I'll look into the transactional replication, but likely we stay with the current setup.

 

Thank you for your answer!

Microsoft

@Johannes_Vink - We are planning to address the R/O database mode on SQL MI while syncing from on-prem. (or VM) SQL Server using a different technology stack sometimes during this year. If you perhaps have an NDA with Microsoft, send me a private message. Thanks!

Senior Member

@Danimir Ljepava We do have a NDA in place with Microsoft. I am looking forward to it, but our use case is at least 1 year into the future, as it is dependent on a major ERP upgrade. So I will wait on the feature development of MI and wait definitely with some patience on the planning on our side :)

%3CLINGO-SUB%20id%3D%22lingo-sub-2167844%22%20slang%3D%22en-US%22%3ERe%3A%20Migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2167844%22%20slang%3D%22en-US%22%3E%3CP%3EWhy%20is%20it%20that%20the%20log%20replay%20server%20has%20only%20one%20scenario%3A%20moving%20on-premise%20databases%20to%20the%20cloud%3F%20Why%20is%20there%20no%20scenario%20for%20a%20permanent%20logship%20scenario%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe've%20a%20fairly%20common%20scenario%20where%20a%20remote%20database%20has%20intermittent%20connectivity%20and%20once%20in%20a%20while%20will%20ship%20the%20log%20files%20to%20a%20central%20database.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%20a%20SaaS%20vendor%20that%20will%20not%20open%20up%20their%20database%20-because%20cloud-%2C%20but%20can%20ship%20the%20logs%20to%20our%20side.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2171659%22%20slang%3D%22en-US%22%3ERe%3A%20Migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2171659%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F296845%22%20target%3D%22_blank%22%3E%40Johannes_Vink%3C%2FA%3E%26nbsp%3BThank%20you%20on%20your%20question.%20I%20do%20not%20entirely%20understand%20your%20use%20case%20from%20the%20description%2C%20but%20I%20can%20attempt%20to%20re-interpret%20it%20in%20my%20own%20words.%20I%20believe%20you%20are%20asking%20if%20there%20could%20be%20a%20way%20to%20%22permanently%22%20do%20log%20shipping%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance.%20By%20permanent%20I%20presume%20the%20operation%20could%20be%20running%20for%20moths%3F%20I%20also%20presume%20that%20you%20would%20like%20to%20use%20database%20on%20SQL%20Managed%20Instance%20for%20R%2FO%20access%2C%20otherwise%20I%20do%20not%20see%20the%20point%20to%20do%20continuous%20log%20shipping%20for%20months%2C%20correct%3F%20Assuming%20this%20is%20a%20correct%20interpretation%20of%20your%20question%20and%20the%20use%20case%2C%20here%20is%20my%20response%20to%20this%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIt%20is%20not%20possible%20to%20have%20R%2FO%20database%20on%20SQL%20Managed%20Instance%20while%20LRS%20(log%20shipping)%20operation%20is%20running.%20This%20is%20also%20known%20as%20STANDBY%20restore%20mode.%20This%20mode%20is%20not%20possible%20to%20implement%20due%20to%20the%20version%20differences%20between%20in-market%20version%20of%20SQL%20Server%20(e.g.%20SQL%20Server%202019)%20and%20SQL%20Managed%20Instance%20(which%20is%20a%20higher%20version%20than%20SQL%202019).%3C%2FLI%3E%0A%3CLI%3EThere%20are%20mandatory%20security%20updates%20and%20maintenance%20patches%20we%20must%20apply%20at%20least%20once%20a%20month%20(or%20more%20often%20in%20some%20cases)%20on%20SQL%20Managed%20Instance%20to%20be%20in%20compliance.%20These%20automated%20software%20patches%20can%20be%20impactful%2C%20meaning%20a%20brief%20restart%20of%20the%20SQL%20engine%20is%20needed%2C%20which%20will%20interrupt%20the%20restore%20process.%20Once%20interrupted%2C%20LRS%20cannot%20be%20resumed.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20your%20use%20case%20requires%20continuous%20replication%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%2C%20assuming%20you%20need%20to%20use%20the%20data%20as%20well%20on%20Managed%20Instance%2C%20perhaps%20transactional%20replication%20can%20be%20considered%20as%20an%20option.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHope%20this%20helps!%20Thank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2172793%22%20slang%3D%22en-US%22%3ERe%3A%20Migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2172793%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F182256%22%20target%3D%22_blank%22%3E%40Danimir%20Ljepava%3C%2FA%3E%26nbsp%3BYour%20assumptions%20are%20correct.%20Read-only%20in%20a%20second%20database%20and%20running%20for%20months%2C%20even%20years.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20happy%20when%20I%20read%20about%20the%20new%20log%20ship%20service%20as%20use%20it%20on%20the%20on-premise%20side%2C%20but%20your%20points%20make%20sense.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20a%20thought%3A%20read-only%20can%20also%20be%20achieved%20by%20restricting%20the%20user%20access%20to%20the%20database.%20If%20no-one%20is%20allowed%20to%20make%20changes%2C%20you%20enter%20a%20state%20of%20read-only%20%3B)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20resuming%20the%20log%20ship%20service%2C%20that%20is%20not%20something%20that%20can%20be%20overcome.%20Also%20when%20it%20reaches%20the%20end%20of%20the%20restore%20chain%20and%20then%20stops.%20And%20that%20a%20subsequent%20restore%20means%20deleting%20the%20database%20and%20restore%20everything%20again.%20I%20now%20understand%20that%20the%20use%20case%20is%20a%20one-time%20migration%20to%20Azure%2C%20not%20a%20continuous%20log%20ship%20service.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'll%20look%20into%20the%20transactional%20replication%2C%20but%20likely%20we%20stay%20with%20the%20current%20setup.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20answer!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2173945%22%20slang%3D%22en-US%22%3ERe%3A%20Migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173945%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F296845%22%20target%3D%22_blank%22%3E%40Johannes_Vink%3C%2FA%3E%26nbsp%3B-%20We%20are%20planning%20to%20address%20the%20R%2FO%20database%20mode%20on%20SQL%20MI%20while%20syncing%20from%20on-prem.%20(or%20VM)%20SQL%20Server%20using%20a%20different%20technology%20stack%20sometimes%20during%20this%20year.%20If%20you%20perhaps%20have%20an%20NDA%20with%20Microsoft%2C%20send%20me%20a%20private%20message.%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174137%22%20slang%3D%22en-US%22%3ERe%3A%20Migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%20(Preview)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174137%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F182256%22%20target%3D%22_blank%22%3E%40Danimir%20Ljepava%3C%2FA%3E%26nbsp%3BWe%20do%20have%20a%20NDA%20in%20place%20with%20Microsoft.%20I%20am%20looking%20forward%20to%20it%2C%20but%20our%20use%20case%20is%20at%20least%201%20year%20into%20the%20future%2C%20as%20it%20is%20dependent%20on%20a%20major%20ERP%20upgrade.%20So%20I%20will%20wait%20on%20the%20feature%20development%20of%20MI%20and%20wait%20definitely%20with%20some%20patience%20on%20the%20planning%20on%20our%20side%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2144303%22%20slang%3D%22en-US%22%3EMigrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%20(Preview)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2144303%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22lia-message-subject-wrapper%20lia-component-subject%20lia-component-message-view-widget-subject-with-options%22%3E%0A%3CDIV%20class%3D%22MessageSubject%22%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EThis%20article%20explains%20how%20to%20manually%20configure%20database%20migration%20from%20SQL%20Server%202008-2019%20to%20SQL%20Managed%20Instance%20using%20Log%20Replay%20Service%20(LRS)%20currently%20in%20public%20preview.%20This%20is%20a%20cloud%20service%20enabled%20for%20Managed%20Instance%20based%20on%20the%20SQL%20Server%20log%20shipping%20technology.%20LRS%20should%20be%20used%20in%20cases%20when%20there%20exist%20complex%20custom%20migrations%20and%20hybrid%20architectures%2C%20when%20more%20control%20is%20needed%2C%20when%20there%20exists%20little%20tolerance%20for%20downtime%2C%20or%20when%20Azure%20Data%20Migration%20Service%20(DMS)%20cannot%20be%20used.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%20class%3D%22lia-message-body-wrapper%20lia-component-message-view-widget-body%22%3E%0A%3CDIV%20id%3D%22bodyDisplay%22%20class%3D%22lia-message-body%22%3E%0A%3CDIV%20class%3D%22lia-message-body-content%22%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20both%20DMS%20and%20LRS%20use%20the%20same%20underlying%20migration%20technology%20and%20the%20same%20APIs.%20With%20releasing%20LRS%2C%20we%20are%20further%20enabling%20complex%20custom%20migrations%20and%20hybrid%20architecture%20between%20on-prem.%20SQL%20Server%20and%20SQL%20Managed%20Instances.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EWhen%20to%20use%20Log%20Replay%20Service%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELRS%20cloud%20service%20can%20be%20used%20directly%20with%20PowerShell%2C%20CLI%20cmdlets%2C%20or%20API%2C%20to%20manually%20build%20and%20orchestrate%20database%20migrations%20to%20SQL%20Managed%20Instance.%26nbsp%3BYou%20might%20want%20to%20consider%20using%20LRS%20cloud%20service%20in%20some%20of%20the%20following%20cases%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EMore%20control%20is%20needed%20for%20your%20database%20migration%20project%3C%2FLI%3E%0A%3CLI%3EThere%20exists%20a%20little%20tolerance%20for%20downtime%20on%20migration%20cutover%3C%2FLI%3E%0A%3CLI%3EDMS%20executable%20cannot%20be%20installed%20in%20your%20environment%3C%2FLI%3E%0A%3CLI%3EDMS%20executable%20does%20not%20have%20file%20access%20to%20local%20database%20backups%3C%2FLI%3E%0A%3CLI%3ENo%20access%20to%20host%20OS%20is%20available%2C%20or%20no%20Administrator%20privileges%3C%2FLI%3E%0A%3CLI%3EUnable%20to%20open%20networking%20ports%20between%20your%20environment%20and%20Azure%3C%2FLI%3E%0A%3CLI%3ENetwork%20throttling%2C%20or%20proxy%20blocking%20issues%20in%20your%20environment%3C%2FLI%3E%0A%3CLI%3EBackups%20are%20stored%20directly%20to%20Azure%20Blob%20Storage%20using%20TO%20URL%20option%3C%2FLI%3E%0A%3CLI%3EThere%20exists%20a%20need%20to%20use%20differential%20backups%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23e2daf1%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20Recommended%20automated%20way%20to%20migrate%20databases%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%20is%20using%20Azure%20DMS.%20This%20service%20is%20using%20the%20same%20LRS%20cloud%20service%20at%20the%20back%20end%20with%20log%20shipping%20in%26nbsp%3BNORECOVERY%20mode.%20You%20should%20consider%20manually%20using%20LRS%20to%20orchestrate%20migrations%20in%20cases%20when%20Azure%20DMS%20does%20not%20fully%20support%20your%20scenarios.%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CFONT%20size%3D%226%22%3EHow%20does%20it%20work%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBuilding%20a%20custom%20solution%20using%20LRS%20to%20migrate%20databases%20to%20the%20cloud%20requires%20several%20orchestration%20steps%20shown%20in%20the%20diagram%20and%20outlined%20in%20the%20table%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20migration%20consists%20of%20making%20full%20database%20backups%20on%20SQL%20Server%20with%20CHECKSUM%20enabled%2C%20and%20copying%20backup%20files%20to%20Azure%20Blob%20Storage.%20LRS%20is%20used%20to%20restore%20backup%20files%20from%20Azure%20Blob%20Storage%20to%20SQL%20Managed%20Instance.%20Azure%20Blob%20Storage%20is%20used%20as%20an%20intermediary%20storage%20between%20SQL%20Server%20and%20SQL%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELRS%20will%20monitor%20Azure%20Blob%20Storage%20for%20any%20new%20differential%2C%20or%20log%20backups%20added%20after%20the%20full%20backup%20has%20been%20restored%2C%20and%20will%20automatically%20restore%20any%20new%20files%20added.%20The%20progress%20of%20backup%20files%20being%20restored%20on%20SQL%20Managed%20Instance%20can%20be%20monitored%20using%20the%20service%2C%20and%20the%20process%20can%20also%20be%20aborted%20if%20necessary.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELRS%20does%20not%20require%20a%20specific%20backup%20file%20naming%20convention%20as%20it%20scans%20all%20files%20placed%20on%20Azure%20Blob%20Storage%20and%20it%20constructs%20the%20backup%20chain%20from%20reading%20the%20file%20headers%20only.%20Databases%20are%20in%20%22restoring%22%20state%20during%20the%20migration%20process%2C%20as%20they%20are%20restored%20in%20NORECOVERY%20mode%2C%20and%20cannot%20be%20used%20for%20reading%20or%20writing%20until%20the%20migration%20process%20has%20been%20fully%20completed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20of%20migrating%20several%20databases%2C%20backups%20for%20each%20database%20need%20to%20be%20placed%20in%20a%20separate%20folder%20on%20Azure%20Blob%20Storage.%20LRS%20needs%20to%20be%20started%20separately%20for%20each%20database%20and%20different%20paths%20to%20separate%20Azure%20Blob%20Storage%20folders%20needs%20to%20be%20specified.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELRS%20can%20be%20started%20in%20autocomplete%2C%20or%20continuous%20mode.%20When%20started%20in%20autocomplete%20mode%2C%20the%20migration%20will%20complete%20automatically%20when%20the%20last%20backup%20file%20name%20specified%20has%20been%20restored.%20When%20started%20in%20continuous%20mode%2C%20the%20service%20will%20continuously%20restore%20any%20new%20backup%20files%20added%2C%20and%20the%20migration%20will%20complete%20on%20the%20manual%20cutover%20only.%20It%20is%20recommended%20that%20application%20and%20the%20workload%20are%20stopped%20and%20the%20final%20log-tail%20backup%20taken%20before%20manual%20cutover%20is%20executed.%20The%20final%20cutover%20step%20will%20complete%20restoring%20the%20last%20backup%20file%20and%20will%20make%20the%20database%20come%20online%20for%20read%20and%20write%20use%20on%20SQL%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20LRS%20is%20stopped%2C%20either%20automatically%20on%20autocomplete%2C%20or%20manually%20on%20cutover%2C%20the%20restore%20process%20cannot%20be%20resumed%20for%20a%20database%20that%20was%20brought%20online%20on%20SQL%20Managed%20Instance.%20To%20restore%20additional%20backup%20files%20once%20the%20migration%20was%20completed%20through%20autocomplete%2C%20or%20manually%20on%20cutover%2C%20the%20database%20needs%20to%20be%20deleted%20and%20the%20entire%20backup%20chain%20needs%20to%20be%20restored%20from%20scratch%20by%20restarting%20the%20LRS.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22log-replay-service-conceptual.png%22%20style%3D%22width%3A%20643px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258782i52A91662AB22E15E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22log-replay-service-conceptual.png%22%20alt%3D%22log-replay-service-conceptual.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E%3CSTRONG%3EOperation%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%2230px%22%3E%3CSTRONG%3EDetails%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22193px%22%3E%3CSTRONG%3E1.%20Copy%20database%20backups%20from%20SQL%20Server%20to%20Azure%20Blob%20Storage.%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22193px%22%3E%3CP%3E-%20Copy%20full%2C%20differential%2C%20and%20log%20backups%20from%20SQL%20Server%20to%20Azure%20Blob%20Storage%20container%20using%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fstorage%2Fcommon%2Fstorage-use-azcopy-v10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzcopy%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Ffeatures%2Fstorage-explorer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Storage%20Explorer%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E-%20Use%20any%20file%20names%2C%20as%20LRS%20does%20not%20require%20a%20specific%20file%20naming%20convention.%3CBR%20%2F%3E-%20In%20migrating%20several%20databases%2C%20a%20separate%20folder%20is%20required%20for%20each%20database.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22411px%22%3E%3CSTRONG%3E2.%20Start%20the%20LRS%20service%20in%20the%20cloud.%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22411px%22%3E%3CP%3E-%20Service%20can%20be%20started%20with%20a%20choice%20of%20cmdlets%3A%3CBR%20%2F%3EPowerShell%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fmodule%2Faz.sql%2Fstart-azsqlinstancedatabaselogreplay%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Estart-azsqlinstancedatabaselogreplay%3C%2FA%3E%3CBR%20%2F%3ECLI%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fsql%2Fmidb%2Flog-replay%23az_sql_midb_log_replay_start%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaz_sql_midb_log_replay_start%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ecmdlets.%3C%2FP%3E%0A%3CP%3E-%20Start%20LRS%20separately%20for%20each%20different%20database%20pointing%20to%20a%20different%20backup%20folder%20on%20Azure%20Blob%20Storage.%3C%2FP%3E%0A%3CP%3E-%20Once%20started%2C%20the%20service%20will%20take%20backups%20from%20the%20Azure%20Blob%20Storage%20container%20and%20start%20restoring%20them%20on%20SQL%20Managed%20Instance.%3CBR%20%2F%3E-%20In%20case%20LRS%20was%20started%20in%20continuous%20mode%2C%20once%20all%20initially%20uploaded%20backups%20are%20restored%2C%20the%20service%20will%20watch%20for%20any%20new%20files%20uploaded%20to%20the%20folder%20and%20will%20continuously%20apply%20logs%20based%20on%20the%20LSN%20chain%2C%20until%20the%20service%20is%20stopped.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22111px%22%3E%3CSTRONG%3E2.1.%20Monitor%20the%20operation%20progress.%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22111px%22%3E-%20Progress%20of%20the%20restore%20operation%20can%20be%20monitored%20with%20a%20choice%20of%20or%20cmdlets%3A%3CBR%20%2F%3EPowerShell%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fmodule%2Faz.sql%2Fget-azsqlinstancedatabaselogreplay%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eget-azsqlinstancedatabaselogreplay%3C%2FA%3E%3CBR%20%2F%3ECLI%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fsql%2Fmidb%2Flog-replay%23az_sql_midb_log_replay_show%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaz_sql_midb_log_replay_show%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ecmdlets.%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22275px%22%3E%3CSTRONG%3E2.2.%20Stop%5Cabort%20the%20operation%20if%20needed.%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22275px%22%3E%3CP%3E-%20In%20case%20that%20migration%20process%20needs%20to%20be%20aborted%2C%20the%20operation%20can%20be%20stopped%20with%20a%20choice%20of%20cmdlets%3A%3CBR%20%2F%3EPowerShell%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fmodule%2Faz.sql%2Fstop-azsqlinstancedatabaselogreplay%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Estop-azsqlinstancedatabaselogreplay%3C%2FA%3E%3CBR%20%2F%3ECLI%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fsql%2Fmidb%2Flog-replay%23az_sql_midb_log_replay_stop%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaz_sql_midb_log_replay_stop%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ecmdlets.%3C%2FP%3E%0A%3CP%3E-%20This%20will%20result%20in%20deletion%20of%20the%20database%20being%20restored%20on%20SQL%20Managed%20Instance.%3CBR%20%2F%3E-%20Once%20stopped%2C%20LRS%20cannot%20be%20continued%20for%20a%20database.%20Migration%20process%20needs%20to%20be%20restarted%20from%20scratch.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22384px%22%3E%3CSTRONG%3E3.%20Cutover%20to%20the%20cloud%20when%20ready.%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%2250%25%22%20height%3D%22384px%22%3E%3CP%3E-%20Stop%20the%20application%20and%20the%20workload.%20Take%20the%20last%20log-tail%20backup%20and%20upload%20to%20Azure%20Blob%20Storage.%3C%2FP%3E%0A%3CP%3E-%20Complete%20the%20cutover%20by%20initiating%20LRS%20complete%20operation%20with%20a%20choice%20of%20cmdlets%3A%3CBR%20%2F%3EPowerShell%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fmodule%2Faz.sql%2Fcomplete-azsqlinstancedatabaselogreplay%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ecomplete-azsqlinstancedatabaselogreplay%3C%2FA%3E%3CBR%20%2F%3Eor%20CLI%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Fsql%2Fmidb%2Flog-replay%23az_sql_midb_log_replay_complete%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Eaz_sql_midb_log_replay_complete%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E-%20This%20will%20cause%20LRS%20service%20to%20restore%20the%20last%20backup%20file.%20The%20service%20will%20stop%20and%20database%20will%20come%20online%20for%20read%20and%20write%20use%20on%20SQL%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E-%20Repoint%20the%20application%20connection%20string%20from%20SQL%20Server%20to%20SQL%20Managed%20Instance%2C%20and%20start%20the%20application.%20You%20will%20need%20to%20orchestrate%20this%20step%20yourself%2C%20either%20through%20a%20manual%20connection%20string%20change%20in%20your%20application%2C%20or%20automatically%20(e.g.%20if%20your%20application%20can%2C%20for%20example%2C%20read%20the%20connection%20string%20from%20a%20property%2C%20or%20a%20database).%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3ERequirements%20for%20getting%20started%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ESQL%20Server%20side%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESQL%20Server%202008-2019%3C%2FLI%3E%0A%3CLI%3EFull%20backup%20of%20databases%20(one%20or%20multiple%20files)%3C%2FLI%3E%0A%3CLI%3EDifferential%20backup%20(one%20or%20multiple%20files)%3C%2FLI%3E%0A%3CLI%3ELog%20backup%20(not%20split%20for%20transaction%20log%20file)%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ECHECKSUM%20must%20be%20enabled%3C%2FSTRONG%3E%26nbsp%3Bfor%20backups%20(mandatory)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EAzure%20side%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPowerShell%20Az.SQL%20module%20version%202.16.0%2C%20or%20above%20(%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FAz.Sql%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Einstall%3C%2FA%3E%2C%20or%20use%20Azure%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fcloud-shell%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECloud%20Shell%3C%2FA%3E)%3C%2FLI%3E%0A%3CLI%3ECLI%20version%202.19.0%2C%20or%20above%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fcli%2Fazure%2Finstall-azure-cli%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Einstall%3C%2FA%3E)%3C%2FLI%3E%0A%3CLI%3EAzure%20Blob%20Storage%20container%20provisioned%3C%2FLI%3E%0A%3CLI%3ESAS%20security%20token%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ERead%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EList%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eonly%20permissions%20generated%20for%20the%20blob%20storage%20container%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ERBAC%20permissions%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESubscription%20Owner%20role%2C%20or%3C%2FLI%3E%0A%3CLI%3EAzure%20operator%20needs%20to%20have%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Frole-based-access-control%2Fbuilt-in-roles%23sql-managed-instance-contributor%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EManaged%20Instance%20Contributor%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3ERBAC%20Role%2C%20or%3C%2FLI%3E%0A%3CLI%3ECustom%20role%20with%20the%20following%20permission%3A%3CBR%20%2F%3EMicrosoft.Sql%2FmanagedInstances%2Fdatabases%2F*%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EMigrating%20multiple%20databases%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EBackup%20files%20for%20different%20databases%20must%20be%20placed%20in%20separate%20folders%20on%20Azure%20Blob%20Storage.%3C%2FLI%3E%0A%3CLI%3ELRS%20needs%20to%20be%20started%20separately%20for%20each%20database%20pointing%20to%20an%20appropriate%20folder%20on%20Azure%20Blob%20Storage.%3C%2FLI%3E%0A%3CLI%3ELRS%20can%20support%20up%20to%20100%20simultaneous%20restore%20processes%20per%20single%20SQL%20Managed%20Instance.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3EBest%20practices%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EThe%20following%20are%20highly%20recommended%20as%20best%20practices%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERun%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fdma%2Fdma-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EData%20Migration%20Assistant%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20validate%20your%20databases%20are%20ready%20to%20be%20migrated%20to%20SQL%20Managed%20Instance.%3C%2FLI%3E%0A%3CLI%3ESplit%20full%20and%20differential%20backups%20into%20multiple%20files%2C%20instead%20of%20a%20single%20file.%3C%2FLI%3E%0A%3CLI%3EEnable%20backup%20compression.%3C%2FLI%3E%0A%3CLI%3EUse%20Cloud%20Shell%20to%20execute%20scripts%20as%20it%20will%20always%20be%20updated%20to%20the%20latest%20cmdlets%20released.%3C%2FLI%3E%0A%3CLI%3EPlan%20to%20complete%20the%20migration%20within%2036%20hours%20since%20LRS%20service%20has%20been%20started.%20This%20is%20a%20grace%20period%20preventing%20system%20managed%20software%20patches%20once%20LRS%20has%20been%20started.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23f0f6ff%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CSTRONG%3EImportant%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EDatabase%20being%20restored%20using%20LRS%20cannot%20be%20used%20until%20the%20migration%20process%20has%20been%20completed.%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EThis%20is%20because%20underlying%20technology%20is%20restore%20in%20NORECOVERY%20mode.%3C%2FLI%3E%0A%3CLI%3ERead-only%20access%20to%20databases%20during%20the%20migration%20is%20not%20supported%20by%20LRS.%3C%2FLI%3E%0A%3CLI%3EOnce%20migration%20has%20been%20completed%20either%20through%20the%20autocomplete%2C%20or%20on%20manual%20cutover%2C%20the%20migration%20process%20is%20finalized%20as%20LRS%20does%20not%20support%20restore%20resume.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%226%22%3ESteps%20to%20execute%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ECreate%20Azure%20Blob%20container%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Blob%20Storage%20is%20used%20as%20an%20intermediary%20storage%20for%20backup%20files%20between%20SQL%20Server%20and%20SQL%20Managed%20Instance.%20Follow%20these%20steps%20to%20create%20Azure%20Blob%20Storage%20container%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fstorage%2Fcommon%2Fstorage-account-create%3Ftabs%3Dazure-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECreate%20a%20storage%20account%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fstorage%2Fblobs%2Fstorage-quickstart-blobs-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ECrete%20a%20blob%20container%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Einside%20the%20storage%20account%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EMake%20backups%20on%20the%20SQL%20Server%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBackups%20on%20the%20SQL%20Server%20can%20be%20made%20with%20either%20of%20the%20following%20two%20options%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EOption%201%3A%20Backup%20to%20the%20local%20disk%20storage%2C%20then%20upload%20files%20to%20Azure%20Blob%20Storage%2C%20in%20case%20your%20environment%20is%20restrictive%20of%20direct%20backup%20to%20Azure%20Blob%20Storage.%3C%2FLI%3E%0A%3CLI%3EOption%202%3A%20Backup%20directly%20to%20Azure%20Blob%20Storage%20with%20%22TO%20URL%22%20option%20in%20T-SQL%2C%20in%20case%20your%20environment%20and%20security%20procedures%20allow%20you%20to%20do%20so.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EFirst%2C%20modify%20the%20database%20to%20use%20the%20full%20recovery%20mode.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ET-SQL%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20To%20permit%20log%20backups%2C%20before%20the%20full%20database%20backup%2C%20modify%20the%20database%20to%20use%20the%20full%20recovery%20model.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EUSE%20master%3C%2FP%3E%0A%3CP%3EALTER%20DATABASE%20SampleDB%3C%2FP%3E%0A%3CP%3ESET%20RECOVERY%20FULL%3C%2FP%3E%0A%3CP%3EGO%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%2C%20make%20backups%20on%20SQL%20Server%20and%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3Eensure%26nbsp%3Bthat%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eoption%20is%20enabled%3C%2FFONT%3E.%20This%20is%20mandatory%20for%20the%20LRS%20to%20start.%20It%20is%20also%20recommended%20that%20COMPRESSION%20option%20is%20enabled%20as%20well.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EProceed%20with%20one%20of%20the%20two%20options%20-%20backing%20up%20to%20the%20local%20disk%2C%20or%20directly%20to%20Azure%20Blob%20Storage%2C%20depending%20on%20your%20circumstances.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EOption%201%3A%20Make%20backup%20on%20the%20local%20disk%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20the%20below%20sample%20code%20to%20set%20the%20recovery%20to%20full%20for%20a%20database%2C%20and%20then%20make%20full%2C%20diff%20and%20log%20backup%20on%20SQL%20Server%20with%20storage%20to%20a%20local%20disk.%20Backups%20made%20on%20the%20local%20storage%20will%20need%20to%20be%20copied%20to%20Azure%20Blob%20Storage.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ET-SQL%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efull%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Edatabase%20backup%20to%20the%20local%20disk%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EBACKUP%20DATABASE%20%5BSampleDB%5D%3CBR%20%2F%3ETO%20DISK%3D'C%3A%5CBACKUP%5CSampleDB_full.bak'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EINIT%3C%2FSTRONG%3E%2C%20COMPRESSION%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EGO%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Edifferential%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Edatabase%20backup%20to%20the%20locak%20disk%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EBACKUP%20DATABASE%20%5BSampleDB%5D%3CBR%20%2F%3ETO%20DISK%3D'C%3A%5CBACKUP%5CSampleDB_diff.bak'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDIFFERENTIAL%3C%2FSTRONG%3E%2C%20COMPRESSION%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Elog%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebackup%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EBACKUP%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ELOG%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%5BSampleDB%5D%3CBR%20%2F%3ETO%20DISK%3D'C%3A%5CBACKUP%5CSampleDB_log.trn'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%26nbsp%3BYou%20can%20use%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eany%20filename%20structure%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%20backup%20files.%20LRS%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Edoes%20not%20require%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ea%20specific%20backup%20file%20naming%20convention%20as%20it%20scans%20all%20files%20placed%20on%20Azure%20Blob%20Storage.%20LRS%20constructs%20the%20backup%20chain%20from%3CSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ereading%20the%20file%20headers%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eonly%2C%20regardless%20of%20what%20their%20filename%20is.%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EUpload%20backups%20from%20SQL%20Server%20to%20Azure%20Blob%20Storage%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20some%20of%20the%20following%20approaches%20to%20upload%20backups%20from%20the%20local%20disk%20to%20to%20the%20Azure%20Blob%20Storage%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUsing%20SQL%20Server%20native%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Frelational-databases%2Fbackup-restore%2Fsql-server-backup-to-url%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EBACKUP%20TO%20URL%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efunctionality.%3C%2FLI%3E%0A%3CLI%3EUsing%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fstorage%2Fcommon%2Fstorage-use-azcopy-v10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzcopy%3C%2FA%3E%2C%20or%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Ffeatures%2Fstorage-explorer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Storage%20Explorer%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20copy%20backups%20to%20a%20blob%20container.%3C%2FLI%3E%0A%3CLI%3EUsing%20Storage%20Explorer%20in%20Azure%20Portal.%3C%2FLI%3E%0A%3CLI%3ESchedule%20Agent%20job%20on%20SQL%20Server%20to%20continuously%20makes%20backups%20to%20Azure%20Blob%20Storage%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EOption%202%3A%20Make%20backups%20from%20SQL%20Server%20directly%20to%20Azure%20Blob%20Storage%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20your%20operating%20procedures%20and%20networking%20allows%20backups%20directly%20to%20Azure%20Blob%20Storage%2C%20this%20option%20is%20faster%20in%20ensuring%20your%20backups%20are%20stored%20on%20Azur%20Blob%20Storage%20and%20ready%20to%20be%20used%20by%20LRS.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGenerate%20the%20SAS%20token%20for%20write%20access%20to%20the%20Azure%20Blob%20Storage%20in%20Azure%20portal.%20Use%20the%20below%20code%20sample%20to%20add%20the%20access%20token%20to%20the%20blob%20storage%20on%20SQL%20Server.%20Note%2C%20the%20'SHARED%20ACCESS%20SIGNATURE'%20needs%20to%20replaced%20with%20the%20SAS%20token.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ET-SQL%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%2F*%20Example%3A%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3EUSE%20master%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3ECREATE%20CREDENTIAL%20%5B%3CA%20href%3D%22https%3A%2F%2Fmsfttutorial.blob.core.windows.net%2Fcontainername%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fmsfttutorial.blob.core.windows.net%2Fcontainername%3C%2FA%3E%5D%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3EWITH%20IDENTITY%3D'SHARED%20ACCESS%20SIGNATURE'%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3E%2C%20SECRET%20%3D%20'sharedaccesssignature'%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3EGO%20*%2F%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUSE%20master%3CBR%20%2F%3ECREATE%20CREDENTIAL%20%5Bhttps%3A%2F%2F%3CSTORAGEACCOUNT%3E.blob.core.windows.net%2F%3CCONTAINERNAME%3E%5D%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3E--%20this%20name%20must%20match%20the%20container%20path%2C%20start%20with%20https%20and%20must%20not%20contain%20a%20forward%20slash%20at%20the%20end%3C%2FFONT%3E%3CBR%20%2F%3EWITH%20IDENTITY%3D'%3CFONT%20color%3D%22%23800000%22%3ESHARED%20ACCESS%20SIGNATURE%3C%2FFONT%3E'%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3E--%20this%20is%20a%20mandatory%20string%20and%20should%20not%20be%20changed%3C%2FFONT%3E%3CBR%20%2F%3E%2C%20SECRET%20%3D%20'%3CFONT%20color%3D%22%23800000%22%3Esharedaccesssignature%3C%2FFONT%3E'%3CBR%20%2F%3E%3CFONT%20color%3D%22%23339966%22%3E--%20this%20is%20the%20shared%20access%20signature%20key%20that%20you%20obtained%20in%20section%201.%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FCONTAINERNAME%3E%3C%2FSTORAGEACCOUNT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%20use%20the%20below%20code%20sample%20to%20make%20the%20backup%20directly%20to%20the%20Azure%20Blob%20Storage%20URL.%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ET-SQL%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efull%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Edatabase%20backup%20to%20Azure%20Blob%20Storage%3C%2FFONT%3E%3CBR%20%2F%3EBACKUP%20DATABASE%20%5BSampleDB%5D%3CBR%20%2F%3ETO%20URL%20%3D%20%E2%80%98https%3A%2F%2F%3CSTORAGEACCOUNT%3E.blob.core.windows.net%2F%3CCONTAINERNAME%3E%2FSampleDB_full.bak'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EINIT%3C%2FSTRONG%3E%2C%20COMPRESSION%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FCONTAINERNAME%3E%3C%2FSTORAGEACCOUNT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Edifferential%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Edatabase%20backup%20to%20Azure%20Blob%20Storage%3C%2FFONT%3E%3CBR%20%2F%3EBACKUP%20DATABASE%20%5BSampleDB%5D%3CBR%20%2F%3ETO%20URL%20%3D%20%E2%80%98https%3A%2F%2F%3CSTORAGEACCOUNT%3E.blob.core.windows.net%2F%3CCONTAINERNAME%3E%2FSampleDB_diff.bak'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDIFFERENTIAL%3C%2FSTRONG%3E%2C%20COMPRESSION%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FCONTAINERNAME%3E%3C%2FSTORAGEACCOUNT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E--%20Example%20on%20how%20to%20make%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Elog%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebackup%20to%20Azure%20Blob%20Storage%3C%2FFONT%3E%3CBR%20%2F%3EBACKUP%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ELOG%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%5BSampleDB%5D%3C%2FP%3E%0A%3CP%3ETO%20URL%20%3D%20%E2%80%98https%3A%2F%2F%3CSTORAGEACCOUNT%3E.blob.core.windows.net%2F%3CCONTAINERNAME%3E%2FSampleDB_log.trn'%3CBR%20%2F%3EWITH%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000000%22%3E%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3EGO%3C%2FCONTAINERNAME%3E%3C%2FSTORAGEACCOUNT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFor%20additional%20details%20on%20how%20to%20make%20backups%20from%20SQL%20Server%20to%20Azure%20Blob%20Storage%2C%20see%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Frelational-databases%2Ftutorial-use-azure-blob-storage-service-with-sql-server-2016%231---create-stored-access-policy-and-shared-access-storage%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETutorial%3A%20Use%20Azure%20Blob%20Storage%20service%20with%20SQL%20Server%3C%2FA%3E.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ECreate%20SAS%20authentication%20token%20with%20List%20and%20Read%20permissions%20on%20Azure%20Blob%20Storage%20for%20LRS%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23FF0000%22%3EPlease%20pay%20a%20particular%20attention%20to%20this%20section%20as%20%231%20issue%20with%20not%20being%20able%20to%20start%20LRS%20is%20because%20of%20not%20having%20valid%20SAS%20authentication%20token%20to%20Azure%20Blob%20Storage%2C%20or%20not%20copying%20it%20properly.%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELRS%20needs%20permissions%20to%20access%20backup%20files%20on%20the%20Azure%20Blob%20Storage.%20Generate%20SAS%20authentication%20token%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Eentire%20storage%20container%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(not%20a%20specific%20file%2C%20or%20files)%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ERead%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3EList%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3Epermissions%20only%20following%20these%20steps%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAccess%20storage%20account%20using%20Azure%20portal%3C%2FLI%3E%0A%3CLI%3ENavigate%20to%20Storage%20Explorer%20(%3CSTRONG%3E%231%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3C%2FLI%3E%0A%3CLI%3EExpand%20Blob%20Container%3C%2FLI%3E%0A%3CLI%3ERight%20click%20on%20the%20blob%20container%20(%3CSTRONG%3E%232%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3C%2FLI%3E%0A%3CLI%3ESelect%20Get%20Shared%20Access%20Signature%20(%3CSTRONG%3E%233%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22SAS%20TOKEN%2001.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258791i33F4E79C70ACC37F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SAS%20TOKEN%2001.PNG%22%20alt%3D%22SAS%20TOKEN%2001.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESelect%20the%20token%20expiry%20timeframe.%20(%3CSTRONG%3E%234%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3C%2FLI%3E%0A%3CLI%3ESelect%20the%20time%20zone%20for%20the%20token%20-%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EUTC%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%20your%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Elocal%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etime%20zone%20which%20is%20your%20browser's%20time.%26nbsp%3B(%3CSTRONG%3E%235%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3CUL%3E%0A%3CLI%3EPlease%20note%20that%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etime%20zone%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eof%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Estart%20and%20expiry%20time%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%20SAS%20token%20and%20your%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESQL%20Managed%20Instance%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Emight%20be%20different%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EEnsure%20that%20SAS%20token%20has%20the%20appropriate%20time%20validity%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3Etaking%20time%20zones%20into%20consideration%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%20entire%20duration%20of%20your%20migration.%3C%2FLI%3E%0A%3CLI%3EAs%20the%20best%20practice%2C%20and%20if%20possible%2C%20it%20is%20recommended%20that%20you%20set%20the%20time%20zone%20to%20somewhat%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eearlier%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Elater%20time%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eof%20your%20planned%20migration%20window%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eto%20avoid%20issues%20with%20different%20time%20zones%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EEnsure%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ERead%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EList%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eonly%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epermissions%20are%20selected.%20(%3CSTRONG%3E%236%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3CUL%3E%0A%3CLI%3ENo%20other%20permissions%20must%20be%20selected%2C%20or%20otherwise%20LRS%20will%20not%20be%20able%20to%20start.%20This%20security%20requirement%20is%20by%20design%20(e.g.%20LRS%20must%20not%20be%20able%20to%20write%20to%20your%20storage%20container).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EClick%20on%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECreate%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ebutton.%20(%3CSTRONG%3E%237%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20screenshot%20below)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22SAS%20TOKEN%2002.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258792i5EC4505B780F14C6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SAS%20TOKEN%2002.PNG%22%20alt%3D%22SAS%20TOKEN%2002.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESAS%20authentication%20will%20be%20generated%20with%20the%20time%20validity%20that%20you%20have%20specified%20earlier.%20Note%20that%20you%20will%20need%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EURI%20version%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eof%20the%20token%20generated%20-%20as%20shown%20in%20the%20screenshot%20below.%3C%2FP%3E%0A%3CP%3E%E2%80%83%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22The%20generated%20token.PNG%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258785i8FAFA09CD0F017DB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22The%20generated%20token.PNG%22%20alt%3D%22The%20generated%20token.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorDanimir%20Ljepava_3%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ECopy%20parameters%20from%20SAS%20token%20generated%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20be%20able%20to%20properly%20use%20the%20SAS%20token%20to%20start%20LRS%2C%20we%20need%20to%20understand%20its%20structure.%26nbsp%3BThe%20URI%20of%20the%20SAS%20token%20generated%20consists%20of%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etwo%20parts%3C%2FSTRONG%3E%26nbsp%3B-%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E1.%20StorageContainerUri%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E2.%20StorageContainerSasToken%3C%2FSTRONG%3E%2C%20separated%20with%20a%20question%20mark%20(%3CSTRONG%3E%3F%3C%2FSTRONG%3E)%2C%20as%20shown%20in%20the%20image%20below.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorDanimir%20Ljepava_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Storage%20container%20URI.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258786i321C4227A4AE9210%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Storage%20container%20URI.png%22%20alt%3D%22Storage%20container%20URI.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efirst%20part%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Estarting%20with%20%22https%3A%2F%2F%22%20until%20the%20question%20mark%20(%3F)%20is%20used%20for%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerURI%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20that%20is%20fed%20as%20in%20input%20to%20LRS.%26nbsp%3BThis%20gives%20LRS%20information%20about%20the%20folder%20where%20database%20backup%20files%20are%20stored.%3C%2FLI%3E%0A%3CLI%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esecond%20part%2C%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Estarting%20after%20the%20question%20mark%20(%3F)%2C%20in%20the%20example%20%22sp%3D%22%20and%20all%20the%20way%20until%20the%20end%20of%20the%20string%20is%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerSasToken%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter.%20This%20is%20the%20actual%20signed%20authentication%20token%2C%20valid%20for%20the%20duration%20of%20the%20time%20specified.%20Note%20that%20this%20part%20does%20not%20necessarily%20need%20to%20start%20with%20%22sp%3D%22%20as%20shown%2C%20and%20that%20your%20case%20might%20differ.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3EImportant%20to%20note%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20that%20you%20need%20to%20copy%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efirst%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epart%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CU%3Ebefore%3C%2FU%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Ethe%20question%20mark%2C%20and%20use%20it%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerUR%3C%2FSTRONG%3EI%20parameter%2C%20and%20that%20you%20need%20to%20copy%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esecond%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epart%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CU%3Eafter%3C%2FU%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3Ethe%20question%20mark%20and%20use%20it%20for%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerSasToken%3C%2FSTRONG%3E.%20The%20question%20mark%20(%3F)%20is%20not%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Eused%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20either%20of%20the%20parts%20we%20need%20to%20copy.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECopy%20parameters%20as%20follows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E1.%20Copy%20the%20first%20part%20of%20the%20token%20starting%20from%20https%3A%2F%2F%20all%20the%20way%20until%20the%20question%20mark%20(%3F)%20and%20use%20it%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerUri%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20in%20PowerShell%20or%20CLI%20for%20starting%20LRS%2C%20as%20shown%20in%20the%20screenshot%20below.%3C%2FP%3E%0A%3CP%3E%E2%80%83%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22SAS%20TOKEN%20-%20part%201.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258787iEAC682D8443F73E3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SAS%20TOKEN%20-%20part%201.PNG%22%20alt%3D%22SAS%20TOKEN%20-%20part%201.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E2.%20Copy%20the%20second%20part%20of%20the%20token%20starting%20from%20question%20mark%20(%3F)%2C%20all%20the%20way%20until%20the%20end%20of%20the%20string%2C%20and%20use%20it%20as%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerSasToken%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20in%20PowerShell%20or%20CLI%20for%20starting%20LRS%2C%20as%20shown%20in%20the%20screenshot%20below.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22SAS%20TOKEN%20-%20part%202.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258788i4F70144683A14E4E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SAS%20TOKEN%20-%20part%202.PNG%22%20alt%3D%22SAS%20TOKEN%20-%20part%202.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23f0f6ff%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CSTRONG%3EImportant%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3EPermissions%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESAS%20token%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20Azure%20Blob%20Storage%20need%20to%20be%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ERead%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EList%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eonly.%20In%20case%20of%20any%20other%20permissions%20granted%20for%20the%20SAS%20authentication%20token%2C%20starting%20LRS%20service%20will%20fail.%20These%20security%20requirements%20are%20by%20design.%3C%2FLI%3E%0A%3CLI%3EThe%20token%20must%20have%20the%20appropriate%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etime%20validity%3C%2FSTRONG%3E.%20Please%20ensure%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etime%20zones%3C%2FSTRONG%3E%20between%20the%20token%20generated%20and%20managed%20instance%20are%20taken%20into%20consideration.%3C%2FLI%3E%0A%3CLI%3EEnsure%20that%26nbsp%3B%3CSTRONG%3EStorageContainerUri%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20for%20PowerShell%20or%20CLI%20is%20copied%20from%20the%20URI%20of%20the%20generated%20token%2C%20starting%20from%20https%3A%2F%2F%20until%20the%20questions%20mark%20(%3F).%20Do%20not%20include%20the%20question%20mark.%3C%2FLI%3E%0A%3CLI%3EEnsure%20that%26nbsp%3B%3CSTRONG%3EStorageContainerSasToken%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20for%20PowerShell%20of%20CLI%20is%20copied%20from%20the%20URI%20of%20the%20generated%20token%2C%20starting%20from%20the%20question%20mark%20(%3F)%2C%20until%20the%20end%20of%20the%20string.%20Do%20not%20include%20the%20question%20mark.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CFONT%20size%3D%225%22%3ELog%20in%20to%20Azure%20and%20select%20subscription%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EUse%20the%20following%20PowerShell%20cmdlet%20to%20log%20in%20to%20Azure%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFCC00%22%3ELogin-AzAccount%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESelect%20the%20appropriate%20subscription%20where%20your%20SQL%20Managed%20Instance%20resides%20using%20the%20following%20PowerShell%20cmdlet%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3ESelect-AzSubscription%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-SubscriptionId%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%3CSUBSCRIPTION%20id%3D%22%22%3E%3C%2FSUBSCRIPTION%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EStart%20the%20migration%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThe%20migration%20is%20started%20by%20starting%20the%20LRS%20service.%20The%20service%20can%20be%20started%20in%20autocomplete%2C%20or%20continuous%20mode.%20When%20started%20in%20autocomplete%20mode%2C%20the%20migration%20will%20complete%20automatically%20when%20the%20last%20backup%20file%20specified%20has%20been%20restored.%20This%20option%20requires%20the%20start%20command%20to%20specify%20the%20filename%20of%20the%20last%20backup%20file.%20When%20LRS%20is%20started%20in%20continuous%20mode%2C%20the%20service%20will%20continuously%20restore%20any%20new%20backup%20files%20added%2C%20and%20the%20migration%20will%20complete%20on%20the%20manual%20cutover%20only.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EStart%20LRS%20in%20autocomplete%20mode%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20start%20LRS%20service%20in%20autocomplete%20mode%2C%20use%20the%20following%20PowerShell%2C%20or%20CLI%20commands.%20Specify%20the%20last%20backup%20file%20name%20with%20-LastBackupName%20parameter.%20Upon%20restoring%20the%20last%20backup%20file%20name%20specified%2C%20the%20service%20will%20automatically%20initiate%20a%20cutover.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStart%20LRS%20in%20autocomplete%20mode%20-%20PowerShell%20example%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3EStart-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-ResourceGroupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ResourceGroup01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-InstanceName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedInstance01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-Name%3C%2FFONT%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22ManagedDatabaseName%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-Collation%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22SQL_Latin1_General_CP1_CI_AS%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-StorageContainerUri%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22https%3A%2F%2Fstorage4dani.blob.core.windows.net%2Flrs-container%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-StorageContainerSasToken%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22sp%3Drl%26amp%3Bst%3D2021-02-27T20%3A38%3A25Z%26amp%3Bse%3D2021-02-28T20%3A38%3A25Z%26amp%3Bsv%3D2020-02-10%26amp%3Bsr%3Dc%26amp%3Bsig%3DitBHvhmJxcGrArSka7ra%252Fbgj3YMlYEhQH773jmt5E%252F0%253D%22%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23999999%22%3E-AutoCompleteRestore%20%60%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-LastBackupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22last_backup.bak%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStart%20LRS%20in%20autocomplete%20mode%20-%20CLI%20example%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20start%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-g%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emygroup%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E--mi%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emyinstance%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-n%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emymanageddb%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E-a%20--last-bn%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22last_backup.bak%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E--storage-uri%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%22https%3A%2F%2Fstorage4dani.blob.core.windows.net%2Flrs-container%22%26nbsp%3B%3CBR%20%2F%3E%3CFONT%20color%3D%22%23999999%22%3E--storage-sas%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22sp%3Drl%26amp%3Bst%3D2021-02-27T20%3A38%3A25Z%26amp%3Bse%3D2021-02-28T20%3A38%3A25Z%26amp%3Bsv%3D2020-02-10%26amp%3Bsr%3Dc%26amp%3Bsig%3DitBHvhmJxcGrArSka7ra%252Fbgj3YMlYEhQH773jmt5E%252F0%253D%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EStart%20LRS%20in%20continuous%20mode%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStart%20LRS%20in%20continuous%20mode%20-%20PowerShell%20example%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3EStart-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-ResourceGroupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ResourceGroup01%22%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23999999%22%3E-InstanceName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedInstance01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23999999%22%3E-Name%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedDatabaseName%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23999999%22%3E-Collation%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2300CCFF%22%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22SQL_Latin1_General_CP1_CI_AS%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-StorageContainerUri%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22https%3A%2F%2Fstorage4dani.blob.core.windows.net%2Flrs-container%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-StorageContainerSasToken%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22sp%3Drl%26amp%3Bst%3D2021-02-27T20%3A38%3A25Z%26amp%3Bse%3D2021-02-28T20%3A38%3A25Z%26amp%3Bsv%3D2020-02-10%26amp%3Bsr%3Dc%26amp%3Bsig%3DitBHvhmJxcGrArSka7ra%252Fbgj3YMlYEhQH773jmt5E%252F0%253D%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStart%20LRS%20in%20continuous%20mode%20-%20CLI%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%22111px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20start%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-g%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emygroup%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E--mi%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emyinstance%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E-n%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emymanageddb%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E--storage-uri%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%22https%3A%2F%2Fstorage4dani.blob.core.windows.net%2Flrs-container%22%26nbsp%3B%3CBR%20%2F%3E%3CFONT%20color%3D%22%23999999%22%3E--storage-sas%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22sp%3Drl%26amp%3Bst%3D2021-02-27T20%3A38%3A25Z%26amp%3Bse%3D2021-02-28T20%3A38%3A25Z%26amp%3Bsv%3D2020-02-10%26amp%3Bsr%3Dc%26amp%3Bsig%3DitBHvhmJxcGrArSka7ra%252Fbgj3YMlYEhQH773jmt5E%252F0%253D%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EScripting%20LRS%20start%20in%20continuous%20mode%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPowerShell%20and%20CLI%20clients%20to%20start%20LRS%20in%20continuous%20mode%20are%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esynchronous%3C%2FSTRONG%3E.%20This%20means%20that%20clients%20will%20wait%20for%20the%20API%20response%20to%20report%20on%20success%20or%20failure%20to%20start%20the%20job.%20During%20this%20wait%20the%20command%20will%20not%20return%20the%20control%20back%20to%20the%20command%20prompt.%20In%20case%20you%20are%20scripting%20the%20migration%20experience%2C%20and%20require%20the%20LRS%20start%20command%20to%20give%20control%20back%20immediately%20to%20continue%20with%20rest%20of%20the%20script%2C%20you%20can%20execute%20PowerShell%20as%20a%20background%20job%20with%3CSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-AsJob%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eswitch.%20For%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3E%24lrsjob%20%3D%20Start-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E%3CREQUIRED%20parameters%3D%22%22%3E%3C%2FREQUIRED%3E%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23FF0000%22%3E-AsJob%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%20start%20a%20background%20job%2C%20a%20job%20object%20returns%20immediately%2C%20even%20if%20the%20job%20takes%20an%20extended%20time%20to%20finish.%20You%20can%20continue%20to%20work%20in%20the%20session%20without%20interruption%20while%20the%20job%20runs.%20For%20details%20on%20running%20PowerShell%20as%20a%20background%20job%2C%20see%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fpowershell%2Fmodule%2Fmicrosoft.powershell.core%2Fstart-job%23description%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPowerShell%20Start-Job%20documentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESimilarly%2C%20to%20start%20a%20CLI%20command%20on%20Linux%20as%20a%20background%20process%2C%20use%20the%20ampersand%20(%26amp%3B)%20sign%20at%20the%20end%20of%20the%20LRS%20start%20command.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%20data-unlink%3D%22true%22%3E%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20start%3C%2FFONT%3E%26nbsp%3B%3CFONT%20color%3D%22%23999999%22%3E%3CREQUIRED%20parameters%3D%22%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23FF0000%22%3E%26amp%3B%3C%2FFONT%3E%3C%2FREQUIRED%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23f0f6ff%3B%20width%3A%20100%25%3B%22%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3E%3CP%3E%3CSTRONG%3EImportant%3A%26nbsp%3B%3C%2FSTRONG%3EOnce%20LRS%20has%20been%20started%2C%20any%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esystem%20managed%20software%20patches%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewill%20be%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ehalted%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Enext%2047%20hours%3C%2FSTRONG%3E.%20Upon%20passing%20of%20this%20window%2C%20the%20next%20automated%20software%20patch%20will%20automatically%20stop%20the%20ongoing%20LRS.%20In%20such%20case%2C%20migration%20cannot%20be%20resumed%20and%20it%20needs%20to%20be%20restarted%20from%20scratch.%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EMonitor%20the%20migration%20progress%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20monitor%20the%20migration%20operation%20progress%2C%20use%20the%20following%20PowerShell%20command%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2284px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3EGet-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-ResourceGroupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ResourceGroup01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-InstanceName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedInstance01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-Name%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedDatabaseName%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20monitor%20the%20migration%20operation%20progress%2C%20use%20the%20following%20CLI%20command%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20show%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-g%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emygroup%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E--mi%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emyinstance%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E-n%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emymanageddb%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%3CBR%20%2F%3E%3CFONT%20size%3D%225%22%3EStop%20the%20migration%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EIn%20case%20you%20need%20to%20stop%20the%20migration%2C%20use%20the%20following%20cmdlets.%20Stopping%20the%20migration%20will%20delete%20the%20restoring%20database%20on%20SQL%20Managed%20Instance%20due%20to%20which%20it%20will%20not%20be%20possible%20to%20resume%20the%20migration.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20stop%5Cabort%20the%20migration%20process%2C%20use%20the%20following%20PowerShell%20command%3A%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3EStop-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-ResourceGroupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ResourceGroup01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-InstanceName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedInstance01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-Name%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedDatabaseName%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20stop%5Cabort%20the%20migration%20process%2C%20use%20the%20following%20CLI%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20stop%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-g%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emygroup%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E--mi%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emyinstance%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E-n%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emymanageddb%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EComplete%20the%20migration%20(continuous%20mode)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20LRS%20is%20started%20in%20continuous%20mode%2C%20once%20you%20have%20ensured%20that%20all%20backups%20have%20been%20restored%2C%20initiating%20the%20cutover%20will%20complete%20the%20migration.%20Upon%20cutover%20completion%2C%20database%20will%20be%20migrated%20and%20ready%20for%20read%20and%20write%20access.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20complete%20the%20migration%20process%20in%20LRS%20continuous%20mode%2C%20use%20the%20following%20PowerShell%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3EPowerShell%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3EComplete-AzSqlInstanceDatabaseLogReplay%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-ResourceGroupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ResourceGroup01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-InstanceName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedInstance01%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-Name%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22ManagedDatabaseName%22%3C%2FFONT%3E%26nbsp%3B%3CFONT%20size%3D%223%22%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E%60%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23999999%22%3E-LastBackupName%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22last_backup.bak%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20complete%20the%20migration%20process%20in%20LRS%20continuous%20mode%2C%20use%20the%20following%20CLI%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22background-color%3A%20%23012456%3B%20width%3A%20100%25%3B%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3ECLI%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22623%22%20height%3D%2230px%22%3E%3CP%3E%3CFONT%20color%3D%22%23FFFFFF%22%3E%3CFONT%20color%3D%22%23FFCC00%22%3Eaz%20sql%20midb%20log-replay%20complete%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%23999999%22%3E-g%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emygroup%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E--mi%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emyinstance%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E-n%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3Emymanageddb%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23999999%22%3E--last-backup-name%3C%2FFONT%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CFONT%20color%3D%22%2333CCCC%22%3E%22last_backup.bak%22%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ESuccessful%20migration%20(example)%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUpon%20completion%20of%20restoring%20all%20backups%20if%20LRS%20was%20started%20in%20autocomplete%20mode%2C%20or%20on%20manual%20complete%20if%20LRS%20was%20started%20in%20continuous%20mode%2C%20PowerShell%20or%20CLI%20will%20show%20success%20of%20the%20operation.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EShown%20in%20the%20screenshot%20below%20is%20successful%20completion%20of%20LRS%20stared%20in%20autocomplete%20mode%2C%20restoring%20AdventureWorks2019%20database%20on%20SQL%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Successful%20restore%2001.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258789iD3650BA36AEA2343%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Successful%20restore%2001.PNG%22%20alt%3D%22Successful%20restore%2001.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOn%20completion%20of%20the%20process%2C%20databases%20successfully%20restored%20will%20be%20available%20for%20read%20and%20write%20operations%20on%20SQL%20Managed%20Instance.%20Shown%20in%20the%20screenshot%20below%20is%20example%20of%20AdventureWorks2019%20database%20successfully%20restored%20on%20SQL%20Managed%20Instance.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Successful%20restore%2002..PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F258790i0254B7F04B07CF3C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Successful%20restore%2002..PNG%22%20alt%3D%22Successful%20restore%2002..PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EFunctional%20limitations%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFunctional%20limitations%20of%20Log%20Replay%20Service%20(LRS)%20are%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EDatabase%20being%20restored%20cannot%20be%20used%20for%20read-only%20access%20during%20the%20migration%20process.%3C%2FLI%3E%0A%3CLI%3ESystem%20managed%20software%20patches%20will%20be%20blocked%20for%2047%20hours%20since%20starting%20LRS.%20Upon%20expiry%20of%20this%20time%20window%2C%20the%20next%20software%20update%20will%20stop%20LRS.%20In%20such%20case%2C%20LRS%20needs%20to%20be%20restarted%20from%20scratch.%3C%2FLI%3E%0A%3CLI%3ELRS%20requires%20databases%20on%20the%20SQL%20Server%20to%20be%20backed%20up%20with%20CHECKSUM%20option%20enabled.%3C%2FLI%3E%0A%3CLI%3ESAS%20token%20for%20use%20by%20LRS%20needs%20to%20be%20generated%20for%20the%20entire%20Azure%20Blob%20Storage%20container%2C%20and%20must%20have%20Read%20and%20List%20permissions%20only.%3C%2FLI%3E%0A%3CLI%3EBackup%20files%20for%20different%20databases%20must%20be%20placed%20in%20separate%20folders%20on%20Azure%20Blob%20Storage.%3C%2FLI%3E%0A%3CLI%3ELRS%20needs%20to%20be%20started%20separately%20for%20each%20database%20pointing%20to%20separate%20folders%20with%20backup%20files%20on%20Azure%20Blob%20Storage.%3C%2FLI%3E%0A%3CLI%3ELRS%20can%20support%20up%20to%20100%20simultaneous%20restore%20processes%20per%20single%20SQL%20Managed%20Instance.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3ETroubleshooting%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20start%20the%20LRS%2C%20use%20the%20monitoring%20cmdlets%20(get-azsqlinstancedatabaselogreplay%20or%20az_sql_midb_log_replay_show)%20to%20see%20the%20status%20of%20the%20operation.%20If%20after%20some%20time%20LRS%20fails%20to%20start%20with%20an%20error%20please%20check%20for%20some%20of%20the%20most%20common%20issues%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EVerify%20if%20there%20already%20exists%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Edatabase%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewith%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Esame%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ename%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eon%20SQL%20MI%20that%20you%20are%20trying%20to%20migrate%20from%20SQL%20Server%3F%20If%20this%20is%20the%20case%2C%20resolve%20this%20conflict%20by%20renaming%20one%20of%20databases.%3C%2FLI%3E%0A%3CLI%3EDid%20you%20backup%20database%20on%20the%20SQL%20Server%20using%20the%26nbsp%3B%3CSTRONG%3ECHECKSUM%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eoption%3F%3C%2FLI%3E%0A%3CLI%3EAre%20the%20permissions%20on%20the%20SAS%20token%26nbsp%3B%3CSTRONG%3ERead%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EList%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eonly%20for%20the%20LRS%20service%3F%3C%2FLI%3E%0A%3CLI%3EDid%20you%20copy%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStorageContainerUri%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20from%20the%20generated%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etoken%20URI%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Estarting%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efrom%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22https%3A%2F%2F%22%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Euntil%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Equestion%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Emark%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(%3F)%2C%20and%20without%20including%20the%20question%20mark%3F%3C%2FLI%3E%0A%3CLI%3EDid%20you%20copy%20the%26nbsp%3B%26nbsp%3B%3CSTRONG%3EStorageContainerSasToken%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efrom%20the%20generated%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Etoken%20URI%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Estarting%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Efrom%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Equestion%20mark%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(%3F)%2C%20not%20including%20the%20question%20mark%20itself%2C%20all%20the%20way%20until%20the%20end%20of%20the%20string%3F%3C%2FLI%3E%0A%3CLI%3EIs%20the%20SAS%20token%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Evalidity%20time%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eapplicable%20for%20the%20time%20window%20of%20starting%20and%20completing%20the%20migration%3F%20Did%20you%20take%20into%20consideration%20differences%20in%26nbsp%3B%3CSTRONG%3Etime%20zones%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eused%20for%20SQL%20Managed%20Instance%20and%20the%20SAS%20token%3F%20Try%20re-generating%20the%20SAS%20token%20with%20extending%20the%20token%20validity%20of%20the%20time%20window%20before%20and%20after%20the%20current%20date.%3C%2FLI%3E%0A%3CLI%3EIs%20the%26nbsp%3B%3CSTRONG%3Espelling%3C%2FSTRONG%3E%26nbsp%3Bfor%20the%20database%20name%2C%20resource%20group%20name%2C%20and%20managed%20instance%20name%20correct%3F%3C%2FLI%3E%0A%3CLI%3EIn%20case%20of%20autocomplete%2C%20did%20you%20specify%20a%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Evalid%20filename%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%20last%20backup%20file%3F%3C%2FLI%3E%0A%3CLI%3EIn%20case%20of%20scripting%20the%20LRS%20start%20in%20continuous%20mode%2C%20to%20have%20the%20PowerShell%20return%20execution%20immediately%20to%20the%20next%20script%20command%2C%20did%20you%20start%20it%20as%20a%20background%20process%20with%20%22-AsJob%22%20switch%3F%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EDisclaimer%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPlease%20note%20that%20products%20and%20options%20presented%20in%20this%20article%20are%20subject%20to%20change.%20This%20article%20reflects%20the%20user-initiated%20manual%20failover%20option%20available%20for%20Azure%20SQL%20Managed%20Instance%20in%20February%2C%202021.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%225%22%3EClosing%20remarks%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20find%20this%20article%20useful%2C%20please%20like%20it%20on%20this%20page%20and%20share%20through%20social%20media.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20share%20this%20article%2C%20you%20can%20use%20the%20Share%20button%20below%2C%20or%20this%20short%20link%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmi-logshipping%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fmi-logshipping%3C%2FA%3E.%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2144303%22%20slang%3D%22en-US%22%3E%3CP%3EUse%20Log%20Replay%20Service%20(log%20shipping)%20to%20build%20custom%20migration%20solutions%20to%20SQL%20Managed%20Instance%20in%20cases%20when%20Data%20Migration%20Service%20(DMS)%20cannot%20be%20used.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22log-replay-service-conceptual.png%22%20style%3D%22width%3A%20643px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F255623i24FCFEAD8DAABBBA%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22log-replay-service-conceptual.png%22%20alt%3D%22log-replay-service-conceptual.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2144303%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Managed%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jul 21 2021 10:48 AM
Updated by: