0

I have to querying two tables from two different databases in Azure SQL. Is there any option available in azure?

Prabu
  • 63
  • 2
  • 7

1 Answers1

0

If your database are Azure single databases, maybe you can use OPENROWSET (Transact-SQL). It now support Azure SQL database.

Includes all connection information that is required to access remote data from an OLE DB data source. This method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data by using OLE DB. For more frequent references to OLE DB data sources, use linked servers instead. For more information, see Linked Servers (Database Engine). The OPENROWSET function can be referenced in the FROM clause of a query as if it were a table name. The OPENROWSET function can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. Although the query might return multiple result sets, OPENROWSET returns only the first one.

Hope this helps.

Leon Yue
  • 15,693
  • 1
  • 11
  • 23
  • Thank you for response, but I need a alternative solution to support querying tables from different azure databases in azure. In Azure, each database has unique identity so everything protected within Azure SQL. I tried with linked server but it looking for external table to communicate with another database. – Prabu Oct 29 '19 at 07:39
  • Azure SQL database doesn't support linked server. Even Elastic query also need to create external source and table. – Leon Yue Oct 29 '19 at 07:42