This discussion is archived
11 Replies Latest reply: Apr 3, 2013 8:20 PM by 999211 RSS

Error While Querying DB Link from Oracle 10g to Postgres 8.2

999211 Newbie
Currently Being Moderated
Hi,

I have installed unixodbc 2.3.1, postgres odbc driver (psqlodbc-07.03) and dg4odbc 11.2

On querying : select sysdate from dual@dblink_postgresql, the following error occurs:

ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found {01000}
ORA-02063: preceding 2 lines from DBLINK_POSTGRES

Similar error appears in the trace file as well.

[unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a'

$ isql -v postgresql postgres postgres@2012
[01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found
[ISQL]ERROR: Could not SQLConnect


However the file is present in the location and has no permission related problems.

$ pwd
/oracle/psqlodbc/lib
$ ls -lrt
total 2952
-rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
-rw-r--r-- 1 oracle oinstall 731419 Mar 25 15:28 libpsqlodbc.a
-rw-r--r-- 1 oracle oinstall 12215 Mar 25 22:11 win_md5.o
-rw-r--r-- 1 oracle oinstall 18100 Mar 25 22:11 options.o
-rw-r--r-- 1 oracle oinstall 13196 Mar 25 22:11 misc.o
-rw-r--r-- 1 oracle oinstall 4234 Mar 25 22:11 lobj.o
-rw-r--r-- 1 oracle oinstall 122442 Mar 25 22:11 info.o
-rw-r--r-- 1 oracle oinstall 26464 Mar 25 22:11 execute.o
-rw-r--r-- 1 oracle oinstall 22070 Mar 25 22:11 environ.o
-rw-r--r-- 1 oracle oinstall 8633 Mar 25 22:11 drvconn.o
-rw-r--r-- 1 oracle oinstall 83758 Mar 25 22:11 convert.o
-rw-r--r-- 1 oracle oinstall 62529 Mar 25 22:11 connection.o
-rw-r--r-- 1 oracle oinstall 5685 Mar 25 22:11 columninfo.o
-rw-r--r-- 1 oracle oinstall 19724 Mar 25 22:11 bind.o
-rw-r--r-- 1 oracle oinstall 3768 Mar 25 22:11 tuplelist.o
-rw-r--r-- 1 oracle oinstall 2816 Mar 25 22:11 tuple.o
-rw-r--r-- 1 oracle oinstall 36770 Mar 25 22:11 statement.o
-rw-r--r-- 1 oracle oinstall 10490 Mar 25 22:11 socket.o
-rw-r--r-- 1 oracle oinstall 74140 Mar 25 22:11 results.o
-rw-r--r-- 1 oracle oinstall 22686 Mar 25 22:11 qresult.o
-rw-r--r-- 1 oracle oinstall 1977 Mar 25 22:11 psqlodbc.o
-rw-r--r-- 1 oracle oinstall 25893 Mar 25 22:11 pgtypes.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 pgapi30.o
-rw-r--r-- 1 oracle oinstall 34071 Mar 25 22:11 parse.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 odbcapi30.o
-rw-r--r-- 1 oracle oinstall 41540 Mar 25 22:11 odbcapi.o
-rw-r--r-- 1 oracle oinstall 11601 Mar 25 22:11 multibyte.o
-rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 info30.o
-rw-r--r-- 1 oracle oinstall 5972 Mar 25 22:11 gpps.o
-rw-r--r-- 1 oracle oinstall 37546 Mar 25 22:11 dlg_specific.o

My odbc.ini and init4dg4odbc looks like below:

$ pg odbc.ini
[postgresql]
Description = Test to Postgres
Driver = /oracle/psqlodbc/lib/libpsqlodbc.a
Trace = Yes
TraceFile = postgres.log
Database = postgres
Servername = TCLDSAPORTUAT
UserName = postgres
Password = postgres@2012
Port = 5432
Protocol = TCP
ReadOnly = Yes
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No


$ pg initdg4odbc.ora
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC

#
# HS init parameters
#
HS_FDS_CONNECT_INFO = postgresql
HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_SHAREABLE_NAME = /oracle/unixodbc64/lib/libodbc.so
#
# ODBC specific environment variables
#
set ODBCINI=/oracle/unixodbc64/etc/odbc.ini


#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>


I found similar threads in the forum but could not find solution for this problem.

Please help to resolve this issue.

Thanks,
Akanksha

Edited by: 996208 on Mar 26, 2013 5:35 AM
  • 1. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi,

    My listener.ora looks like below:

    SID_LIST_LISTENER_PG =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4odbc)
    (ORACLE_HOME = /oracle/dg4odbc)
    (ENV = "LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc_07/lib")
    (PROGRAM = dg4odbc)
    )
    )


    LISTENER_PG =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cdiuat)(PORT = 1511))
    )
    )


    #ADR_BASE_LISTENER_PG = /oracle/dg4odbc


    Tnsping is also successful

    $ tnsping dg4odbc

    TNS Ping Utility for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production on 26-MAR-2013 17:35:38

    Copyright (c) 1997, 2010, Oracle. All rights reserved.

    Used parameter files:


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=cdiuat)(PORT=1511)) (CONNECT_DATA=(SID=dg4odbc)) (HS=OK))
    OK (10 msec)

    Thanks,
    Akanksha

    Edited by: 996208 on Mar 26, 2013 5:03 AM
  • 2. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    mkirtley-Oracle Expert
    Currently Being Moderated
    Akanksha,
    In the gateway listener.ora you have -

    (ENV = "LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc_07/lib")

    but the file is in the directory

    /oracle/psqlodbc/lib

    Change the listener ENV entry then stop and start the listener and try again.

    Regards,
    Mike
  • 3. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    kgronau Guru
    Currently Being Moderated
    Are you really sure that this is the correct library ('/oracle/psqlodbc/lib/libpsqlodbc.a)?

    Best would be to first check with isql if you can connect to the Postgres database natively with the ODBC driver.
    Before being able to use isql, pleas make sure you have set the LIBPATH and ODBCINI environment variable. Then call isql using this syntax: isql -v DSN [UID [PWD]]
    - Klaus
  • 4. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi Mike,

    Thanks for pointing out the mistake. The incorrect entry in the listener was because I installed postgres odbc driver twice in separate folders.

    For now, I changed the entry in listener.ora and stopped and started it, still facing the same error.

    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found {01000}
    ORA-02063: preceding 2 lines from DBLINK_POSTGRES

    listener.ora now looks like:

    SID_LIST_LISTENER_PG =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4odbc)
    (ORACLE_HOME = /oracle/dg4odbc)
    (ENV = "LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc/lib")
    (PROGRAM = dg4odbc)
    )
    )


    LISTENER_PG =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cdiuat)(PORT = 1511))
    )
    )


    #ADR_BASE_LISTENER_PG = /oracle/dg4odbc


    Thanks,
    Akanksha
  • 5. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi Klaus,

    I changed the ENV entry in listener.ora, still the same issue. Now listener.ora looks like:

    SID_LIST_LISTENER_PG =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4odbc)
    (ORACLE_HOME = /oracle/dg4odbc)
    (ENV = "LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc/lib")
    (PROGRAM = dg4odbc)
    )
    )


    LISTENER_PG =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = cdiuat)(PORT = 1511))
    )
    )


    #ADR_BASE_LISTENER_PG = /oracle/dg4odbc

    With isql aslo, I am getting the same error:

    $ export LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc/lib
    $ export ODBCINI=/oracle/unixodbc64/etc/odbc.ini
    $ isql -v postgresql postgres postgres@2012
    [01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/libpsqlodbc.a' : file not found
    [ISQL]ERROR: Could not SQLConnect

    odbc.ini looks like :

    [postgresql]
    Description = Test to Postgres
    Driver = /oracle/psqlodbc/lib/libpsqlodbc.a
    Trace = Yes
    TraceFile = postgres.log
    Database = postgres
    Servername = TCLDSAPORTUAT
    UserName = postgres
    Password = postgres@2012
    Port = 5432
    Protocol = TCP
    ReadOnly = Yes
    RowVersioning = No
    ShowSystemTables = No
    ShowOidColumn = No
    FakeOidIndex = No


    Do I need to make any entry in odbcinst.ini ?

    I read somewhere on the net that psql odbc driver should be with extension .so

    But I am not able to convert libpsqlodbc.a to libpsqlodbc.so. Is that an issue?

    Thanks,
    Akanksha
  • 6. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    kgronau Guru
    Currently Being Moderated
    Hi Akanksha,
    I'm not sure if you really need a "*.so" library. Before you can test DG4ODBC connection you have to get the ODBC driver working using isql. islq is a native ODBC test utility which connects to the foreign database just using a driver manager and the ODBC driver. As long as this utility does not connect, you can't connect with DG4ODBC either.

    So for all tests make sure that you have set this env:
    $ export LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc/lib
    $ export ODBCINI=/oracle/unixodbc64/etc/odbc.ini
    $ isql -v postgresql postgres postgres@2012



    I currently do not have access to an AIX box, but I would perform these 2 tests:

    1. Change in the odbc.ini the DRIVER parameter to psqlodbc.la, then test again isql connection.
    2. if this fails, what about changing the permissions of libpsqlodbc.a to 755 (rwx,rx,rx) and then test again the connection using isql.

    If both methods fail, please describe more detailed from where you downloaded the ODBC driver and how you installed the driver.

    Thanks,
    Klaus
  • 7. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi Klaus,

    I performed both the tests suggested by you, but still the same error.

    Before testing isql, I had exported the environment variables properly and have shared the results in previous update.

    I downloaded the psqlodbc-07.03.0200.tar.gz file from http://www.postgresql.org/ftp/odbc/versions/src/

    Steps followed to install were:

    1) gunzip psqlodbc-07.03.0200.tar.gz
    2) tar -xvf psqlodbc-07.03.0200.tar
    3) ./configure --prefix=/oracle/psqlodbc
    4) make
    5) make install

    Two folders were created iin /oracle/psqlodbc viz. lib and share

    Then I followed the following steps:

    $cd /oracle/psqlodbc/lib
    $ls
    psqlodbc.la libpsqlodbc.a

    I extracted the libpsqlodbc.a to get the file with .so extension but no such file was created.

    ar -X32-64 -xv libpsqlodbc.a

    $ls -lrt
    $ ls -lrt
    total 2952
    -rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
    -rwxr-xr-x 1 oracle oinstall 731419 Mar 25 15:28 libpsqlodbc.a
    -rw-r--r-- 1 oracle oinstall 12215 Mar 25 22:11 win_md5.o
    -rw-r--r-- 1 oracle oinstall 18100 Mar 25 22:11 options.o
    -rw-r--r-- 1 oracle oinstall 13196 Mar 25 22:11 misc.o
    -rw-r--r-- 1 oracle oinstall 4234 Mar 25 22:11 lobj.o
    -rw-r--r-- 1 oracle oinstall 122442 Mar 25 22:11 info.o
    -rw-r--r-- 1 oracle oinstall 26464 Mar 25 22:11 execute.o
    -rw-r--r-- 1 oracle oinstall 22070 Mar 25 22:11 environ.o
    -rw-r--r-- 1 oracle oinstall 8633 Mar 25 22:11 drvconn.o
    -rw-r--r-- 1 oracle oinstall 83758 Mar 25 22:11 convert.o
    -rw-r--r-- 1 oracle oinstall 62529 Mar 25 22:11 connection.o
    -rw-r--r-- 1 oracle oinstall 5685 Mar 25 22:11 columninfo.o
    -rw-r--r-- 1 oracle oinstall 19724 Mar 25 22:11 bind.o
    -rw-r--r-- 1 oracle oinstall 3768 Mar 25 22:11 tuplelist.o
    -rw-r--r-- 1 oracle oinstall 2816 Mar 25 22:11 tuple.o
    -rw-r--r-- 1 oracle oinstall 36770 Mar 25 22:11 statement.o
    -rw-r--r-- 1 oracle oinstall 10490 Mar 25 22:11 socket.o
    -rw-r--r-- 1 oracle oinstall 74140 Mar 25 22:11 results.o
    -rw-r--r-- 1 oracle oinstall 22686 Mar 25 22:11 qresult.o
    -rwxr-xr-x 1 oracle oinstall 1977 Mar 25 22:11 psqlodbc.o
    -rw-r--r-- 1 oracle oinstall 25893 Mar 25 22:11 pgtypes.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 pgapi30.o
    -rw-r--r-- 1 oracle oinstall 34071 Mar 25 22:11 parse.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 odbcapi30.o
    -rw-r--r-- 1 oracle oinstall 41540 Mar 25 22:11 odbcapi.o
    -rw-r--r-- 1 oracle oinstall 11601 Mar 25 22:11 multibyte.o
    -rw-r--r-- 1 oracle oinstall 706 Mar 25 22:11 info30.o
    -rw-r--r-- 1 oracle oinstall 5972 Mar 25 22:11 gpps.o
    -rw-r--r-- 1 oracle oinstall 37546 Mar 25 22:11 dlg_specific.o


    Thanks,
    Akanksha
  • 8. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    mkirtley-Oracle Expert
    Currently Being Moderated
    Hi,
    The file permissions look okay as libpsqlodbc.a has -rwxr-xr-x.
    I suggest you set up stracee or truss for the isql execution and see if it gives further information about why libpsqlodbc.a give the 'not found' error.

    Regards,
    Mike
  • 9. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi Mike,

    I used the truss option for diagnosis, the output is really long and shows the same error at the end of execution:

    $truss isql -v postgresql postgres postgres@2012
    .
    .
    .
    .
    .
    .
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    access("/usr/lib/nls/msg/en_US/execerr.cat", 0) = 0
    _getpid()                                       = 27262980
    kopen("/usr/lib/nls/msg/en_US/execerr.cat", O_RDONLY) = 3
    kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
    kfcntl(3, F_SETFD, 0x0000000000000001) = 0
    kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
    kread(3, "\0\001 ù\001\001 I S O 8".., 4096) = 4096
    lseek(3, 0, 1) = 4096
    lseek(3, 0, 1) = 4096
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    _getpid()                                       = 27262980
    lseek(3, 0, 1) = 4096
    lseek(3, 4639, 0) = 4639
    kread(3, "\t 0 5 0 9 - 1 9 4 E x".., 4096) = 1686
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    getuidx(4) = 207
    getuidx(2) = 207
    getuidx(1) = 207
    getgidx(4) = 203
    getgidx(2) = 203
    getgidx(1) = 203
    kload("/usr/lib/nls/loc/en_US__64", 17301632, "/oracle/unixodbc64/lib") = 648518346072918576
    kioctl(1, 22528, 0x0000000000000000, 0x0000000000000000) = 0
    [01000][unixODBC][Driver Manager]Can't open lib '/oracle/psqlodbc/lib/psqlodbc.o' : file not found
    kwrite(1, " [ 0 1 0 0 0 ] [ u n i x".., 99)     = 99
    [ISQL]ERROR: Could not SQLConnect
    kwrite(2, " [ I S Q L ] E R R O R :".., 34) = 34
    kfcntl(1, F_GETFL, 0x0000000010DF0051) = 67110914
    kfcntl(2, F_GETFL, 0x0000000010DF0051) = 67110914
    _exit(1)


    Do I need to install postgres software also?

    While installing postgres odbc driver in /oracle/psqlodbc only two folders were created viz. lib and share

    In lib folder two files were created viz. psqlodbc.la and libpsqlodbc.a

    And everybody on the net seems to refer psqlodbc.so in the "Driver = " parameter

    Today, I extracted the libpsqlodbc.a by using ar -X 64 -xv libpsqlodbc.a again, still no file with .so has been created.

    $ ls -lrt
    total 2952
    -rwxr-xr-x 1 oracle oinstall 663 Mar 25 15:28 psqlodbc.la
    -rwxr-xr-x 1 oracle oinstall 731419 Mar 28 13:51 libpsqlodbc.a
    -rw-r--r-- 1 oracle oinstall 12215 Apr 01 13:50 win_md5.o
    -rw-r--r-- 1 oracle oinstall 3768 Apr 01 13:50 tuplelist.o
    -rw-r--r-- 1 oracle oinstall 2816 Apr 01 13:50 tuple.o
    -rw-r--r-- 1 oracle oinstall 36770 Apr 01 13:50 statement.o
    -rw-r--r-- 1 oracle oinstall 10490 Apr 01 13:50 socket.o
    -rw-r--r-- 1 oracle oinstall 74140 Apr 01 13:50 results.o
    -rw-r--r-- 1 oracle oinstall 22686 Apr 01 13:50 qresult.o
    -rw-r--r-- 1 oracle oinstall 1977 Apr 01 13:50 psqlodbc.o
    -rw-r--r-- 1 oracle oinstall 25893 Apr 01 13:50 pgtypes.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 pgapi30.o
    -rw-r--r-- 1 oracle oinstall 34071 Apr 01 13:50 parse.o
    -rw-r--r-- 1 oracle oinstall 18100 Apr 01 13:50 options.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 odbcapi30.o
    -rw-r--r-- 1 oracle oinstall 41540 Apr 01 13:50 odbcapi.o
    -rw-r--r-- 1 oracle oinstall 11601 Apr 01 13:50 multibyte.o
    -rw-r--r-- 1 oracle oinstall 13196 Apr 01 13:50 misc.o
    -rw-r--r-- 1 oracle oinstall 4234 Apr 01 13:50 lobj.o
    -rw-r--r-- 1 oracle oinstall 706 Apr 01 13:50 info30.o
    -rw-r--r-- 1 oracle oinstall 122442 Apr 01 13:50 info.o
    -rw-r--r-- 1 oracle oinstall 5972 Apr 01 13:50 gpps.o
    -rw-r--r-- 1 oracle oinstall 26464 Apr 01 13:50 execute.o
    -rw-r--r-- 1 oracle oinstall 22070 Apr 01 13:50 environ.o
    -rw-r--r-- 1 oracle oinstall 8633 Apr 01 13:50 drvconn.o
    -rw-r--r-- 1 oracle oinstall 37546 Apr 01 13:50 dlg_specific.o
    -rw-r--r-- 1 oracle oinstall 83758 Apr 01 13:50 convert.o
    -rw-r--r-- 1 oracle oinstall 62529 Apr 01 13:50 connection.o
    -rw-r--r-- 1 oracle oinstall 5685 Apr 01 13:50 columninfo.o
    -rw-r--r-- 1 oracle oinstall 19724 Apr 01 13:50 bind.o

    Thanks,
    Akanksha
  • 10. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    MMEGE Explorer
    Currently Being Moderated
    Hi,

    In your configuration, we can see this parameter in the gateway init file which is specifying the ODBC Driver Manager:
    HS_FDS_SHAREABLE_NAME = /oracle/unixodbc64/lib/libodbc.so

    In your environment path, the path to ODBC Driver Manager is not specified.
    You have:
    export LIBPATH=/oracle/dg4odbc/lib:/oracle/psqlodbc/lib
    instead of
    export LIBPATH=/oracle/unixodbc64/lib:/oracle/dg4odbc/lib:/oracle/psqlodbc/lib

    Then when you configure ODBC, try these commands:
    ==>./configure prefix=/oracle/psqlodbc enable-odbc --without-readline
    --without-readline is needed for the separate ODBC if you don't have the readline package installed (whatever that is).

    ==>make
    ==>make install

    Regards,

    Mireille
  • 11. Re: Error While Querying DB Link from Oracle 10g to Postgres 8.2
    999211 Newbie
    Currently Being Moderated
    Hi Mireille,

    I corrected the environment variable and configuring postgres odbc with suggested options but still same issue.

    I have done fresh installation of unix odbc manager and postgres odbc with root user in separate folders....still same issue.

    On searching over net, I found some utilities like dltest, file, grep -R to check the libraries.

    One query:

    # ldd /oracle/unixodbc/lib/libodbc.so
    /oracle/unixodbc/lib/libodbc.so needs:
    /usr/lib/libc.a(shr_64.o)
    /usr/lib/libpthread.a(shr_xpg5_64.o)
    /usr/lib/libiconv.a(shr4_64.o)
    /unix
    /usr/lib/libcrypt.a(shr_64.o)

    What does the above output mean? Does libodbc.so require these files to link?

    However, dltest is successful

    # dltest /oracle/unixodbc/lib/libodbc.so SQLConnect
    SUCCESS: Loaded /oracle/unixodbc/lib/libodbc.so
    SUCCESS: Found SQLConnect

    Thanks,
    Akanksha

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points