0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Great, this worked perfectly, although the servers are in a different collation :(
In Server Options, you can set "Use Remote Collation" to false, and set the "Collation Name" to the one you use on the VM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.