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 teaches you to prepare your environment for the Managed Instance link feature so that you can replicate your databases from your instance of SQL Server to your instance of Azure SQL Managed Instance.
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
22
Managed Instance link is currently in public preview.
23
23
@@ -28,13 +28,12 @@ To use the Managed Instance link feature, you need the following prerequisites:
28
28
- An active Azure subscription. If you don't have one, [create a free account](https://azure.microsoft.com/free/).
29
29
-[SQL Server 2019 Enterprise or Developer edition](https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2019?filetype=EXE), starting with [CU15 (15.0.4198.2)](https://support.microsoft.com/topic/kb5008996-cumulative-update-15-for-sql-server-2019-4b6a8ee9-1c61-482d-914f-36e429901fb6).
30
30
- An instance of Azure SQL Managed Instance. [Get started](instance-create-quickstart.md) if you don't have one.
31
-
-[SQL Server Management Studio (SSMS) v18.11 or later](/sql/ssms/download-sql-server-management-studio-ssms).
32
-
- Network connectivity between SQL Server and SQL Managed Instance using either [Azure ExpressRoute](../../expressroute/expressroute-howto-circuit-portal-resource-manager.md), [Virtual network peering](../../virtual-network/virtual-network-peering-overview.md), or [VPN gateways](../../vpn-gateway/tutorial-create-gateway-portal.md).
31
+
33
32
34
33
35
34
## Prepare your SQL Server instance
36
35
37
-
To prepare your SQL Server instance, you need to validate you're on the minimum supported version, you've enabled the availability group feature, and you've enabled the proper traceflags at startup. You may need to restart your SQL Server instance after making any of these changes.
36
+
To prepare your SQL Server instance, you need to validate you're on the minimum supported version, you've enabled the availability group feature, and you've added the proper trace flags at startup. You will need to restart SQL Server for these changes to take effect.
38
37
39
38
### Install CU15 (or higher)
40
39
@@ -76,16 +75,13 @@ If the availability groups feature is not enabled, follow these steps to enable
76
75
77
76
:::image type="content" source="./media/managed-instance-link-preparation/sql-server-configuration-manager-sql-server-properties.png" alt-text="Screenshot showing S Q L Server configuration manager.":::
78
77
79
-
1. Go to the **Always On High Availability** tab.
78
+
1. Go to the **Always On Availability Groups** tab.
80
79
1. Select the checkbox to enable **Always On Availability Groups**. Select **OK**:
81
80
82
81
:::image type="content" source="./media/managed-instance-link-preparation/always-on-availability-groups-properties.png" alt-text="Screenshot showing always on availability groups properties.":::
83
82
84
83
1. Select **OK** on the dialog box to restart the SQL Server service.
85
84
86
-
87
-
88
-
89
85
### Enable feature startup trace flags
90
86
91
87
To optimize Managed Instance link performance, enabling trace flags `-T1800` and `-T9567` at startup is highly recommended:
@@ -146,10 +142,7 @@ The following screenshot is an example of the expected outcome for a SQL Server
146
142
147
143
## Configure network connectivity
148
144
149
-
For the Managed Instance link to work, there must be network connectivity between the SQL Server and SQL Managed Instance. The network option that you choose depends on where your SQL Server resides - whether it's on-premises or on a virtual machine (VM).
150
-
151
-
152
-
Depending on where the SQL Server resides (on-premises, or in a VM), there are a couple of options to consider that will be covered in the following paragraphs.
145
+
For the Managed Instance link to work, there must be network connectivity between SQL Server and SQL Managed Instance. The network option that you choose depends on where your SQL Server resides - whether it's on-premises or on a virtual machine (VM).
153
146
154
147
### SQL Server on Azure VM
155
148
@@ -158,8 +151,7 @@ Deploying your SQL Server to an Azure VM in the same Azure virtual network (VNet
158
151
If your SQL Server on Azure VM is in a different VNet to your managed instance, either connect the two Azure VNets using [Global VNet peering](https://techcommunity.microsoft.com/t5/azure-sql/new-feature-global-vnet-peering-support-for-azure-sql-managed/ba-p/1746913), or configure [VPN gateways](../../vpn-gateway/tutorial-create-gateway-portal.md).
159
152
160
153
>[!NOTE]
161
-
> Global VNet peering is enabled by default on managed instances provisioned after November 2020. [Raise a support ticket](..//database/quota-increase-request) to enable Global VNet peering on older instances.
162
-
154
+
> Global VNet peering is enabled by default on managed instances provisioned after November 2020. [Raise a support ticket](../database/quota-increase-request.md) to enable Global VNet peering on older instances.
163
155
164
156
165
157
### SQL Server outside of Azure
@@ -174,17 +166,17 @@ If your SQL Server is hosted outside of Azure, establish a VPN connection betwee
174
166
175
167
### Open network ports between the environments
176
168
177
-
Port 5022 needs to allow inbound and outbound traffic between the SQL Server and the SQL Managed Instance. Port 5022 is the standard port used for availability groups, and cannot be changed or customized.
169
+
Port 5022 needs to allow inbound and outbound traffic between SQL Server and SQL Managed Instance. Port 5022 is the standard port used for availability groups, and cannot be changed or customized.
178
170
179
171
The following table describes port actions for each environment:
180
172
181
173
|Environment|What to do|
182
174
|:---|:-----|
183
-
|Source SQL Server (in Azure) | Open both inbound and outbound traffic on port 5022 for the network firewall to the entire subnet of the SQL Managed Instance. If necessary, do the same on the Windows firewall as well. Create an NSG rule in the virtual network hosting the VM that allows communication on port 5022. |
184
-
|Source SQL Server (outside of Azure) | Open both inbound and outbound traffic on port 5022 for the network firewall to the entire subnet of the SQL Managed Instance. If necessary, do the same on the Windows firewall as well. |
185
-
|Target SQL Managed Instance |[Create an NSG rule](../../virtual-network/manage-network-security-group.md#create-a-security-rule) in the Azure portal to allow inbound and outbound traffic from the IP address of the source SQL Server on port 5022 on the virtual network hosting the SQL Managed Instance. |
175
+
|SQL Server (in Azure) | Open both inbound and outbound traffic on port 5022 for the network firewall to the entire subnet of the SQL Managed Instance. If necessary, do the same on the Windows firewall as well. Create an NSG rule in the virtual network hosting the VM that allows communication on port 5022. |
176
+
|SQL Server (outside of Azure) | Open both inbound and outbound traffic on port 5022 for the network firewall to the entire subnet of the SQL Managed Instance. If necessary, do the same on the Windows firewall as well. |
177
+
|SQL Managed Instance |[Create an NSG rule](../../virtual-network/manage-network-security-group.md#create-a-security-rule) in the Azure portal to allow inbound and outbound traffic from the IP address of the SQL Server on port 5022 to the virtual network hosting the SQL Managed Instance. |
186
178
187
-
Use the following PowerShell script on the source SQL Server to open ports in the Windows Firewall:
179
+
Use the following PowerShell script on the host SQL Server to open ports in the Windows Firewall:
188
180
189
181
```powershell
190
182
New-NetFirewallRule -DisplayName "Allow TCP port 5022 inbound" -Direction inbound -Profile Any -Action Allow -LocalPort 5022 -Protocol TCP
@@ -199,13 +191,13 @@ Bidirectional network connectivity between SQL Server and SQL Managed Instance i
199
191
200
192
### Test connection from SQL Server to SQL Managed Instance
201
193
202
-
To check if SQL Server can reach Managed Instance use the `tnc` command in PowerShell from the SQL Server host machine. Replace <ManagedInstanceFQDN> with the fully qualified domain name of the Azure SQL Managed Instance.
194
+
To check if SQL Server can reach your SQL Managed Instance use the `tnc` command in PowerShell from the SQL Server host machine. Replace `<ManagedInstanceFQDN>` with the fully qualified domain name of the Azure SQL Managed Instance.
203
195
204
196
```powershell
205
197
tnc <ManagedInstanceFQDN> -port 5022
206
198
```
207
199
208
-
A successful test shows `TcpTestSucceeded = True`:
200
+
A successful test shows `TcpTestSucceeded : True`:
209
201
210
202
211
203
:::image type="content" source="./media/managed-instance-link-preparation/powershell-output-tnc-command.png" alt-text="Screenshot showing output of T N C command in PowerShell.":::
@@ -217,7 +209,7 @@ If the response is unsuccessful, verify the following:
217
209
218
210
#### Test connection from SQL Managed Instance to SQL Server
219
211
220
-
To check that the SQL Managed Instance can reach your SQL Server, create a test endpoint, and then use the SQL Agent to execute a PowerShell script with the `tnc` command pinging the SQL Server on port 5022.
212
+
To check that the SQL Managed Instance can reach your SQL Server, create a test endpoint, and then use the SQL Agent to execute a PowerShell script with the `tnc` command pinging SQL Server on port 5022.
221
213
222
214
223
215
@@ -321,12 +313,12 @@ If the connection is unsuccessful, verify the following:
321
313
322
314
## Install SSMS
323
315
324
-
SQL Server Management Studio (SSMS) v18.11 is the easiest way to use the Managed Instance Link. [Download SSMS version 18.11 or later](/sql/ssms/download-sql-server-management-studio-ssms) and install it to your client machine.
316
+
SQL Server Management Studio (SSMS) v18.11.1 is the easiest way to use the Managed Instance Link. [Download SSMS version 18.11.1 or later](/sql/ssms/download-sql-server-management-studio-ssms) and install it to your client machine.
325
317
326
318
After installation completes, open SSMS and connect to your supported SQL Server instance. Right-click a user database, and validate you see the "Azure SQL Managed Instance link" option in the menu:
327
319
328
320
:::image type="content" source="./media/managed-instance-link-preparation/ssms-database-context-menu-managed-instance-link.png" alt-text="Screenshot showing Azure S Q L Managed Instance link option in the context menu.":::
329
321
330
322
## Next steps
331
323
332
-
After your environment has been prepared, you're ready to start [replicating your database](managed-instance-link-use-ssms-to-replicate-database.md). To learn more, review [Link feature in Azure SQL Managed Instance](link-feature.md)
324
+
After your environment has been prepared, you're ready to start [replicating your database](managed-instance-link-use-ssms-to-replicate-database.md). To learn more, review [Link feature in Azure SQL Managed Instance](link-feature.md).
This article teaches you to use the Managed Instance link feature to failover your database from SQL Server to Azure SQL Managed Instance in SQL Server Management Studio (SSMS).
20
+
This article teaches you to use the [Managed Instance link feature](link-feature.md) to failover your database from SQL Server to Azure SQL Managed Instance in SQL Server Management Studio (SSMS).
21
21
22
-
Failing over your database from your SQL Server instance to your SQL Managed Instance breaks the link between the two databases, stopping replication, and leaving both databases in an independent state, both ready for read-write workloads.
22
+
Failing over your database from your SQL Server instance to your SQL Managed Instance breaks the link between the two databases, stopping replication, and leaving both databases in an independent state, ready for individual read-write workloads.
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
@@ -30,16 +30,15 @@ Managed Instance link is currently in public preview.
30
30
To failover your databases to Azure SQL Managed Instance, you need the following prerequisites:
31
31
32
32
- An active Azure subscription. If you don't have one, [create a free account](https://azure.microsoft.com/free/).
33
-
-[SQL Server 2019 Enterprise or Developer edition](https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2019), starting with [CU15](https://support.microsoft.com/topic/kb5008996-cumulative-update-15-for-sql-server-2019-4b6a8ee9-1c61-482d-914f-36e429901fb6).
33
+
-[SQL Server 2019 Enterprise or Developer edition](https://www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2019), starting with [CU15 (15.0.4198.2)](https://support.microsoft.com/topic/kb5008996-cumulative-update-15-for-sql-server-2019-4b6a8ee9-1c61-482d-914f-36e429901fb6).
34
34
- An instance of Azure SQL Managed Instance. [Get started](instance-create-quickstart.md) if you don't have one.
35
-
-[SQL Server Management Studio (SSMS) v18.11 or later](/sql/ssms/download-sql-server-management-studio-ssms).
36
-
- Network connectivity between SQL Server and SQL Managed Instance using either [Azure ExpressRoute](../../expressroute/expressroute-howto-circuit-portal-resource-manager.md), [Virtual network peering](../../virtual-network/virtual-network-peering-overview.md), or [VPN gateways](../../vpn-gateway/tutorial-create-gateway-portal.md).
35
+
-[SQL Server Management Studio (SSMS) v18.11.1 or later](/sql/ssms/download-sql-server-management-studio-ssms).
37
36
-[Prepared your environment for replication](managed-instance-link-preparation.md)
38
37
- Setup the [link feature and replicated your database to your managed instance in Azure](managed-instance-link-use-ssms-to-replicate-database.md).
39
38
40
39
## Failover database
41
40
42
-
Use the **Failover database to Managed Instance** wizard in SQL Server Management Studio (SSMS) to failover your database from your instance of SQL Server to your instance of SQL Managed Instance. The wizard takes you through the failing over your database. Once the link is created, your source database gets a read-only replica copy on your target Azure SQL Managed Instance.
41
+
Use the **Failover database to Managed Instance** wizard in SQL Server Management Studio (SSMS) to failover your database from your instance of SQL Server to your instance of SQL Managed Instance. The wizard takes you through the failing over your database, breaking the link between the two instances in the process.
43
42
44
43
> [!CAUTION]
45
44
> If you are performing a planned manual failover, stop the workload on the database hosted on the source SQL Server to allow the replicated database on the SQL Managed Instance to completely catch up and failover without data loss. If you are performing a forced failover, there may be data loss.
@@ -56,7 +55,7 @@ To failover your database, follow these steps:
3. On the **Log in to Azure** page, select **Sign-in** to provide your credentials and sign into your Azure account. Select the subscription that is hosting the your SQL Managed Instance and then select **Next**:
58
+
3. On the **Log in to Azure** page, select **Sign-in** to provide your credentials and sign into your Azure account. Select the subscription that is hosting the your SQL Managed Instance from the drop-down and then select **Next**:
60
59
61
60
:::image type="content" source="./media/managed-instance-link-use-ssms-to-failover-database/link-failover-login-to-azure.png" alt-text="Screenshot showing Log in to Azure page.":::
62
61
@@ -73,7 +72,7 @@ To failover your database, follow these steps:
@@ -85,11 +84,11 @@ To failover your database, follow these steps:
85
84
86
85
During the failover process, the Managed Instance link is dropped and no longer exists. Both databases on the source SQL Server instance and target SQL Managed Instance can execute a read-write workload, and are completely independent.
87
86
88
-
You can validate this by reviewing the database on the source SQL Server:
87
+
You can validate this by reviewing the database on the SQL Server:
89
88
90
89
:::image type="content" source="./media/managed-instance-link-use-ssms-to-failover-database/link-failover-ssms-sql-server-database.png" alt-text="Screenshot showing database on S Q L Server in S S M S.":::
91
90
92
-
And then reviewing the database on the target SQL Managed Instance:
91
+
And then reviewing the database on the SQL Managed Instance:
93
92
94
93
:::image type="content" source="./media/managed-instance-link-use-ssms-to-failover-database/link-failover-ssms-managed-instance-database.png" alt-text="Screenshot showing database on Managed Instance in S S M S.":::
0 commit comments