Note: Before you can connect to a PostgreSQL database in Power Query, you need the Ngpsql data provider for PostgreSQL installed on your computer. Select the driver that matches your Office version (32-bit or 64-bit). See: Which version of Office am I using? for more information. Also make sure you have the provider registered in the machine configuration that matches the most recent .NET version on your device.
Use Excel's Get & Transform (Power Query) experience to connect to a PostgreSQL Database, which is an open source object-relational database system.
Click the Data tab, then Get Data > From Database > From PostgreSQL Database. If you don't see the Get Data button, then click on New Query > From Database > From PostgreSQL Database.
In the Power Query ribbon tab, select From Database > From PostgreSQL Database.
Next
In the PostgreSQL Database dialog box, specify the PostgreSQL Database Server you want to connect to in the Server Name section.
If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.
Select OK.
If the PostgreSQL server requires database user credentials:
In the Access a Database dialog box, enter your username and password.
Select Connect.
Need more help?
You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.
See Also
Clicking on the Download Now (Visit Site) button above will open a connection to a third-party site. Download.com cannot completely ensure the security of the software hosted on third-party sites.
From Igor P. Zenkov & Software Engineering :What do you need to know about free software?
When setting up linked server to third-party Databases, it is recommended to run the third-party provider in out-of-process mode, because when the provider is run in-process (within the same process as SQL Server), then any issues with the provider can affect SQL Server process which could also result in crashing SQL server.
To how to set a provider to run out-of-process, uncheck 'Allow In Process' property of the provider:
There are certain permissions that have to be set on MSDAINITIALIZE to be able to initialize the provider out-of-process and run linked server queries successfully locally and remotely.
MSDAINITIALIZE is a COM class that is provided by OLE DB. This class can parse OLE DB connection strings and load/initialize the provider based on property values in the connection string.
MSDAINITILIAZE is initiated by users connected to SQL Server. If windows authentication is used to connect to SQL Server, then the provider is initialized under the logged in user account. If the logged in user is a SQL login, then provider is initialized under SQL Server service account. Based on the type of login used, permissions on MSDAINITIALIZE have to be provided accordingly.
When these permissions are not set for the logged in users, we get Access Denied errors as below:
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider 'Microsoft.Jet.OLEDB.4.0' for linked server '(null)' reported
an error. Access denied.
Msg 7301, Level 16, State 2, Line 1
Cannot obtain the required interface ('IID_IDBCreateCommand') from OLE DB provider
'Microsoft.Jet.OLEDB.4.0' for linked server '(null)'.
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
An exception has occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The OLEDB Provider 'MSDAORA' for linked server <linked server name> reported an
error. Access denied.
Cannot obtain the required interface ('IID_IDBSchemaRowSet') from OLE DB provider
'MSDAORA' for linked server '<linked server name>'. (Microsoft SQL Server, Error: 7399)
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider 'IBMDADB2.DB2COPY1' for linked server '<linked server name>' reported an error. Access denied.
Msg 7301, Level 16, State 2, Line 1
Cannot obtain the required interface ('IID_IDBCreateCommand') from OLE DB provider 'IBMDADB2.DB2COPY1' for linked server '<linked server name>'.
Server: Msg 7302, Level 16, State 1, Line 1
Could not create an instance of OLE DB provider 'MSDAORA'.
OLE DB error trace [Non-interface error: CoCreate of DSO for MSDAORA returned
0x80070005].
0x80070005 - Essentially implies Access denied.
To be able to execute linked server queries, also set RPC OUT to true on the linked server properties.
Permissions needed to set up linked server with out-of-process provider:
Verify below settings in DCOMCNFG: Start --> Run –> Dcomcnfg
1.Component services -->My Computer ---> Properties verify that below options are set:
In the 'Default Properties' tab:
- 'Enable Distributed COM on this computer' is checked.
- Default Authentication =Connect.
- Default Impersonation Level = Identify or Impersonate.
2.Component services --> My computer --> DCOM Config --> MSDAINITIALIZE
-Right click on MSDAINITIALIZE --> Properties -->Security
-Add the SQL Server service account (if connected to SQL server using SQL login)or windows user account under 'Launch and Activation Permissions', 'Access permissions' and 'Configuration Permissions'.
-Give full rights to these accounts.
-Restart the server
3) Go to dcomcnfg > My computer > Properties > COM Security > Edit Defaults for Access Permissions & Launch and Activation Permissions, and add the SQL Proxy account.
Follow these instructions to be able to edit above DCOM settings on Windows Vista/2008 machine, per
1. Grab the APP ID from the General tab of MSDAINITIALIZE Properties. It should be 2206CDB0-19C1-11D1-89E0-00C04FD7A829
Using regedit, search for the key in the registry. You should find it at HKEY_CLASSES_ROOTAppID{2206CDB0-19C1-11D1-89E0-00C04FD7A829}
Postgresql Native Oledb Provider
Next, follow these instructions to change permissions.
1. Secondary-mouse click on the {2206CDB0-19C1-11D1-89E0-00C04FD7A829} key and select Permissions menu option.
2. Click the Advanced button in the Permissions window and select the Owner tab. Under Change owner to select the local Administrators group and click on Apply/OK and then click Ok again.
3. Then under Permissions window, select the local Administrators group and under Permissions for Administrators select Full Control.
NOTE: DO NOT modify/change any permissions for the TrustedInstaller account.
4. Click on Apply or OK to make the changes effective.
5. Re-run the Computer Services management console (dcomcnfg.exe) and you should now be able to modify the settings for MSDAINITIALIZE package.
6. After making the necessary changes as mentioned above, reset the permissions for the above registry key in the registry settings back to its defaults:
- First make the account 'NT SERVICETrustedInstaller' from the local computer the Owner of the key and then remove Full Control access for the Administrators group, and leave it with only Read access.
Author : Aruna(MSFT), SQL Developer Engineer, Microsoft
Reviewed by : Azim(MSFT), SQL Developer Technical Lead , Microsoft
This is PostgreSQL OLE DB Provider project. OLE DB is the default ADO driver technology, and is used by many programs. No tag defined for this project
Activity Ranking: 3 View project Statistics or Activity View list of RSS feeds available for this project.
Tracker
Tasks There are no public subprojects available SCM Repository (CVS: 33 commits, 1 adds) | Project Admins PgOleDb 1.0.0.20 released0 Comment Read More/Comment User survey0 Comment Read More/Comment |
Posted Dec 14, 2007
By DatabaseJournal.com Staff
[From PostgreSQL Global Development Group]PostgreSQL Native Provider (PGNP) is an OLEDB Provider for PostgreSQL database.
The provider is a thin layer between Microsoft ADO and PostgreSQL API exposed via libpq library. It implements most of the OLEDB interfaces and uses libpq to access a PostgreSQL database.
The article continues athttp://www.postgresql.org/about/news.895
Please enable Javascript in your browser, before you post the comment! Now Javascript is disabled.
Latest Forum Threads | |||
Postgresql Forum | |||
Topic | By | Replies | Updated |
Creating a Table Where Date has to be Now OR Future | Shadowayara | 1 | June 6th, 03:56 PM |
Streaming Replication on a Single Database | lbergeson | 0 | January 30th, 03:19 PM |
Error - SQL state: 22P02 | raj_db | 1 | December 20th, 08:30 AM |
Searching in multi-dimensional array fields | hdany | 0 | December 1st, 06:46 AM |