Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mhggr
New Member

Accessing two databases from one Gateway - "Invalid connection credentials"

I have an issue with an SQL view that I try to access via a Report published online.

The gateway is configured for DB1 where my view is stored. That view queries both DB1 and DB2.
Both DB1 and DB2 are on the same server.

PowerBI seems to only be able to connect to tables in DB1, not DB2 - or more specifically - only connects to tables in the database specified in the gateway settings. The credentials used for the gateway should have access to all databases on that server though.

It would be very helpful to know whether this is a known limitation or if this is a fault on my end. 


Here is the online view and below how it is is locallywebweblocallocal

2 ACCEPTED SOLUTIONS
djurecicK2
Super User
Super User

Hi @mhggr ,

 Sounds like you need to add a data source on the gateway for DB2. Here is additional information on how to do that:

https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-data-sources#add-a-data-sour...

 

View solution in original post

Anonymous
Not applicable

Hi djurecicK2 ,thanks for the quick reply, I'll add more.

Hi @mhggr ,

Regarding your question, did you configure the data source credentials only for 'Database 1'? (Using the database administrator account) You need to create different data source credentials for 'Database 1' and 'Database 2' respectively.

vzhouwenmsft_0-1728280793735.png

 

Best Regards,
Wenbin Zhou

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi djurecicK2 ,thanks for the quick reply, I'll add more.

Hi @mhggr ,

Regarding your question, did you configure the data source credentials only for 'Database 1'? (Using the database administrator account) You need to create different data source credentials for 'Database 1' and 'Database 2' respectively.

vzhouwenmsft_0-1728280793735.png

 

Best Regards,
Wenbin Zhou

 

We did.

I noticed that it maps to two different gateways. Is this the issue? I could not find a way to put two DBs in the same gateway so I created two. They are in the same cluster though

djurecicK2
Super User
Super User

Hi @mhggr ,

 Sounds like you need to add a data source on the gateway for DB2. Here is additional information on how to do that:

https://learn.microsoft.com/en-us/power-bi/connect-data/service-gateway-data-sources#add-a-data-sour...

 

I have added some screenshots.

We have gateways for both DBs and they are in the same cluster. 

Thanks for the help though. Since it seems to straightforward, it must be something I did wrong.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors