Skip to content

Commit fb6e3d6

Browse files
committed
Edited link feature best practices
1 parent 5d7f2fe commit fb6e3d6

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

articles/azure-sql/managed-instance/link-feature-best-practices.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ ms.date: 03/10/2022
1616
# Best practices with link feature for Azure SQL Managed Instance (preview)
1717
[!INCLUDE[appliesto-sqlmi](../includes/appliesto-sqlmi.md)]
1818

19-
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.
2020

2121
> [!NOTE]
2222
> The link feature for Azure SQL Managed Instance is currently in preview.
2323
24-
## Taking log backups regularly
24+
## Take log backups regularly
2525

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.
2727

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.
3028

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:
34+
3235
```sql
3336

3437
USE [<DatabaseName>]
@@ -48,19 +51,27 @@ NAME = N'<Description>', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 1
4851
END
4952
```
5053

51-
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+
5257
```sql
5358
DBCC SQLPERF(LOGSPACE);
5459
```
5560

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**:
5762

5863
:::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":::
5964

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.
6170

6271
## Next steps
6372

73+
To get started with the link feature, [prepare your environment for replication](managed-instance-link-preparation.md).
74+
6475
For more information on the link feature, see the following articles:
6576

6677
- [Managed Instance link – overview](link-feature.md).

articles/azure-sql/managed-instance/managed-instance-link-preparation.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ ms.date: 03/07/2022
1919

2020
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.
2121

22-
Managed Instance link is currently in public preview.
22+
> [!NOTE]
23+
> The link feature for Azure SQL Managed Instance is currently in preview.
2324
2425
## Prerequisites
2526

@@ -82,7 +83,7 @@ If the availability groups feature is not enabled, follow these steps to enable
8283

8384
1. Select **OK** on the dialog box to restart the SQL Server service.
8485

85-
### Enable feature startup trace flags
86+
### Enable startup trace flags
8687

8788
To optimize Managed Instance link performance, enabling trace flags `-T1800` and `-T9567` at startup is highly recommended:
8889

articles/azure-sql/managed-instance/managed-instance-link-use-ssms-to-failover-database.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Failing over your database from your SQL Server instance to your SQL Managed Ins
2323

2424
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).
2525

26-
Managed Instance link is currently in public preview.
26+
> [!NOTE]
27+
> The link feature for Azure SQL Managed Instance is currently in preview.
2728
2829
## Prerequisites
2930

articles/azure-sql/managed-instance/managed-instance-link-use-ssms-to-replicate-database.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ This article teaches you to use the [Managed Instance link feature](link-feature
2121

2222
Before configuring replication for your database through the link feature, make sure you've [prepared your environment](managed-instance-link-preparation.md).
2323

24-
Managed Instance link is currently in public preview.
24+
> [!NOTE]
25+
> The link feature for Azure SQL Managed Instance is currently in preview.
2526
2627
## Prerequisites
2728

articles/azure-sql/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,14 +1229,16 @@
12291229
- name: Migrate TDE cert
12301230
href: managed-instance/tde-certificate-migrate.md
12311231

1232-
- name: Managed Instance link
1232+
- name: Managed Instance link feature
12331233
items:
12341234
- name: Prepare environment for link
12351235
href: managed-instance/managed-instance-link-preparation.md
12361236
- name: Replicate databases in SSMS
12371237
href: managed-instance/managed-instance-link-use-ssms-to-replicate-database.md
12381238
- name: Failover databases in SSMS
12391239
href: managed-instance/managed-instance-link-use-ssms-to-failover-database.md
1240+
- name: Best practices
1241+
href: managed-instance/link-feature-best-practices.md
12401242

12411243
- name: Configure business continuity
12421244
items:

0 commit comments

Comments
 (0)