Skip to Content
avatar image
Former Member

How to Access External PostgreSQL Database from SAP On Linux?

Hi all!

I have Linux-Orale11-ERP6.0. I need connect to an external database PostgreSQL on Linux. I installed the driver ODBC on Linux-Oracle11-ERP6.0 and command isql-v<alias> connect to PostgreSQL:

root@sap etc# isql -v <alias>




help tablename




How do I now configure the Oracle DB Link?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 25, 2011 at 10:24 AM

    To use an external database from ABAP there are two prerequisites necessary:

    - a database client for the target database

    - a database interface library (libdb

    The latter is not existing for Postgres and hence you can't access the database directly from ABAP.


    Add comment
    10|10000 characters needed characters exceeded

  • Aug 26, 2011 at 06:30 AM

    Hello Dmitry,

    Markus is of course right - there is no direct way to access PostgreSQL databases from ABAP.

    However, since you're using another DBMS from a vendor that loves to integrate everything into one database, there is an option to do that nevertheless.

    It's called Oracle heterogeneous services that allows you to create a dblink to a ODBC datasource.

    Once in a long forgotten time I wrote a blog on how to do that for a MaxDB database: [Suck that data out ! Connect from Oracle to MaxDB|] [original link is broken] [original link is broken] [original link is broken];.

    Be very clear about that this is a technique that is used +_very_ +rarely. So, maybe I would not try to use the dblink directly in my ABAP code, but get the data into Oracle first (e.g. with a materialized view or a staging table) and use this to access it in ABAP.

    Ah, well... all this is of course only possible if your license for Oracle allows this to do. If you bought the Oracle license via SAP bundled to your NetWeaver, then this option is not covered!

    Anyway - hope this helps.



    You may also want to have a look at UD CONNECT from the BW component or you use a J2EE instance and JDBC access...

    Add comment
    10|10000 characters needed characters exceeded