简体   繁体   中英

Query azure database from on-premises SQL Server 2017

I have an on-prem database that's running on a Virtual Machine (in Azure). The on prem is a local installation of SQL Server 2017 (with a database).

From this database I would like to query another database (also in Azure, but not a VM).

Is it possible?

Elastic queries only seem to work with other instances os Azure SQL server. I'd like to avoid copying data, prefer to query directly if possible even if it takes a longer time. I will not be joining any tables I don't think, I just need lookups.

You can create a linked server in the SQL 2017 on your VM using the private or public connection string of the azure sql database. Then you can use the linked server to query the data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM