Forum Discussion

pabloreadi's avatar
pabloreadi
Regular Visitor
9 years ago
Solved

Connector Postgre SQL DATABASE

Hi,

I want to get data from a PostgreSQL database but the error appear "This connector requires one or more additional components to be installed before it can be used". I installed Npgsql-3.2.4.msi , I restart computer but the same error. Help me please.

  • Anonymous's avatar
    Anonymous
    9 years ago


    pabloreadi,

    It seems that your PostgreSQL is secured with SSL. To make Power BI Desktop work with secured PostgreSQL, you would need to copy SSL certificate for the PostgreSQL server to the machine running Power BI Desktop and import it to Windows certificate store. Because Power BI Desktop uses the windows certificate store to decide what to trust, once you tell the Windows that is running Power BI Desktop to trust the SSL certificate for the PostgreSQL server, Power BI Desktop will trust it too.

    In addition, in the configuration folder for the PostgreSQL server there is a postgresql.conf file, search it for SSL settings, there is one with the location of the SSL certificate. Take a look at the server name when you import the SSL certificate and connect from Power BI Desktop using the same server name. Then check if the above error goes away.

    There is a similar thread for your reference.
    http://community.powerbi.com/t5/Integrations-with-Files-and/Postgres-error-with-Power-BI-Desktop/td-p/8799



    Regards,
    Lydia

25 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    pabloreadi,

    In my environment, I installed Npgsql 3.1.7 and I selected the option to install to the GAC during the installation process, there is no issues when I connect to PostgreSQL in Power BI Desktop.

    In your scenario, please ensure that you select the option to install to the GAC when installing Npgsql 3.2.4. And you can also try to install 3.1.7, then check if the connection is successful.



    Regards,
    Lydia

    • pabloreadi's avatar
      pabloreadi
      Regular Visitor

      Anonymous thanks for your answer, when I installed Npgsql 3.2.4 I selected the option to install to the GAC, well i uninstall this version and install Npgsql 3.1.7, and I advance one step but now the error is the following:

       

      DataSource.Error: TlsClientStream.ClientAlertException: CertificateUnknown: Server certificate was not accepted. Chain status: A certificate chain could not be built to a trusted root authority. . at TlsClientStream.TlsClientStream.ParseCertificateMessage(Byte[] buf, Int32& pos) at TlsClientStream.TlsClientStream.TraverseHandshakeMessages() at TlsClientStream.TlsClientStream.GetInitialHandshakeMessages(Boolean allowApplicationData) at TlsClientStream.TlsClientStream.PerformInitialHandshake(String hostName, X509CertificateCollection clientCertificates, RemoteCertificateValidationCallback remoteCertificateValidationCallback, Boolean checkCertificateRevocation) Details: DataSourceKind=PostgreSQL

       

      I'am looking for the solution, but I cannot understand about the security and certificates.

      • Anonymous's avatar
        Anonymous
        Not applicable


        pabloreadi,

        It seems that your PostgreSQL is secured with SSL. To make Power BI Desktop work with secured PostgreSQL, you would need to copy SSL certificate for the PostgreSQL server to the machine running Power BI Desktop and import it to Windows certificate store. Because Power BI Desktop uses the windows certificate store to decide what to trust, once you tell the Windows that is running Power BI Desktop to trust the SSL certificate for the PostgreSQL server, Power BI Desktop will trust it too.

        In addition, in the configuration folder for the PostgreSQL server there is a postgresql.conf file, search it for SSL settings, there is one with the location of the SSL certificate. Take a look at the server name when you import the SSL certificate and connect from Power BI Desktop using the same server name. Then check if the above error goes away.

        There is a similar thread for your reference.
        http://community.powerbi.com/t5/Integrations-with-Files-and/Postgres-error-with-Power-BI-Desktop/td-p/8799



        Regards,
        Lydia

  • copytac's avatar
    copytac
    Frequent Visitor

    All,

     

    This seems like a poor solution in my opinion. I can connect via odbc directly to the data source, with PostgreSQL driver installed, without the need for this certificate issue.

     

    Simply create a system DSN in your 64 ODBC driver with the proper connection information. Once your system DSN is setup correctly, you can use the ODBC connector in power bi to connect to the data source using the system DSN.

     

    Much more straightforward.

     

    It doesnt make sense that my access application can access my PostgreSQL server, but PowerBI cant? Seems like a cop out to me,

    • Powaup's avatar
      Powaup
      New Member

      I am having a hard time creating a New Data Source to SQL Server? any tips there?

       

      Whether I try connecting with Windows NT or with SQL server authentication I get the following error message:

       

      ---------------------------
      Microsoft SQL Server Login
      ---------------------------
      Connection failed:
      SQLState: '01000'
      SQL Server Error: 53
      [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
      Connection failed:
      SQLState: '08001'
      SQL Server Error: 17
      [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

      ---------------------------
      OK
      ---------------------------

       

       

      Thanks

      • Chihiro's avatar
        Chihiro
        Solution Sage

        I'd recommend starting new thread. Rather than tacking onto someone else's question, which isn't direcly related to your issue.

         

        At any rate, you should give more info.

        Specify what SQL Server (MS SQL version, is it Express?) you are trying to connect to.

        If you are using alias for the connection? Try using IP address suffixed by port# to test.

        Are you able to connect to it using SQL Management Studio remotely? etc etc.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for this information, work for me!! in addition i want to do a question, i try this connection with a encrypted password and power bi said that the authentication failed, but if i try with decrypted password its work. Have u any idea, why this ?

  • I am experiencing a similar problem with connecting to Postgres, Error "This connector requires one or more additional components to be installed before it can be used" appears while trying to setup a connection to Postgres. Error continues even after installing the Npgsql-4.0.3.. I am still able to connect using ODBC but i do not prefer to use the ODBC.

     

    Any one managed to make this working ? 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, am still using the odbc conectar, i was talking with PowerBi support but they cant gave me any solution. Is not the best with odbc  but for now i think is the one.

      • nmsivasankar's avatar
        nmsivasankar
        Advocate II

        Thanks for your response, Sad to know that MS was not able to offer you the solution.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Same issue.  New to this product and this is very disappointing.

      • rylach's avatar
        rylach
        Helper II

        Same issue.

         

        I installed Npgsql via

         

         

        Register-PackageSource -Name nuget.org -Location https://www.nuget.org/api/v2 -ProviderName NuGet
        Install-Package Npgsql -Verbose

        Restarted system, without effects. I still get the error "this connector requires one or more additional components to be installed before it can be used", just after choosing PostgreSQL data type.

         

        With odbc works without problems but can I update PowerBI Service via Power BI Gateway using ODBC?

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi there,

     

    This popup happens to me even after I installed Npgsql-4.0.0.msi. The solution link didn't show how to get past the popup?

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi there,

     

    This popup happens to me even after I installed Npgsql-4.0.0.msi. The solution link didn't show how to get past the popup?

     

     

    • copytac's avatar
      copytac
      Frequent Visitor

      Personally, I wouldnt use the PostGRE SQL connector. I would create a custom ODBC connection using the typical connection protocols for PostGRE SQL, and then simply use the ODBC connection method within PowerBI to connect to your data source. This bypasses the PostGRE SQL errors. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Actually, after installing Npgsql 4.0.0 and restart the power BI desktop, I can get the Postgres DB login screen to pop up, but when trying to connect, I get the following error: