Fail Query 2 database diferent in azure sql

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

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
0 comments No comments
{count} votes

1 answer

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

    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'

    0 comments No comments