Skip to content

Commit a80684e

Browse files
authored
Merge pull request #25995 from MashaMSFT/202302_lrsbs
adding storage firewall
2 parents 3cbcef9 + 2215b24 commit a80684e

6 files changed

Lines changed: 40 additions & 6 deletions

File tree

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

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ When you're using LRS, consider the following best practices:
7575
- Enable backup compression to help the network transfer speeds.
7676
- Use Cloud Shell to run PowerShell or CLI scripts, because it will always be updated to use the latest released cmdlets.
7777
- Configure a [maintenance window](../database/maintenance-window.md) to allow scheduling of system updates at a specific day and time. This configuration helps achieve a more predictable time for database migrations, because system upgrades can interrupt in-progress migrations.
78-
- Plan to complete a single LRS migration job within a maximum of 30 days. On expiration of this time frame, the LRS job will be automatically canceled.
78+
- Plan to complete a single LRS migration job within a maximum of 30 days. On expiration of this time frame, the LRS job is automatically canceled.
7979
- For a faster database restore, enable `CHECKSUM` when you're taking your backups. SQL Managed Instance performs an integrity check on backups without `CHECKSUM`, which increases restore time.
8080

8181
System updates for SQL Managed Instance take precedence over database migrations in progress. During a system update on an instance, all pending LRS migrations are suspended and resumed only after the update is applied. This system behavior might prolong migration time, especially for large databases.
@@ -116,6 +116,40 @@ You use an Azure Blob Storage account as intermediary storage for backup files b
116116
1. [Create a storage account](/azure/storage/common/storage-account-create?tabs=azure-portal).
117117
1. [Create a blob container](/azure/storage/blobs/storage-quickstart-blobs-portal) inside the storage account.
118118

119+
### Configure Azure storage behind a firewall
120+
121+
Using Azure Blob storage that's protected behind a firewall is supported, but requires additional configuration. To enable read / write access to Azure Storage with Azure Firewall turned on, you have to add the subnet of the SQL managed instance to the firewall rules of the vNet for the storage account by using MI subnet delegation and the Storage service endpoint. The storage account and the managed instance must be in the same region, or two paired regions.
122+
123+
If your Azure storage is behind a firewall, you] may see the following message in the SQL managed instance error log:
124+
125+
```
126+
Audit: Storage access denied user fault. Creating an email notification:
127+
```
128+
129+
This generates an email that notifies you that auditing for the SQL managed instance is failing to write audit logs to the storage account. If you see this error, or receive this email, follow the steps in this section to configure your firewall.
130+
131+
To configure the firewall, follow these steps:
132+
133+
1. Go to your managed instance in the [Azure portal](https://portal.azure.com) and select the subnet to open the **Subnets** page.
134+
135+
:::image type="content" source="media/log-replay-service-migrate/sql-managed-instance-overview-page.png" alt-text="Screenshot of the SQL managed instance Overview page of the Azure portal, with the subnet selected.":::
136+
137+
1. On the **Subnets** page, select the name of the subnet to open the subnet configuration page.
138+
139+
:::image type="content" source="media/log-replay-service-migrate/sql-managed-instance-subnet.png" alt-text="Screenshot of the SQL managed instance Subnet page of the Azure portal, with the subnet selected.":::
140+
141+
1. Under **Subnet delegation**, choose **Microsoft.Sql/managedInstances** from the **Delegate subnet to a service** drop-down menu. Wait about an hour for permissions to propagate, and then, under **Service endpoints**, choose **Microsoft.Storage** from the **Services** drop-down.
142+
143+
:::image type="content" source="media/log-replay-service-migrate/sql-managed-instance-subnet-configuration.png" alt-text="Screenshot of the SQL managed instance Subnet configuration page of the Azure portal.":::
144+
145+
1. Next, go to your storage account in the Azure portal, select **Networking** under **Security + networking** and then choose the **Firewalls and virtual networks** tab.
146+
1. On the **Firewalls and virtual networks** tab for your storage account, choose **+Add existing virtual network** to open the **Add networks** page.
147+
148+
:::image type="content" source="media/log-replay-service-migrate/storage-neteworking.png" alt-text="Screenshot of the Storage Account Networking page of the Azure portal, with Add existing virtual network selected.":::
149+
150+
1. Select the appropriate subscription, virtual network, and managed instance subnet from the drop-down menus and then select **Add** to add the virtual network of the SQL managed instance to the storage account.
151+
152+
119153
## Authenticate to your Blob Storage account
120154

121155
Use either a SAS token or a managed identity to access your Azure Blob Storage account.
@@ -383,7 +417,7 @@ When you use autocomplete mode, the migration finishes automatically when the la
383417

384418
When you use continuous mode, the service continuously scans the Azure Blob Storage folder and restores any new backup files that get added while migration is in progress. The migration finishes only after the manual cutover has been requested. You need to use continuous mode migration when you don't have the entire backup chain in advance, and when you plan to add new backup files after the migration is in progress. We recommend this mode for active workloads for which data catch-up is required.
385419

386-
Plan to complete a single LRS migration job within a maximum of 30 days. When this time expires, the LRS job will be automatically canceled.
420+
Plan to complete a single LRS migration job within a maximum of 30 days. When this time expires, the LRS job is automatically canceled.
387421

388422
> [!NOTE]
389423
> When you're migrating multiple databases, LRS must be started separately for each database and point to the full URI path of the Azure Blob Storage container and the individual database folder.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ Consider the following limitations of LRS:
147147
- You have to configure a [maintenance window](../database/maintenance-window.md) to allow scheduling of system updates at a specific day and time. Plan to run and finish migrations outside the scheduled maintenance window.
148148
- Database backups that are taken without `CHECKSUM` take longer to restore than do database backups with `CHECKSUM` enabled.
149149
- The shared access signature (SAS) token that LRS uses must be generated for the entire Azure Blob Storage container, and it must have Read and List permissions only. For example, if you grant Read, List, and Write permissions, LRS won't be able to start because of the extra Write permission.
150-
- Using SAS tokens created with permissions that are set through defining a [stored access policy](/rest/api/storageservices/define-stored-access-policy) isn't supported.
151-
152-
Follow the instructions in this article to manually specify Read and List permissions for the SAS token.
153-
150+
- Using SAS tokens created with permissions that are set through defining a [stored access policy](/rest/api/storageservices/define-stored-access-policy) isn't supported. Follow the instructions in this article to manually specify Read and List permissions for the SAS token.
154151
- Backup files that contain percent sign (%) or dollar sign ($) characters in the file name can't be consumed by LRS. Consider renaming such file names.
155152
- You must place backup files for different databases in separate folders on the Blob Storage account in a flat-file structure. Nesting folders inside database folders isn't supported.
156153
- If you're using autocomplete mode, the entire backup chain needs to be available in advance on the Blob Storage account. It isn't possible to add new backup files in autocomplete mode. Use continuous mode if you need to add new backup files while migration is in progress.
157154
- You must start LRS separately for each database that points to the full URI path that contains an individual database folder.
158155
- LRS can support up to 100 simultaneous restore processes per single managed instance.
159156
- A single LRS job can run for a maximum of 30 days, after which it will be automatically canceled.
157+
- While it's possible to use an Azure Storage account behind a firewall, extra configuration is necessary, and the storage account and managed instance must either be in the same region, or two paired regions. Review [Configure firewall](log-replay-service-migrate.md#configure-azure-storage-behind-a-firewall) to learn more.
158+
159+
160160

161161
> [!TIP]
162162
> If you require a database to be read-only accessible during the migration, with a much longer time frame for performing the migration and with minimal downtime, consider using the [Azure SQL Managed Instance link](managed-instance-link-feature-overview.md) feature as a recommended migration solution.
138 KB
Loading
101 KB
Loading
90.8 KB
Loading
100 KB
Loading

0 commit comments

Comments
 (0)