You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cleanup process depends on the index layout of the history table. It is important to notice that *only history tables with a clustered index (B-tree or columnstore) can have finite retention policy configured*. A background task is created to perform aged data cleanup for all temporal tables with finite retention period.
103
103
Cleanup logic for the rowstore (B-tree) clustered index deletes aged row in smaller chunks (up to 10K) minimizing pressure on database log and IO subsystem. Although cleanup logic utilizes required B-tree index, order of deletions for the rows older than retention period cannot be firmly guaranteed. Hence, *do not take any dependency on the cleanup order in your applications*.
Copy file name to clipboardExpand all lines: azure-sql/includes/auto-failover-group-terminology.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,9 @@ ms.date: 03/01/2022
30
30
- Relocate the databases to a different region
31
31
- Return the databases to the primary region after the outage has been mitigated (failback)
32
32
33
-
>
34
33
> [!NOTE]
35
-
> During planned failovers or disaster recovery drills, the primary databases and the target secondary geo-replica databases should have matching service tiers. If a secondary database has lower memory than the primary database, you may encounter out-of-memory issues, preventing full recovery after failover. If this happens, the affected geo-secondary database may be put into a limited read-only mode called **checkpoint-only mode**. To avoid this, upgrade the service tier of the secondary database to match the primary database during the planned failover, or drill. Service tier upgrades can be size-of-data operations, and take a while to finish.
36
-
>
34
+
> If a database contains in-memory OLTP objects, the primary databases and the target secondary geo-replica databases should have matching service tiers, as in-memory OLTP objects are always hydrated in memory. A lower service tier on the target geo-replica databasemay result in out-of-memory issues. If this happens, the affected geo-secondary database replica may be put into a limited read-only mode called **in-memory OLTP checkpoint-only** mode. Read-only table queries are allowed, but read-only in-memory OLTP table queries are disallowed on the affected geo-secondary database replica. Planned failover is blocked if all replicas in the geo-secondary database are in checkpoint only mode. Unplanned failover may fail due to out-of-memory issues. To avoid this, upgrade the service tier of the secondary database to match the primary database during the planned failover, or drill. Service tier upgrades can be size-of-data operations, and may take a while to finish.
35
+
37
36
-**Unplanned failover**
38
37
39
38
Unplanned or forced failover immediately switches the secondary to the primary role without waiting for recent changes to propagate from the primary. This operation may result in data loss. Unplanned failover is used as a recovery method during outages when the primary is not accessible. When the outage is mitigated, the old primary will automatically reconnect and become a new secondary. A planned failover may be executed to fail back, returning the replicas to their original primary and secondary roles.
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/log-replay-service-migrate.md
+15-3Lines changed: 15 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.topic: how-to
9
9
author: danimir
10
10
ms.author: danil
11
11
ms.reviewer: mathoma
12
-
ms.date: 07/14/2022
12
+
ms.date: 07/15/2022
13
13
---
14
14
15
15
# Migrate databases from SQL Server to SQL Managed Instance by using Log Replay Service (Preview)
@@ -84,6 +84,14 @@ Continuous mode migration needs to be used when you don't have the entire backup
84
84
|**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. |
85
85
| **3. Cut over to the cloud when you're ready**. | If LRS was started in autocomplete mode, the migration will automatically complete once 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 Azure Blob Storage. Ensure that the last log-tail backup has been restored on 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 and write workloads on SQL Managed Instance. <br /><br /> Repoint the application connection string from SQL Server to SQL Managed Instance. You'll 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). |
86
86
87
+
### Migrating large databases
88
+
89
+
If migrating large databases of several terrabytes in size, consider the following:
90
+
- Single LRS job can run for a maximum of 30 days. On expiry of this timeframe, the job will be automatically canceled.
91
+
- In the case of long-running jobs, system updates will interrupt and prolong migration jobs. It's highly recommended to use [maintenance window](../database/maintenance-window.md) to schedule planned system updates. Plan your migration around the scheduled maintenance window.
92
+
- Migration jobs interrupted by system updates will be automatically suspended and resumed for General Purpose managed instances, and restarted for Business Critical managed instances. These updates will affect the timeframe of your migration.
93
+
- To increase the upload speed of your SQL Server backup files to Azure Blob Storage, provided there's a sufficient network bandwidth from your infrastructure, consider using parallelization with multiple threads.
94
+
87
95
## Getting started
88
96
89
97
Consider the requirements in this section to get started with using LRS to migrate.
@@ -128,15 +136,16 @@ We recommend the following best practices:
128
136
- Split full and differential backups into multiple files, instead of using a single file.
129
137
- Enable backup compression to help the network transfer speeds.
130
138
- Use Cloud Shell to run PowerShell or CLI scripts, because it will always be updated to the latest cmdlets released.
131
-
- Configure [maintenance window](../database/maintenance-window.md) to allow scheduling of system updates at a specific day/time. This configuration will help achieve a more predictable time of database migrations.
139
+
- Configure [maintenance window](../database/maintenance-window.md) to allow scheduling of system updates at a specific day/time. This configuration will help achieve a more predictable time of database migrations, as impactful system upgrades interrupt migration in progress.
140
+
- Plan to complete a single LRS migration job within a maximum of 30 days. On expiry of this timeframe, the LRS job will be automatically canceled.
132
141
133
142
> [!IMPORTANT]
134
143
> - You can't use databases being restored through LRS until the migration process completes.
135
144
> - LRS doesn't support read-only access to databases during the migration.
136
145
> - After the migration completes, the migration process is finalized and can't be resumed with additional differential backups.
137
146
138
147
> [!TIP]
139
-
> System updates on managed instance will take precedence over database migrations in progress. All pending LRS migrations in case of a system update on Managed Instance will be suspended and resumed once the update has been applied. This system behavior might prolong migration time, especially in cases of very large databases. To achieve a predictable time of database migrations, consider configuring [maintenance window](../database/maintenance-window.md) allowing scheduling of system updates at a specific day/time, and consider running and completing migration jobs outside of the scheduled maintenance window day/time.
148
+
> System updates on managed instance will take precedence over database migrations in progress. All pending LRS migrations in case of a system update on Managed Instance will be suspended and resumed once the update has been applied. This system behavior might prolong migration time, especially in cases of large databases. To achieve a predictable time of database migrations, consider configuring [maintenance window](../database/maintenance-window.md) allowing scheduling of system updates at a specific day/time, and consider running and completing migration jobs outside of the scheduled maintenance window day/time.
140
149
>
141
150
142
151
## Steps to migrate
@@ -349,6 +358,8 @@ When you use autocomplete mode, the migration completes automatically when the l
349
358
350
359
When you use continuous mode, the service continuously scans Azure Blob Storage folder and restores any new backup files that keep getting added while migration is in progress. The migration completes only after the manual cutover has been requested. Continuous mode migration needs to be used when you don't have the entire backup chain in advance, and when you plan to add new backup files once the migration is in progress. This mode is recommended for active workloads for which data catch-up is required.
351
360
361
+
Plan to complete a single LRS migration job within a maximum of 30 days. On expiry of this timeframe, the LRS job will be automatically canceled.
362
+
352
363
> [!NOTE]
353
364
> When migrating multiple databases, LRS must be started separately for each database pointing to the full URI path of Azure Blob storage container and the individual database folder.
354
365
>
@@ -498,6 +509,7 @@ Consider the following limitations of LRS:
498
509
- If using autocomplete mode, the entire backup chain needs to be available in advance on Azure Blob Storage. 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.
499
510
- LRS must be started separately for each database pointing to the full URI path containing an individual database folder.
500
511
- LRS can support up to 100 simultaneous restore processes per single managed instance.
512
+
- Single LRS job can run for the maximum of 30 days, after which it will be automatically canceled.
501
513
502
514
> [!TIP]
503
515
> If you require database to be R/O accessible during the migration, a much longer timeframe to perform the migration, and the best possible minimum downtime, consider the [link feature for Managed Instance](managed-instance-link-feature-overview.md) as a recommended migration solution in these cases.
> *[SQL Server 2014](automated-backup-sql-2014.md)
26
-
> *[SQL Server 2016/2017](automated-backup.md)
26
+
> *[SQL Server 2016 and later](automated-backup.md)
27
27
28
28
Automated Backup automatically configures [Managed Backup to Microsoft Azure](/sql/relational-databases/backup-restore/sql-server-managed-backup-to-microsoft-azure) for all existing and new databases on an Azure VM running SQL Server 2014 Standard or Enterprise. This enables you to configure regular database backups that utilize durable Azure Blob storage. Automated Backup depends on the [SQL Server infrastructure as a service (IaaS) Agent Extension](sql-server-iaas-agent-extension-automate-management.md).
29
29
@@ -253,4 +253,4 @@ You can find additional backup and restore guidance for SQL Server on Azure VMs
253
253
254
254
For information about other available automation tasks, see [SQL Server IaaS Agent Extension](sql-server-iaas-agent-extension-automate-management.md).
255
255
256
-
For more information about running SQL Server on Azure VMs, see [SQL Server on Azure virtual machines overview](sql-server-on-azure-vm-iaas-what-is-overview.md).
256
+
For more information about running SQL Server on Azure VMs, see [SQL Server on Azure virtual machines overview](sql-server-on-azure-vm-iaas-what-is-overview.md).
> *[SQL Server 2014](automated-backup-sql-2014.md)
26
-
> *[SQL Server 2016 +](automated-backup.md)
26
+
> *[SQL Server 2016 and later](automated-backup.md)
27
27
28
28
Automated Backup v2 automatically configures [Managed Backup to Microsoft Azure](/sql/relational-databases/backup-restore/sql-server-managed-backup-to-microsoft-azure) for all existing and new databases on an Azure VM running SQL Server 2016 or later Standard, Enterprise, or Developer editions. This enables you to configure regular database backups that utilize durable Azure blob storage. Automated Backup v2 depends on the [SQL Server infrastructure as a service (IaaS) Agent Extension](sql-server-iaas-agent-extension-automate-management.md).
Copy file name to clipboardExpand all lines: azure-sql/virtual-machines/windows/backup-restore.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ To restore a database, you must locate the required backup file(s) in the storag
52
52
53
53
For more information on how to configure Automated Backup for SQL VMs, see one of the following articles:
54
54
55
-
-**SQL Server 2016/2017**: [Automated Backup v2 for Azure Virtual Machines](automated-backup.md)
55
+
-**SQL Server 2016 and later**: [Automated Backup v2 for Azure Virtual Machines](automated-backup.md)
56
56
-**SQL Server 2014**: [Automated Backup for SQL Server 2014 Virtual Machines](automated-backup-sql-2014.md)
57
57
58
58
## <aid="azbackup"></a> Azure Backup for SQL VMs
@@ -101,8 +101,8 @@ Beginning with SQL Server 2012 SP1 CU2, you can back up and restore directly to
101
101
102
102
For more information, see the one of the following articles based on your version of SQL Server:
103
103
104
-
-**SQL Server 2016/2017**: [SQL Server Backup to URL](/sql/relational-databases/backup-restore/sql-server-backup-and-restore-with-microsoft-azure-blob-storage-service)
105
-
-**SQL Server 2014**: [SQL Server 2014 Backup to URL](/sql/relational-databases/backup-restore/sql-server-backup-and-restore-with-microsoft-azure-blob-storage-service?viewFallbackFrom=sql-server-2014)
104
+
-**SQL Server 2016 and later**: [SQL Server Backup to URL](/sql/relational-databases/backup-restore/sql-server-backup-and-restore-with-microsoft-azure-blob-storage-service)
105
+
-**SQL Server 2014**: [SQL Server 2014 Backup to URL](/previous-versions/sql/2014/relational-databases/backup-restore/sql-server-backup-to-url?view=sql-server-2014)
106
106
-**SQL Server 2012**: [SQL Server 2012 Backup to URL](/previous-versions/sql/sql-server-2012/jj919148(v=sql.110))
107
107
108
108
### Managed Backup
@@ -114,7 +114,7 @@ Beginning in SQL Server 2016, Managed Backup got additional options for scheduli
114
114
For more information, see one of the following articles based on your version of SQL Server:
115
115
116
116
-[Managed Backup to Microsoft Azure for SQL Server 2016 and later](/sql/relational-databases/backup-restore/sql-server-managed-backup-to-microsoft-azure)
117
-
-[Managed Backup to Microsoft Azure for SQL Server 2014](/sql/relational-databases/backup-restore/sql-server-managed-backup-to-microsoft-azure?viewFallbackFrom=sql-server-2014)
117
+
-[Managed Backup to Microsoft Azure for SQL Server 2014](/previous-versions/sql/2014/relational-databases/backup-restore/sql-server-managed-backup-to-microsoft-azure?view=sql-server-2014)
118
118
119
119
## Decision matrix
120
120
@@ -132,7 +132,7 @@ The following table summarizes the capabilities of each backup and restore optio
0 commit comments