Forum Discussion
Connect PowerBI Desktop with PostgreSQL
I have given up for now :(. Now I can't even use the previously working odbc driver to connect.
Maybe we can all vote on this UserVoice idea:
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7170610-aws-rds-postgresql
Has anyone actually managed to get the Postgre connector to work? This is driving me crazy!
- I have installed Microsoft Power Bi version: 2.47.4766.801 64-bit (June 2017).
- I have installed Npgsql 3.2.3.
- I have installed VS Studio 2017 Community and added the dll files to the assembly using the command prompt.
- I have edited my machine.config file so it looks like this:
<system.data>
<DbProviderFactories>
<add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSQL Server" type="Npgsql.NpgsqlFactory, Npgsql, Version=3.2.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>
</DbProviderFactories>
</system.data> - I am running Windows 10 so I already have .NET framework 4.5 installed
- I restart my PC, open up Power Bi and try to connect to Postgre again and I get the same message that the connector requires one or more additional components to be installed before it can be used.
The tracer log from my Power Bi can be found here:
https://www.sendspace.com/file/vleze0
How can I get this thing to work?
Thanks.
Ian
- ianwuk9 years agoHelper III
Hello.
The issue is now fixed.
You must use Npgsql 3.1.8. Uninstall any newer version first. Install that (and make sure to install to GAC) and then restart your PC and Power Bi works fine. If you use a newer version of Npgsql it doesn't work.
Give it a try kschaefers
- michaeldurieux9 years agoHelper I
I confirm that it is working for me.
During the installation of NGPSQL, did you tick the GAC installation ?
You need to tick the two checkboxes.
- Anonymous9 years agoNot applicable
I run into the problem of certificate when trying to access Managed Postgresql on Azure.
I've tried to install 3.1.8 (there are no option, but installing to GAC is mentioned) and restarted.
ianwukdid you doing anything else? (machine.config? ...)
I still get this:
Details: "An error happened while reading data from the provider: 'TlsClientStream.ClientAlertException: CertificateUnknown: Server certificate was not accepted. The specified hostname was not present in the certificate. at TlsClientStream.TlsClientStream.SendAlertFatal(AlertDescription description, String message) 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)'"
ianwukdid you do anything else?
- Anonymous9 years agoNot applicable
I was finally able to connect with:
- npgsql 3.1.8 (restart, confirmed they are in gacutils and machine.config)
- https://docs.microsoft.com/en-us/azure/postgresql/concepts-ssl-connection-security
- changed host to <servername>.database.windows.net from <servername>.postgres.database.azure.com.
- (not sure if needed): added the server certificate: https://docs.microsoft.com/en-us/azure/postgresql/concepts-ssl-connection-security