Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
How can I use T-SQL OPENDATASOURCE/OPENROWSET between two different AZURE SQL servers (stemming from 2 diiferent datamarts) to facilitate cross-server query
In db2 I am doing this and It is not working
SELECT
*
FROM
OPENDATASOURCE(
'SQLNCLI', 'Data Source=blahblahblah.datamart.fabric.microsoft.com;Integrated Security=SSPI'
).db_powerbiprodnam_xxxx_yyyy_zzzz.model.dim_country //.db.schema.table
SELECT
*
FROM
OPENDATASOURCE(
'MSOLEDBSQL', 'Server=blahblahblah.datamart.fabric.microsoft.com; Database=db_powerbiprodnam_xxxx_yyyy_zzzz;TrustServerCertificate=Yes;Trusted_Connection=Yes;'
).model.dim_country
SELECT
*
from
OPENROWSET(
'SQLNCLI', 'Server=blahblahblah.datamart.fabric.microsoft.com;Trusted_Connection=Yes',
db_powerbiprodnam_xxxx_yyyy_zzzz.model.dim_country
) as d
Thank you in advance.
I am not aware of a cross server query option