5
responses

Has anyone managed to setup ODBC for Oracle?, please help i a running Nxlog on redhat 7

AskedAugust 27, 2020 - 11:11am

Answer (1)

Hello,

Could you please share with us your *conf and/or briefly explain what do you want to achieve?

Also, if you have any error info - it could be useful.

Thanks,

Rafal

Comments (4)

  • SM_778470's picture

    /etc/odbcinst.ini

    # Example driver definitions

    # Driver from the postgresql-odbc package
    # Setup from the unixODBC package
    [PostgreSQL]
    Description = ODBC for PostgreSQL
    Driver = /usr/lib/psqlodbcw.so
    Setup = /usr/lib/libodbcpsqlS.so
    Driver64 = /usr/lib64/psqlodbcw.so
    Setup64 = /usr/lib64/libodbcpsqlS.so
    FileUsage = 1

    # Driver from the mysql-connector-odbc package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc5.so
    Setup = /usr/lib/libodbcmyS.so
    Driver64 = /usr/lib64/libmyodbc5.so
    Setup64 = /usr/lib64/libodbcmyS.so
    FileUsage = 1

    [Oracle-driv]
    Description = Oracle ODBC driver for Oracle 19
    Driver = /usr/lib/oracle/19.8/client64/lib/libsqora.so.19.1
    Setup =
    FileUsage =
    CPTimeout =
    CPReuse =

    /etc/odbc.ini

    [tito_db]
    Description = myoracledb database
    Driver = Oracle-driv
    Trace = yes
    TraceFile = /tmp/odbc_oracle.log
    Servername = thitod.bihl.co.bw
    Database = //xxx.xxx.xxx.xxx:1685/thitod
    UserID = thitoread
    Password = XXXX
    Port = 1685

    /etc/oracle/tnsnames.ora

    thitod =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.113.50)(PORT = 1685))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = thitod)
    )
    )

    This are the configurations i have to setup a ODBC connection to connect to the remote DB server located on XXX.XXX.XXX.XXX.

    I need to setup NXLOG to read from the remote DB, however i am still stuck on getting ODBC to work.
    When i run the isql command to connect to the db i get the error below

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