Configure replication to Azure SQL Edge

Important

Azure SQL Edge will be retired on September 30, 2025. For more information and migration options, see the Retirement notice.

Note

Azure SQL Edge no longer supports the ARM64 platform.

You can configure an instance of Azure SQL Edge as the push subscriber for one-way transactional replication or snapshot replication. This instance can't act as the publisher or the distributor for a transactional replication configuration. Azure SQL Edge doesn't support merge replication, peer-to-peer replication, or Oracle publishing.

Supported configurations

  • The instance of Azure SQL Edge must be a push subscriber for a publisher.

  • The publisher and the distributor can be either:

    • An instance of SQL Server running on-premises, or an instance of SQL Server running in an Azure virtual machine. For more information, see SQL Server on Azure Virtual Machines overview. SQL Server instances must be using a version later than SQL Server 2016.
    • An instance of Azure SQL Managed Instance. SQL Managed Instance can host publisher, distributor, and subscriber databases. For more information, see Replication with SQL Managed Instance.
  • The distribution database and the replication agents can't be placed on an instance of Azure SQL Edge.

Note

If you attempt to configure replication by using an unsupported version, you might receive the following two errors: MSSQL_REPL20084 ("The process could not connect to Subscriber.") and MSSQL_REPL40532 ("Cannot open server <name> requested by the login. The login failed.").

Remarks

The following requirements and best practices are important to understand as you configure replication:

  • You can configure replication by using SQL Server Management Studio. You can also do so by running Transact-SQL statements on the publisher, by using either SQL Server Management Studio or Azure Data Studio.
  • To replicate to an instance of Azure SQL Edge, you must use SQL Server authentication to sign in.
  • Replicated tables must have a primary key.
  • A single publication on SQL Server can support both Azure SQL Edge and SQL Server (on-premises and SQL Server in an Azure virtual machine) subscribers.
  • Replication management, monitoring, and troubleshooting must be performed from the SQL Server instance.
  • Only push subscriptions to Azure SQL Edge are supported.
  • Only @subscriber_type = 0 is supported in the stored procedure sp_addsubscription for Azure SQL Edge.
  • Azure SQL Edge doesn't support bi-directional, immediate, updatable, or peer-to-peer replication.
  • Azure SQL Edge only supports a subset of features available in SQL Server or SQL Managed Instance. If you attempt to replicate a database (or objects within the database) that contains one or more unsupported features, the attempt fails. For example, if you attempt to replicate a database that contains objects with spatial data types, you receive an error. For more information, see Supported features of Azure SQL Edge.

Initialize reference data on an instance of Azure SQL Edge

You might want to initialize your instance with reference data that changes over time. For example, you might want to update machine learning models on your instance of Azure SQL Edge, after they have been trained on a SQL Server instance. Here's how to initialize your instance in such a scenario:

  1. Create a transactional replication publication on a SQL Server database.
  2. On the SQL Server instance, use the New Subscription Wizard or Transact-SQL statements to create a push to subscription to Azure SQL Edge.
  3. You can initialize the replicated database on Azure SQL Edge by using a snapshot generated by the snapshot agent, and distributed and delivered by the distribution agent. Alternatively, you can initialize by using a backup of the database from the publisher. Remember that if the database backup contains objects or features not supported by Azure SQL Edge, the restore operation fails.

Limitations

The following options aren't supported for Azure SQL Edge subscriptions:

  • Copy file groups association
  • Copy table partitioning schemes
  • Copy index partitioning schemes
  • Copy user defined statistics
  • Copy default bindings
  • Copy rule bindings
  • Copy fulltext indexes
  • Copy XML XSD
  • Copy XML indexes
  • Copy permissions
  • Copy spatial indexes
  • Copy filtered indexes
  • Copy data compression attribute
  • Copy sparse column attribute
  • Copy filestream, hierarchyid, or spatial data types
  • Convert hierarchyid to MAX data types
  • Convert spatial to MAX data types
  • Copy extended properties
  • Copy permissions

Examples

Create a publication and a push subscription. For more information, see:

  • Create a publication
  • Create a push subscription by using the Azure SQL Edge server name and IP as the subscriber (for example, myEdgeinstance,1433), and a database name on the Azure SQL Edge instance as the destination database (for example, AdventureWorks).