Skip to content

Commit 5bc8c18

Browse files
committed
moving another article
1 parent 5033524 commit 5bc8c18

File tree

6 files changed

+141
-137
lines changed

6 files changed

+141
-137
lines changed

articles/azure-sql/database/how-to-content-reference-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ In this article you can find a content reference of various guides, scripts, and
3838
- [Remove TDE protector](transparent-data-encryption-byok-remove-tde-protector.md)
3939
- [Configure In-Memory OLTP](../in-memory-oltp-migration.md)
4040
- [Configure Azure Automation](automation-manage.md)
41-
- [Configure transactional replication](../../sql-database/replication-to-sql-database.md) to replicate your date between databases.
41+
- [Configure transactional replication](replication-to-sql-database.md) to replicate your date between databases.
4242
- [Configure threat detection](threat-detection.md) to let Azure SQL Database identify suspicious activities such as SQL Injection or access from suspicious locations.
4343
- [Configure dynamic data masking](dynamic-data-masking-configure-portal.md) to protect your sensitive data.
4444
- [Configure backup retention](long-term-backup-retention-configure.md) for a database to keep your backups on Azure Blob Storage.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: SQL Server replication to Azure SQL Database
3+
description: You can configure an Azure SQL Database as the push subscriber in a one-way transactional or snapshot replication topology.
4+
services: sql-database
5+
ms.service: sql-database
6+
ms.subservice: data-movement
7+
ms.custom: seo-lt-2019, sqldbrb=1
8+
ms.devlang:
9+
ms.topic: conceptual
10+
author: stevestein
11+
ms.author: sstein
12+
ms.reviewer: mathoma
13+
ms.date: 04/28/2020
14+
---
15+
# Replication to Azure SQL Database
16+
17+
You can configure an Azure SQL Database as the push subscriber in a one-way transactional or snapshot replication topology.
18+
19+
> [!NOTE]
20+
> This article describes the use of [transactional replication](https://docs.microsoft.com/sql/relational-databases/replication/transactional/transactional-replication) in Azure SQL Database. It is unrelated to [active geo-replication](https://docs.microsoft.com/azure/sql-database/sql-database-active-geo-replication), an Azure SQL Database feature that allows you to create complete readable replicas of individual databases.
21+
22+
## Supported Configurations
23+
24+
- Azure SQL Database can only be the push subscriber of a SQL Server publisher and distributor.
25+
- The SQL Server acting as publisher and/or distributor can be an instance of [SQL Server running on-premises](https://www.microsoft.com/sql-server/sql-server-downloads), an [Azure SQL Managed Instance](../azure-sql/managed-instance/instance-create-quickstart.md), or an instance of [SQL Server running on an Azure virtual machine in the cloud](../virtual-machines/windows/sql-vm-create-portal-quickstart.md).
26+
- The distribution database and the replication agents cannot be placed on an Azure SQL database.
27+
- [Snapshot](/sql/relational-databases/replication/snapshot-replication) and [one-way transactional](/sql/relational-databases/replication/transactional/transactional-replication) replication are supported. Peer-to-peer transactional replication and merge replication are not supported.
28+
29+
30+
### Versions
31+
32+
To successfully replicate to an Azure SQL Database, SQL Server publishers and distributors must be using (at least) one of the following versions:
33+
34+
Publishing to any Azure SQL Database from an on-premises SQL Server is supported by the following versions of SQL Server:
35+
36+
- SQL Server 2016 and greater
37+
- SQL Server 2014 [RTM CU10 (12.0.4427.24)](https://support.microsoft.com/help/3094220/cumulative-update-10-for-sql-server-2014) or [SP1 CU3 (12.0.2556.4)](https://support.microsoft.com/help/3094221/cumulative-update-3-for-sql-server-2014-service-pack-1)
38+
- SQL Server 2012 [SP2 CU8 (11.0.5634.1)](https://support.microsoft.com/help/3082561/cumulative-update-8-for-sql-server-2012-sp2) or [SP3 (11.0.6020.0)](https://www.microsoft.com/download/details.aspx?id=49996)
39+
40+
> [!NOTE]
41+
> Attempting to configure replication using an unsupported version can result in error number MSSQL_REPL20084 (The process could not connect to Subscriber.) and MSSQL_REPL40532 (Cannot open server \<name> requested by the login. The login failed.).
42+
43+
To use all the features of Azure SQL Database, you must be using the latest versions of [SQL Server Management Studio](/sql/ssms/download-sql-server-management-studio-ssms) and [SQL Server Data Tools](/sql/ssdt/download-sql-server-data-tools-ssdt).
44+
45+
### Types of replication
46+
47+
There are different [types of replication](https://docs.microsoft.com/sql/relational-databases/replication/types-of-replication):
48+
49+
| Replication | Azure SQL Database | Azure SQL Managed Instance |
50+
| :----| :------------- | :--------------- |
51+
| [**Standard Transactional**](https://docs.microsoft.com/sql/relational-databases/replication/transactional/transactional-replication) | Yes (only as subscriber) | Yes |
52+
| [**Snapshot**](https://docs.microsoft.com/sql/relational-databases/replication/snapshot-replication) | Yes (only as subscriber) | Yes|
53+
| [**Merge replication**](https://docs.microsoft.com/sql/relational-databases/replication/merge/merge-replication) | No | No|
54+
| [**Peer-to-peer**](https://docs.microsoft.com/sql/relational-databases/replication/transactional/peer-to-peer-transactional-replication) | No | No|
55+
| [**Bidirectional**](https://docs.microsoft.com/sql/relational-databases/replication/transactional/bidirectional-transactional-replication) | No | Yes|
56+
| [**Updatable subscriptions**](https://docs.microsoft.com/sql/relational-databases/replication/transactional/updatable-subscriptions-for-transactional-replication) | No | No|
57+
| &nbsp; | &nbsp; | &nbsp; |
58+
59+
60+
## Remarks
61+
62+
- Only push subscriptions to Azure SQL Database are supported.
63+
- Replication can be configured by using [SQL Server Management Studio](/sql/ssms/download-sql-server-management-studio-ssms) or by executing Transact-SQL statements on the publisher. You cannot configure replication by using the Azure portal.
64+
- Replication can only use SQL Server authentication logins to connect to Azure SQL Database.
65+
- Replicated tables must have a primary key.
66+
- You must have an existing Azure subscription.
67+
- The Azure SQL Database subscriber can be in any region.
68+
- A single publication on SQL Server can support both Azure SQL Database and SQL Server (on-premises and SQL Server in an Azure virtual machine) subscribers.
69+
- Replication management, monitoring, and troubleshooting must be performed from SQL Server rather than Azure SQL Database.
70+
- Only `@subscriber_type = 0` is supported in **sp_addsubscription** for SQL Database.
71+
- Azure SQL Database does not support bi-directional, immediate, updatable, or peer-to-peer replication.
72+
73+
## Replication Architecture
74+
75+
![replication-to-sql-database](./media/replication-to-sql-database/replication-to-sql-database.png)
76+
77+
## Scenarios
78+
79+
### Typical Replication Scenario
80+
81+
1. Create a transactional replication publication on an on-premises SQL Server database.
82+
2. On the on-premises SQL Server use the **New Subscription Wizard** or Transact-SQL statements to create a push to subscription to Azure SQL Database.
83+
3. With single and pooled databases in Azure SQL Database, the initial data set is a snapshot that is created by the Snapshot Agent and distributed and applied by the Distribution Agent. With a SQL Managed Instance publisher, you can also use a database backup to seed the Azure SQL Database subscriber.
84+
85+
### Data Migration Scenario
86+
87+
1. Use transactional replication to replicate data from an on-premises SQL Server database to Azure SQL Database.
88+
2. Redirect the client or middle-tier applications to update the Azure SQL database copy.
89+
3. Stop updating the SQL Server version of the table and remove the publication.
90+
91+
## Limitations
92+
93+
The following options are not supported for Azure SQL Database subscriptions:
94+
95+
- Copy file groups association
96+
- Copy table partitioning schemes
97+
- Copy index partitioning schemes
98+
- Copy user defined statistics
99+
- Copy default bindings
100+
- Copy rule bindings
101+
- Copy fulltext indexes
102+
- Copy XML XSD
103+
- Copy XML indexes
104+
- Copy permissions
105+
- Copy spatial indexes
106+
- Copy filtered indexes
107+
- Copy data compression attribute
108+
- Copy sparse column attribute
109+
- Convert filestream to MAX data types
110+
- Convert hierarchyid to MAX data types
111+
- Convert spatial to MAX data types
112+
- Copy extended properties
113+
- Copy permissions
114+
115+
### Limitations to be determined
116+
117+
- Copy collation
118+
- Execution in a serialized transaction of the SP
119+
120+
## Examples
121+
122+
Create a publication and a push subscription. For more information, see:
123+
124+
- [Create a Publication](https://docs.microsoft.com/sql/relational-databases/replication/publish/create-a-publication)
125+
- [Create a Push Subscription](https://docs.microsoft.com/sql/relational-databases/replication/create-a-push-subscription/) by using the server name as the subscriber (for example **N'azuresqldbdns.database.windows.net'**) and the Azure SQL Database name as the destination database (for example **AdventureWorks**).
126+
127+
## See Also
128+
129+
- [Transactional replication](../managed-instance/replication-transactional-overview.md)
130+
- [Create a Publication](https://docs.microsoft.com/sql/relational-databases/replication/publish/create-a-publication)
131+
- [Create a Push Subscription](https://docs.microsoft.com/sql/relational-databases/replication/create-a-push-subscription/)
132+
- [Types of Replication](https://docs.microsoft.com/sql/relational-databases/replication/types-of-replication)
133+
- [Monitoring (Replication)](https://docs.microsoft.com/sql/relational-databases/replication/monitor/monitoring-replication)
134+
- [Initialize a Subscription](https://docs.microsoft.com/sql/relational-databases/replication/initialize-a-subscription)

articles/azure-sql/database/service-tier-hyperscale-frequently-asked-questions-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Yes. You can use all existing migration technologies to migrate to Hyperscale, i
213213

214214
### What is my downtime during migration from an on-premises or virtual machine environment to Hyperscale, and how can I minimize it
215215

216-
Downtime for migration to Hyperscale is the same as the downtime when you migrate your databases to other Azure SQL Database service tiers. You can use [transactional replication](../../sql-database/replication-to-sql-database.md#data-migration-scenario
216+
Downtime for migration to Hyperscale is the same as the downtime when you migrate your databases to other Azure SQL Database service tiers. You can use [transactional replication](replication-to-sql-database.md#data-migration-scenario
217217
) to minimize downtime migration for databases up to few TB in size. For very large databases (10+ TB), you can consider to migrate data using ADF, Spark, or other data movement technologies.
218218

219219
### How much time would it take to bring in X amount of data to Hyperscale

articles/azure-sql/managed-instance/replication-transactional-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ In this configuration, an Azure SQL Database or Azure SQL Managed Instance datab
144144
145145
## With failover groups
146146

147-
[Active geo-replication](active-geo-replication-overview.md) is not supported with a SQL Managed Instance using transactional replication. Instead of active geo-replication, use [Auto-failover groups](auto-failover-group-overview.md), but note that the publication has to be [manually deleted](transact-sql-tsql-differences-sql-server.md#replication) from the primary SQL Managed instance and recreated on the secondary SQL Managed Instance after failover.
147+
[Active geo-replication](../database/active-geo-replication-overview.md) is not supported with a SQL Managed Instance using transactional replication. Instead of active geo-replication, use [Auto-failover groups](../database/auto-failover-group-overview.md), but note that the publication has to be [manually deleted](transact-sql-tsql-differences-sql-server.md#replication) from the primary SQL Managed instance and recreated on the secondary SQL Managed Instance after failover.
148148

149-
If geo-replication is enabled on a **publisher** or **distributor** SQL Managed Instance in a [failover group](auto-failover-group-overview.md), the SQL Managed Instance administrator must clean up all publications on the old primary and reconfigure them on the new primary after a failover occurs. The following activities are needed in this scenario:
149+
If geo-replication is enabled on a **publisher** or **distributor** SQL Managed Instance in a [failover group](../database/auto-failover-group-overview.md), the SQL Managed Instance administrator must clean up all publications on the old primary and reconfigure them on the new primary after a failover occurs. The following activities are needed in this scenario:
150150

151151
1. Stop all replication jobs running on the database, if there are any.
152152
1. Drop subscription metadata from publisher by running the following script on publisher database:
@@ -194,7 +194,7 @@ For more information about configuring transactional replication, see the follow
194194
## See Also
195195

196196
- [Replication with an MI and a failover group](transact-sql-tsql-differences-sql-server.md#replication)
197-
- [Replication to SQL Database](../../sql-database/replication-to-sql-database.md)
197+
- [Replication to SQL Database](../database/replication-to-sql-database.md)
198198
- [Replication to managed instance](../managed-instance/replication-between-two-instances-configure-tutorial.md)
199199
- [Create a Publication](https://docs.microsoft.com/sql/relational-databases/replication/publish/create-a-publication)
200200
- [Create a Push Subscription](https://docs.microsoft.com/sql/relational-databases/replication/create-a-push-subscription/)

0 commit comments

Comments
 (0)