2 Replies Latest reply: Feb 19, 2013 3:45 AM by 991892 RSS

    Oracle instant client & unixODBC did not work on Fedora 4

    791065
      Dear experts,
      Please try to fix the following problem.
      I want to connect to oracle 10g on windows XP from client that runs Fedora 4 using ODBC.

      *1.     I installed oracle instant client on Fedora:*

      •     oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm
      •     oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
      •     oracle-instantclient11.2-odbc-11.2.0.1.0-1.i386.rpm
      •     oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.i386.rpm

      *2.     Set the following environment variables:*

      •     ORACLE_HOME          =/usr/lib/oracle/11.2/client
      •     ORACLE_HOME_LISTNER=/usr/lib/oracle/11.2/client/bin
      •     LD_LIBRARY_PATH     =/usr/lib/oracle/11.2/client/lib
      •     SQLPATH               =/usr/lib/oracle/11.2/client/lib
      •     TNS_ADMIN               =/usr/lib/oracle/11.2/client/bin
      •     TWO_TASK               =//xxx.xxx.xxx.xxx:1521/orcl

      *3.     Test connection from Fedora to Windows and it works perfect.*
      sqlplus system/pass@//xxx.xxx.xxx.xxx:1521/orcl

      *4.     Intsall unixODBC-2.3.0.tar.gz*

      *5.     Add Oracle ODBC entry in odbc.ini*

      [ORCL]
      Driver          = Oracle 11g ODBC driver
      ServerName     = xxx.xxx.xxx.xxx
      Database     = orcl
      DSN           = ORCL
      Port          = 1521

      *6.     And this’s the Oracle ODBC driver entry in odbcinst.ini*

      [Oracle 11g ODBC driver]
      Description          = Oracle ODBC driver for Oracle 11g
      Driver               = /usr/lib/oracle/11.2/client/lib/libsqora.so.11.1
      Driver64          =
      Setup               =
      Setup64          =
      UsageCount          =
      CPTimeout          =
      CPReuse          =
      FileUsage          =

      *7.     Now, isql -v orcl system pass, fails and reports the following error:*

      [S1000][unixODBC][Oracle][ODBC][Ora]ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
      [ISQL]ERROR: Could not SQLConnect

      Here’s my tnsnames.ora:

      ORCL =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
      (CONNECT_DATA =
      (SID = ORCL)
      (SERVICE_NAME = ORCL)
      )
      )

      EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      )
      (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
      )
      )

      Here’s my listener.ora:

      SID_LIST_ORCL =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = ORCL)
      (ORACLE_HOME = /usr/lib/oracle/11.2/client)
      (GLOBAL_NAME = ORCL)
      )
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /usr/lib/oracle/11.2/client)
      (PROGRAM = extproc)
      )

      )

      ORCL =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      )
      )

      Here’s my sqlnet.ora:
      SQLNET.AUTHENTICATION_SERVICES= (NTS)
      NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

      tnsnames.ora, listener.ora & sqlnet.ora are at /usr/lib/oracle/11.2/client/bin

      Please I’m waiting your help, sorry for long post.
      Best regards,

      Edited by: 788062 on Aug 15, 2010 2:32 PM