1

I am trying to set up Pull Replication from an Azure database to an on-premise database. I have set up the on-premise database as the distributor but when I try to establish a subscription to the Azure database I get an error, see below.

TITLE: New Subscription Wizard
------------------------------

SQL Server could not retrieve the list of databases for server 'nyrstar-prod-01.database.windows.net'.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=14.0.17254.0&EvtSrc=Microsoft.SqlServer.Management.UI.CreateSubWizardErrorSR&EvtID=CantGetDatabaseList&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Could not find stored procedure 'sp_get_distributor'. (Microsoft SQL Server, Error: 2812)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.0600&EvtSrc=MSSQLServer&EvtID=2812&LinkId=20476

-------------------------------
-------------------------------
ALL ADVANCED INFORMATION
-------------------------------
-------------------------------

===================================

SQL Server could not retrieve the list of databases for server 'nyrstar-prod-01.database.windows.net'. (New Subscription Wizard)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=14.0.17254.0&EvtSrc=Microsoft.SqlServer.Management.UI.CreateSubWizardErrorSR&EvtID=CantGetDatabaseList&LinkId=20476

===================================

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand, SqlCommand& command)
   at Microsoft.SqlServer.Replication.ReplicationServer.RefreshGetDistributor()
   at Microsoft.SqlServer.Management.UI.PageChoosePublication.EnumDatabases(ReplicationSqlConnection sqlConn)
   at Microsoft.SqlServer.Management.UI.PageChoosePublication.LoadDatabases(ReplicationSqlConnection publisherConn, String selectedDBName, String selectedPubName, Boolean isHeterogeneous)

===================================

Could not find stored procedure 'sp_get_distributor'. (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.0600&EvtSrc=MSSQLServer&EvtID=2812&LinkId=20476

------------------------------
Server Name: nyrstar-prod-01.database.windows.net
Error Number: 2812
Severity: 16
State: 62
Line Number: 1


------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.GetExecuteReader(SqlCommand command)
1

At this time, replication is only supported from on-prem to SQL Database, and it has to be push replication. See here:

Replication to SQL Database

Supported Configurations:

  • The SQL Server can be an instance of SQL Server running on-premises or an instance of SQL Server running in an Azure virtual machine in the cloud
  • SQL Database must be a push subscriber of a SQL Server publisher.
  • The distribution database and the replication agents cannot be placed on SQL Database.

You may want to consider Managed Instances to get around this. See Replication with SQL Database Managed Instance for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.