in azure, cross database query on ms sql possible?

shreesh kumar 0 Reputation points
2024-06-12T03:46:56.12+00:00

Hi, I have created sql server in azure. i just wanted to know if it is possible to do cross database query.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,343 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rahul Randive 9,176 Reputation points Microsoft Employee
    2024-06-12T03:57:16.03+00:00

    Hi @shreesh kumar

    At this moment cross database queries are not directly supported in Azure SQL database.

    Here is similar questions and shared answer/reference document

    https://learn.microsoft.com/en-us/answers/questions/1465193/cross-database-reference-in-azure-sql-database

    Thank You!

    0 comments No comments

  2. MikeyQiaoMSFT-0444 1,910 Reputation points
    2024-06-12T09:50:46.4133333+00:00

    Hi,shreesh kumar

    As Rahul mentioned, Azure SQL Database does not support direct cross-database queries. You need to use Elastic Queries, and the official documentation provides detailed implementation methods.

    See more

    Azure SQL Database elastic query overview

    Get started with cross-database queries

    Best regards

    Mikey Qiao


    If the answer helped you solve your problem, don't forget to "Accept it ". This will contribute a lot to the forum and make the thread more valuable.

    0 comments No comments