Olaf is incorrect. There are alternatives. You can use an elastic query. Yes, this is a preview feature, and it is one of these eternal previews - this feature has been there for years. I have never played with it myself, but you may want to try it. You should beware of that Azure SQL Database is not the same place as on-prem SQL Server, and moving to Azure SQL Database from on-prem is a bit of a culture clash. Azure SQL Managed Instance may make you feel more at home. But the price tag may be stiffer.
Reference to external databases in Azure how to do it?
Ianez Mathias
60
Reputation points
Hi guys, I have the following scenario. I have my local database as follows. Database
- Base A
- Base B
- Base C
I have a view in Base A that obtains information from Base B and C.
SELECT
A.Field1,
B.Field2,
C.Field3
FROM
A.dbo.TableA AS A
INNER JOIN
B.dbo.TableB AS B ON A.CampoChave = B.CampoChave
INNER JOIN
C.dbo.TableC AS C ON A.CampoChave = C.CampoChave
When migrating Base A to Azure, it gives an error as it is not possible in Azure to have external references to its own base. This is a problem for me, is there any alternative?
Accepted answer
1 additional answer
Sort by: Most helpful
-
Olaf Helper 46,041 Reputation points
2024-01-12T12:24:48.6333333+00:00 This is a problem for me, is there any alternative?
Azure SQL database don't support cross database references and there is no way around. Use an other SQL product, like SQL Managed Instance or a Azure VM with SQL Server.