Skip to content

Commit 77e1041

Browse files
committed
Merge branch 'main' into release-arc-security
2 parents c9a5c6a + 504c3a1 commit 77e1041

7 files changed

Lines changed: 82 additions & 77 deletions

File tree

azure-sql/managed-instance/log-replay-service-migrate.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,20 +543,22 @@ az sql midb log-replay start <required parameters> &
543543

544544
[Az.SQL 4.0.0 and later](https://www.powershellgallery.com/packages/Az.Sql/4.0.0) provides a detailed progress report. Review [Managed Database Restore Details - Get](/rest/api/sql/managed-database-restore-details/get) for a sample output.
545545

546-
To monitor migration progress through PowerShell, use the following command:
546+
To monitor ongoing migration progress through PowerShell, use the following command:
547547

548548
```PowerShell
549549
Get-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "ResourceGroup01" `
550550
-InstanceName "ManagedInstance01" `
551551
-Name "ManagedDatabaseName"
552552
```
553553

554-
To monitor migration progress through the Azure CLI, use the following command:
554+
To monitor ongoing migration progress through the Azure CLI, use the following command:
555555

556556
```CLI
557557
az sql midb log-replay show -g mygroup --mi myinstance -n mymanageddb
558558
```
559559

560+
To track additional details on a failed request, use the PowerShell command [Get-AzSqlInstanceOperation](/powershell/module/az.sql/get-azsqlinstanceoperation) or use Azure CLI command [az sql mi op show](/cli/azure/sql/mi/op?view=azure-cli-latest#az-sql-mi-op-show).
561+
560562
## Stop the migration (optional)
561563

562564
If you need to stop the migration, use PowerShell or the Azure CLI. Stopping the migration deletes the restoring database on your managed instance, so resuming the migration won't be possible.
@@ -599,11 +601,16 @@ az sql midb log-replay complete -g mygroup --mi myinstance -n mymanageddb --last
599601

600602
## Troubleshoot LRS issues
601603

602-
After you start LRS, use either of the following monitoring cmdlets to see the status of the operation:
604+
After you start LRS, use either of the following monitoring cmdlets to see the status of the ongoing operation:
603605

604606
* For PowerShell: `get-azsqlinstancedatabaselogreplay`
605607
* For the Azure CLI: `az_sql_midb_log_replay_show`
606608

609+
To review details about a failed operation:
610+
611+
* For PowerShell: [Get-AzSqlInstanceOperation](/powershell/module/az.sql/get-azsqlinstanceoperation)
612+
* For Azure CLI: [az sql mi op show](/cli/azure/sql/mi/op?view=azure-cli-latest#az-sql-mi-op-show)
613+
607614
If LRS fails to start after some time and you get an error, check for the most common issues:
608615

609616
- Does an existing database on your managed instance have the same name as the one you're trying to migrate from your SQL Server instance? Resolve this conflict by renaming one of the databases.

azure-sql/managed-instance/log-replay-service-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Use continuous mode migration when you don't have the entire backup chain in adv
103103
| :----------------------------- | :------------------------- |
104104
| **1. Copy database backups from the SQL Server instance to the Blob Storage account**. | Copy full, differential, and log backups from the SQL Server instance to the Blob Storage container by using [AzCopy](/azure/storage/common/storage-use-azcopy-v10) or [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer/). <br /><br />Use any file names. LRS doesn't require a specific file-naming convention.<br /><br />Use a separate folder for each database when you're migrating several databases. |
105105
| **2. Start LRS in the cloud**. | You can start the service with PowerShell ([start-azsqlinstancedatabaselogreplay](/powershell/module/az.sql/start-azsqlinstancedatabaselogreplay)) or the Azure CLI ([az_sql_midb_log_replay_start cmdlets](/cli/azure/sql/midb/log-replay#az-sql-midb-log-replay-start)). Choose between autocomplete or continuous migration mode. <br /><br /> Start LRS separately for each database that points to a backup folder on the Blob Storage account. <br /><br /> After the service starts, it takes backups from the Blob Storage container and starts restoring them to SQL Managed Instance.<br /><br /> When LRS is started in autocomplete mode, it restores all backups through the specified last backup file. All backup files must be uploaded in advance, and it isn't possible to add any new backup files while the migration is in progress. This mode is recommended for passive workloads for which no data catch-up is required. <br /><br /> When LRS is started in continuous mode, it restores all the backups that were initially uploaded and then watches for any new files that were uploaded to the folder. The service continuously applies logs based on the log sequence number (LSN) chain until it's stopped manually. We recommend this mode for active workloads for which data catch-up is required. |
106-
| **2.1. Monitor the operation's progress**. | You can monitor the progress of the restore operation with PowerShell ([get-azsqlinstancedatabaselogreplay](/powershell/module/az.sql/get-azsqlinstancedatabaselogreplay)) or the Azure CLI ([az_sql_midb_log_replay_show cmdlets](/cli/azure/sql/midb/log-replay#az-sql-midb-log-replay-show)). |
106+
| **2.1. Monitor the operation's progress**. | You can monitor the progress of the ongoing restore operation with PowerShell ([get-azsqlinstancedatabaselogreplay](/powershell/module/az.sql/get-azsqlinstancedatabaselogreplay)) or the Azure CLI ([az_sql_midb_log_replay_show cmdlets](/cli/azure/sql/midb/log-replay#az-sql-midb-log-replay-show)). To track additional details on a failed request, use the PowerShell command [Get-AzSqlInstanceOperation](/powershell/module/az.sql/get-azsqlinstanceoperation) or use Azure CLI command [az sql mi op show](/cli/azure/sql/mi/op?view=azure-cli-latest#az-sql-mi-op-show). |
107107
| **2.2. Stop the operation if required (optional)**. | If you need to stop the migration process, use PowerShell ([stop-azsqlinstancedatabaselogreplay](/powershell/module/az.sql/stop-azsqlinstancedatabaselogreplay)) or the Azure CLI ([az_sql_midb_log_replay_stop](/cli/azure/sql/midb/log-replay#az-sql-midb-log-replay-stop)). <br /><br /> Stopping the operation deletes the database that you're restoring to SQL Managed Instance. After you stop an operation, you can't resume LRS for a database. You need to restart the migration process from the beginning. |
108108
| **3. Cut over to the cloud when you're ready**. | If LRS was started in autocomplete mode, the migration automatically finishes after the specified last backup file has been restored. <br /><br /> If LRS was started in continuous mode, stop the application and workload. Take the last log-tail backup and upload it to the Azure Blob Storage deployment. Ensure that the last log-tail backup has been restored on the managed instance. Complete the cutover by initiating an LRS `complete` operation with PowerShell ([complete-azsqlinstancedatabaselogreplay](/powershell/module/az.sql/complete-azsqlinstancedatabaselogreplay)) or the Azure CLI [az_sql_midb_log_replay_complete](/cli/azure/sql/midb/log-replay#az-sql-midb-log-replay-complete). This operation stops LRS and brings the database online for read/write workloads on SQL Managed Instance. <br /><br /> Repoint the application connection string from the SQL Server instance to SQL Managed Instance. You need to orchestrate this step yourself, either through a manual connection string change in your application, or automatically (for example, if your application can read the connection string from a property, or a database). |
109109

0 commit comments

Comments
 (0)