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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
NothingZ
Microsoft Employee
Microsoft Employee

Unable to create gateway connection for SQL Server

Please help!

I'm unable to create gateway connections for my SQL Server data source. However, on PBI desktop, everything works fine as usual. Once published to the service, it shows error creating the new SQL server connection.

NothingZ_3-1742456044867.png

 

The gateway and SQL server connection works perfectly before.
What has changed: The machine where both the gateway and SQL server are on has been move to another physical location, so that the IP address is different. I have changed the IP4 address accordingly on TCP/IP configuration, and SQL Server address on PBI desktop so that it could get the data from that source.

What I have done so far:

  • Checked all the SQL server settings: all(including login credentials) are OK as it works fine before.
  • Restarted gateway/SQL Server
  • Uninstall and install the newest version/previous version of gateway
  • The SQL server data source is un-encrypt connection
  • Tried create a new data connection and got same error
  • Looked into Gateway error logs and found messages like "InnerMessage=<ccon>A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)</ccon>"
1 ACCEPTED SOLUTION
Deku
Community Champion
Community Champion

Old solution from Microsoft https://powerbi.microsoft.com/en-us/blog/ssl-security-error-with-data-source/

 

And yet another one https://learn.microsoft.com/en-us/power-query/connectors/sql-server#sql-server-certificate-isnt-trus...


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

9 REPLIES 9
NothingZ
Microsoft Employee
Microsoft Employee

I get this error in system log:

 

The certificate received from the remote server was issued by an untrusted certificate authority. Because of this, none of the data contained in the certificate can be validated. The TLS connection request has failed. The attached data contains the server certificate.
The SSPI client process is Microsoft.PowerBI.EnterpriseGateway (PID: 6376).

 

Is there any methods to add encryption/trust server cert into SQL server connection string for gateway? I can't find any more parameters to add when creating gateway connections.

NothingZ_0-1742529316415.png

 

Deku
Community Champion
Community Champion

Old solution from Microsoft https://powerbi.microsoft.com/en-us/blog/ssl-security-error-with-data-source/

 

And yet another one https://learn.microsoft.com/en-us/power-query/connectors/sql-server#sql-server-certificate-isnt-trus...


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
NothingZ
Microsoft Employee
Microsoft Employee

Thank you.
Adding server name to the field "SqlTrustedServers" in Microsoft.PowerBI.DataMovement.Pipeline.GatewayCore.dll.config works for my case.

NothingZ_0-1742548076616.png

 



NothingZ
Microsoft Employee
Microsoft Employee

Thank you for your infomation. I have tried following steps and adding entries on SqlTrustedServers field in gateway config file, but still it would not allow me to create such SQL Server on-premise gateway connection😓

Another thing I tried: OLE DB connection type works fine in gateway new connection creation as it provides "TrustServerCertificate=True" in connection string. However, OLE DB data souce from PBI desktop once published to the service, it becomes SQL Server connection type again and be un-able to add such parameter in the connection.

NothingZ_0-1742543305511.png

 

 

NothingZ_1-1742543581914.png

 

 

Deku
Community Champion
Community Champion

Think it might be time for a support ticket 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
Deku
Community Champion
Community Champion

Please see this stack overflow post with a potential solution and some info on the process


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
NothingZ
Microsoft Employee
Microsoft Employee

Hi, thank you for your quick reply. I'm not sure how to add those "TrustServerCertificate=True" into connection string when I'm creating SQL Server on-premise gateway connections. Could you please guide me further?

Plus, the connection works okay before my network environment got changed.

Deku
Community Champion
Community Champion

Steps suggested by Microsoft here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
NothingZ
Microsoft Employee
Microsoft Employee

Thanks a lot.

My SQL connection in PBI desktop has disabled the encryption setting before. Along with my SQL server databases have un-checked the "Encryption Enabled" options.

NothingZ_0-1742462266560.png

Still the issue persists, I'm not sure what to do next.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.