2

I have a stored procedure in a SQL Server 2014 database on site. I need to call this stored procedure from an Azure SQL database.

How can I implement this?

I have read about elastic queries but I find that elastic queries works for Azure databases only.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
YogeshR
  • 1,606
  • 2
  • 22
  • 43

1 Answers1

2

You cannot, unless you move your local database to Azure.

If this was not Azure, you could use linked servers feature, but this is not supported by Azure.

Alternatively you could try to reverse situation and call Azure procedures from your local database, which is supported.

https://msdn.microsoft.com/en-us/library/ms190479.aspx

  • 3
    To clarify: This is a restriction of the SQL Database service itself. If you run a SQL Server instance in an Azure Virtual Machine, there is no such restriction (aside from firewall-related security issues when trying to reach an on-premises database). – David Makogon Jan 27 '17 at 13:46
  • What about a similar linking [issue](https://stackoverflow.com/q/53712912/6420513) regarding joining with read access only? – John Drinane Dec 17 '18 at 17:41