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
This article outlines best practices with using the link feature for Azure SQL Managed Instance. The link feature for Azure SQL Managed Instance connects your SQL Servers hosted anywhere to SQL Managed Instance, providing near real-time data replication to the cloud.
19
+
This article outlines best practices when using the link feature for Azure SQL Managed Instance. The link feature for Azure SQL Managed Instance connects your SQL Servers hosted anywhere to SQL Managed Instance, providing near real-time data replication to the cloud.
20
20
21
21
> [!NOTE]
22
22
> The link feature for Azure SQL Managed Instance is currently in preview.
23
23
24
-
## Taking log backups regularly
24
+
## Take log backups regularly
25
25
26
-
The link feature replicates data using [Distributed availability groups](https://docs.microsoft.com/sql/database-engine/availability-groups/windows/distributed-availability-groups) concept based on SQL Server Always On availability groups technology stack. Data replication with distributed availability groups is based on replicating transaction log records. No transaction log records can be truncated from the database on primary instance until they're distributed to the database on secondary instance. In case that transaction log record distribution is slow or blocked due to network connection issue, the log file will keep growing. Growth speed depends on the intensity of workload and the network speed. If there's a prolonged network connection outage and heavy workload on primary instance, the log file may take all available storage space.
26
+
The link feature replicates data using the [Distributed availability groups](https://docs.microsoft.com/sql/database-engine/availability-groups/windows/distributed-availability-groups) concept based the Always On availability groups technology stack. Data replication with distributed availability groups is based on replicating transaction log records. No transaction log records can be truncated from the database on the primary instance until they're replicated to the database on the secondary instance. If transaction log record replication is slow or blocked due to network connection issues, the log file keeps growing on the primary instance. Growth speed depends on the intensity of workload and the network speed. If there's a prolonged network connection outage and heavy workload on primary instance, the log file may take all available storage space.
27
27
28
-
> [!IMPORTANT]
29
-
> To minimize risk of running out of space on your primary instance due to log file growth, make sure to keep the usual log file size under control by taking database log backups regularly. By taking log backups regularly, you make your database more resilient to unplanned log growth events. Consider scheduling daily log backup tasks using SQL Server Agent job.
30
28
31
-
You can use the following sample script for backing up log file. Replace the placeholders in the sample script with name of your database, path and name of the backup file, and the description, respectively:
29
+
To minimize the risk of running out of space on your primary instance due to log file growth, make sure to take database log backups regularly. By taking log backups regularly, you make your database more resilient to unplanned log growth events. Consider scheduling daily log backup tasks using SQL Server Agent job.
30
+
31
+
You can use a Transact-SQL (T-SQL) script to back up the log file, such as the sample provided in this section. Replace the placeholders in the sample script with name of your database, name and path of the backup file, and the description.
32
+
33
+
To backup your transaction log, use the following sample Transact-SQL (T-SQL) script:
At any time you can execute the following command to check the log space used by your databases:
54
+
55
+
Use the following Transact-SQL (T-SQL) command to check the log spaced used by your database:
56
+
52
57
```sql
53
58
DBCC SQLPERF(LOGSPACE);
54
59
```
55
60
56
-
The query output will look like in the example below for fictive database "tpcc":
61
+
The query output looks like the following example below for sample database **tpcc**:
57
62
58
63
:::image type="content" source="./media/link-feature-best-practices/database-log-file-size.png" alt-text="Screenshot with results of the command showing log file size and space used":::
59
64
60
-
In the example, database has used 76% of the log available, with absolute log file size of approximately 27 GB (27,971 MB). Thresholds for action may vary based on your workload, but its typically indication that log backup should be taken to truncate log file and free up some space.
65
+
In this example, the database has used 76% of the available log, with an absolute log file size of approximately 27 GB (27,971 MB). The thresholds for action may vary based on your workload, but its typically an indication that you should take a log backup to truncate log file and free up some space.
66
+
67
+
## Add start up trace flags
68
+
69
+
There are two trace flags (`-T1800` and `-T9567`) that, when added as start up parameters, can optimize the performance of data replication through the link. See [Enable start up trace flags](managed-instance-link-preparation.md#enable-feature-startup-trace-flags) to learn more.
61
70
62
71
## Next steps
63
72
73
+
To get started with the link feature, [prepare your environment for replication](managed-instance-link-preparation.md).
74
+
64
75
For more information on the link feature, see the following articles:
65
76
66
77
-[Managed Instance link – overview](link-feature.md).
Copy file name to clipboardExpand all lines: articles/azure-sql/managed-instance/managed-instance-link-preparation.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ ms.date: 03/07/2022
19
19
20
20
This article teaches you to prepare your environment for the [Managed Instance link feature](link-feature.md) so that you can replicate your databases from your instance of SQL Server to your instance of Azure SQL Managed Instance.
21
21
22
-
Managed Instance link is currently in public preview.
22
+
> [!NOTE]
23
+
> The link feature for Azure SQL Managed Instance is currently in preview.
23
24
24
25
## Prerequisites
25
26
@@ -82,7 +83,7 @@ If the availability groups feature is not enabled, follow these steps to enable
82
83
83
84
1. Select **OK** on the dialog box to restart the SQL Server service.
84
85
85
-
### Enable feature startup trace flags
86
+
### Enable startup trace flags
86
87
87
88
To optimize Managed Instance link performance, enabling trace flags `-T1800` and `-T9567` at startup is highly recommended:
Copy file name to clipboardExpand all lines: articles/azure-sql/managed-instance/managed-instance-link-use-ssms-to-failover-database.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ Failing over your database from your SQL Server instance to your SQL Managed Ins
23
23
24
24
Before failing over your database, make sure you've [prepared your environment](managed-instance-link-preparation.md) and [configured replication through the link feature](managed-instance-link-use-ssms-to-replicate-database.md).
25
25
26
-
Managed Instance link is currently in public preview.
26
+
> [!NOTE]
27
+
> The link feature for Azure SQL Managed Instance is currently in preview.
Copy file name to clipboardExpand all lines: articles/azure-sql/managed-instance/managed-instance-link-use-ssms-to-replicate-database.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,8 @@ This article teaches you to use the [Managed Instance link feature](link-feature
21
21
22
22
Before configuring replication for your database through the link feature, make sure you've [prepared your environment](managed-instance-link-preparation.md).
23
23
24
-
Managed Instance link is currently in public preview.
24
+
> [!NOTE]
25
+
> The link feature for Azure SQL Managed Instance is currently in preview.
0 commit comments