Can a single application connect to two different databases each of which is in different Instances. One instance has on-premise deployment, the other one is Azure SQL(not SQL in Azure VM). So basically is it possible for an application to access data from both Instances?
Sql-server – Can an application connect to databases from on-premise SQL Server Instance and Azure SQL together
azure-sql-databasesql server
Related Question
- Sql-server – Migrate on-premise SQL Server databases to Azure SQL Database
- Unable to connect SQL Managed instance in the vnet
- Sql-server – Query performance discrepancy between Azure and on premise SQL Server
- Sql-server – Is it possible to migrate Sharepoint 2016 and all it’s databases from SQL SERVER2012 to AZURE
- Sql-server – How to query on-premise SQL Server database from Azure SQL database using stored procedure
Best Answer
Yes, you can use so many connections you need.
For instance, if you're programming for .Net framework simply instantiate two or more SqlConnection class and set up the ConnectionString property according the DB you are trying to access.
You can find some examples about ConnectionString's here.
And MS Docs about Azure ConnectionString's here.