Reputation: 525
We have two SQL Server Database (EG: DB1 & DB2) that are hosted in NON-Azure environment (dedicated server). We are planning to migrate DB1 to Azure SQL.
Is there way the Azure SQL DB1 can talk to non-azure DB2 using Linked Server approach? I want to query in my Azure SQL (DB1) and get the data of DB2.
Upvotes: 0
Views: 633
Reputation: 5705
Yes you can certainly do that.
This atricle explains all the details that you need to do to accomplish that:
Note that your SQL Azure instance needs to be in "Standard" service tier to be able to do that.
If you want to add your SQL Azure server as a linked server to your on-prem SQL you can use ODBC connection. Bellow MSDN article will help you with that:
https://blogs.msdn.microsoft.com/sqlcat/2011/03/07/linked-servers-to-sql-azure/
Upvotes: 1
Reputation: 2490
If I understand correctly you are trying to connect your Azure-db (DB1) from an on-premise db (DB2). From on-premises SQL Server, you can use linked servers and 4-part names to point to a database in Azure SQL DB using a datasource which would look like this -
[[email protected]].[YourDatabaseName].[YourSchemaName].[YourTableName]
For more details please check this link.
Upvotes: 1