How to query between databases in SQL Azure Database Server

0 votes

I have an SQL Azure Database Server with three databases - A,B and C. In Database.A I have a Stored Procedure that needs to retrieve data from Database.B. How to query between the Databases?

Normally, I would reference the database like SELECT * FROM [Database.B].[dbo].[MyTable]but this does not appear to be allowed in SQL Azure.

Msg 40515, Level 15, State 1, Line 16 Reference to database and/or server name in 'Database.B.dbo.MyTable' is not supported in this version of SQL Server.

Is there a way to do this on the database end?

Apr 9, 2019 in Azure by sabby
• 4,390 points
12,343 views

1 answer to this question.

0 votes

SQL Azure supports cross database queries: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/

Hope this helps!!

To know more about Azure, enroll today with our Azure certification course.

Thanks!!

answered Apr 9, 2019 by Prerna
• 1,960 points

Related Questions In Azure

+1 vote
1 answer

How to copy Azure SQL database to a local development server?

Actually, there are multiple ways to do ...READ MORE

answered Jul 9, 2018 in Azure by null_void
• 3,220 points
2,375 views
0 votes
1 answer

How can I copy SQL Azure database to a local development server?

There are certain ways to do this: Using SSIS ...READ MORE

answered Jun 26, 2018 in Azure by null_void
• 3,220 points
977 views
0 votes
2 answers

How to restore SQL Server .bak file to Azure SQL Database?

To restore SQL Server .bak file you ...READ MORE

answered May 28, 2019 in Azure by sherry
• 140 points
32,944 views
0 votes
1 answer

How to calculate the used database space in SQL Azure?

I don't think its possible to find ...READ MORE

answered Mar 5, 2019 in Azure by Archana
• 5,640 points
925 views
0 votes
1 answer

How to install Windows Azure Storage Emulator?

There may be an issue with the ...READ MORE

answered Mar 7, 2019 in Azure by Prerna
• 1,960 points
2,377 views
0 votes
1 answer

Azure Storage Emulator shows error.

This blog might help with your query: http://blog.smarx.com/posts/windows-azure-storage-emulator-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process Also, ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
1,432 views
0 votes
1 answer

Friendly filename when downloading Azure blob.

Azure blobs can be downloaded in four ...READ MORE

answered Mar 16, 2019 in Azure by Prerna
• 1,960 points
3,286 views
0 votes
1 answer

How to debug Azure 500 internal server error?

You can simply turn off custom error in ...READ MORE

answered Mar 29, 2019 in Azure by Prerna
• 1,960 points
4,550 views
0 votes
1 answer

How do disconnect to Azure SQL database if I can't access it?

Based on info  from Microsoft, I think ...READ MORE

answered Apr 26, 2019 in Azure by Prerna
• 1,960 points
1,044 views
0 votes
1 answer

How to check if multiple files exist in Azure container?

foreach loop is the most efficient way though. ...READ MORE

answered Mar 4, 2019 in Azure by Prerna
• 1,960 points
3,392 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP