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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
| User | Count |
|---|---|
| 21 | |
| 13 | |
| 8 | |
| 6 | |
| 4 |
| User | Count |
|---|---|
| 50 | |
| 43 | |
| 35 | |
| 16 | |
| 13 |