Link to home
Start Free TrialLog in
Avatar of esak2000
esak2000

asked on

Azure - Join 2 Azure SQL Server databases

I would like to join 2 Databases on my Azure cloud SQL Server, in an Azure cloud SQL Server stored procedure. From what I've read it's not so simple. Is there any solution?

Also, what's the best way to modify a cloud SQL Server stored procedure?
Avatar of John_Vidmar
John_Vidmar
Flag of Canada image

Configure linked servers, and use 3 or 4-part object references within the stored-procedure, here's the 4 parts:
      server.database.owner.object

Often, the owner is dbo, so people omit it, 3-part obj-ref example:
SELECT	*
FROM	Database1..table1	a
JOIN	Database2..table2	b	ON	a.key = b.key

Open in new window

Avatar of esak2000
esak2000

ASKER

Where do the linked servers reside, in the Azure SQL Server or in a local SQL Server DB that is managed by SSMS?
ASKER CERTIFIED SOLUTION
Avatar of John_Vidmar
John_Vidmar
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial