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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
DamienW
Frequent Visitor

Cannot connect to SQL database - MS SQL Error on refresh

So, not sure what the go here is, I am using the Desktop APP successfully to connect to our SQL database hosted on a different domain

 

I can connect and refresh via the desktop app no problems at all.  

 

When I publish to the PB Service, and try to schedule refresh, the gateway details are all okay, however I am currently getting the following error: 

 

"Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

 

The credentials have not changed for the SQL server, any help as to why this would occur in the Online Service and not the Desktop app? 

 

Thanks for any help

3 REPLIES 3
v-qiuyu-msft
Community Support
Community Support

Hi @DamienW,

 

As the Power BI desktop in the different domain from the SQL Server database, where did that gateway run? Was the gateway also in the different domain from the SQL Server database? If gateway was in the different domain, please don't use Windows authentication.

 

Which gateway did you use? Please try to run the on-premise data gateway, as we can create a SQL Server data source under the data gateway and check if the connection is successful. I would suggest you install the data gateway on the machine which has SQL Server run. See: Manage your data source - SQL Server.

 

Best Regards,
Qiuyun Yu

 

 

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for responding, 

 

I am currently using the personal gateway to connect to the DB, I have used this in the past with other reports with the same datasource.

 

 

I will need to look into the enterprise gateway a bit more, to see if it changes it up, thanks for the tip.

 

Will keep you posted how it goes.

 

Thanks

Damien

So for the moment, it seems the Personal Gateway has finally come good.... not sure what went wrong... but at the time, but is now working... 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors