Fail Query 2 database diferent in azure sql

asked 2021-04-21T14:17:45.607+00:00
Oscar Nicolas 1 Reputation point

Hello, I have a problem when executing a query to different databases that are in the same Azure account.
The error it throws me is the following: Reference to database and/or server name in 'df_pre.dbo.DimSAPProveedoresPS' is not supported in this version of SQL Server. you can change the configuration so that it is possible to launch queries between different databases

Azure SQL Database
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. answered 2021-04-21T15:30:05.773+00:00
    Anurag Sharma 17,251 Reputation points

    Hi @Oscar Nicolas , welcome to Microsoft Q&A forum.

    Cross database query by mentioning the database name in the query is not supported in Azure SQL Database, however we can do cross database query using elastic queries through external tables.

    Please refer to below article on how to implement it:

    Cross Database Queries in Azure SQL Database

    Read more about elastic query:

    Azure SQL Database elastic query overview

    Please let us know if this helps or else we can discuss further.

    ----------

    If answer helps, please mark it 'Accept Answer'

    No comments