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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
vicduplessis
New Member

Connecting to PostgreSQL: "No such host is known"

I can connect to all of our PostgreSQL databases in Power BI Desktop but none of them are accessible when publishing the reports. They all come back with invalid credentials and when I type in the credentials it says the following. 

vicduplessis_0-1666206085086.png

 

What am I missing here?

 

4 REPLIES 4
Ivan4ever84
Frequent Visitor

I got it!!
On the server you will use as Gateway (that reach the Azure PostgreSQL DB source) you need to:

  1. Install and configure an On-Premises Data Gateway;
  2. Install the certificate of the Resource you can find on the Azure Portal under Setting--> Network;Ivan4ever84_2-1680685570520.png

     

  3. Install a PostgreSQL ODBC Driver (here a list: https://www.postgresql.org/ftp/odbc/versions/msi/);
  4. Open "ODBC Data Source" and create a System DSN with the informations required (SSL Mode=allow) so test the connection;

Ivan4ever84_0-1680684569351.png

 

If the test is OK, the server is able to connect to Azure PostgreSQL by ODBC then go on Power BI Service and create a new connection using the gateway (local) installed at the point 1 and setting as below:

  • Data Source Type: ODBC
  • Connection String: dsn=<name of the System DSN choosen at point 4>
  • Authentication: Anonymus
  • Encryption: Organizational

Here is an example in Italian.

Ivan4ever84_3-1680685692667.png

 

Ivan4ever84
Frequent Visitor

I have the same issue while I am tryng to sign the credential in PBI Service to connecting to Azure PostgreSQL.
The Gateway it is not necessary and cannot be the solution because both the source (PBI Service and Azure PostgreSQL) are in Microsoft Cloud and not on-premises.

Does anyone know the solution? Thanks!

We managed to solve the issue. When we had a further look at the error message (when expanding it) it said that we had to use "Npgsql v4.0.10 or Earlier". So, we installed it and it worked. Just note that you have to select "NpgSQL GAC" Installation manually under the options menu on the first screen.

 

Here is another post where someone did the same:

https://community.powerbi.com/t5/Service/Gateway-error-connecting-to-PostgreSQL/m-p/965710#M89808

Anonymous
Not applicable

Hi @vicduplessis ,

Please try to install gateway for connect your dataset to on-premise data source.

Please try below steps:

1. install a gateway: personal/standard type, that according to your connection type

2. configure the gateway

3. set the data source for gateway in service

4. can view report in service

 

For more details, you can read related document: On-premises data gateways documentation | Microsoft Learn , On-premises data gateway - Power BI | Microsoft Learn , Install an on-premises data gateway | Microsoft Learn , Use the on-premises data gateway app | Microsoft Learn , Manage an on-premises data gateway | Microsoft Learn 

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.