Bug #78242 Oracle HS fails to operate on mysql-connector-odbc-5.3.4-1.el7
Submitted: 27 Aug 2015 13:21 Modified: 30 Nov 2015 5:28
Reporter: Станислав Сухолёт Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.3.4-1.el7 OS:Oracle Linux (OEL7.1 3.10.0-229.el7.x86_64)
Assigned to: Assigned Account CPU Architecture:Any

[27 Aug 2015 13:21] Станислав Сухолёт
Description:
/usr/lib64/libmyodbc5a.so and /usr/lib64/libmyodbc5w.so fails to load by Oracle HS service (dg4odbc) with following diagnostics:

ANSI version (/usr/lib64/libmyodbc5a.so)
[...skipped...]
Entered hgolofns at 2015/08/27-14:00:07
 libname=/usr/lib64/libmyodbc5a.so, funcname=SQLColAttributeW
 peflerr=6521, libname=/usr/lib64/libmyodbc5a.so, funcname=SQLColAttributeW
 hoaerr:28500
Exiting hgolofns at 2015/08/27-14:00:07
Failed to load ODBC library symbol: /usr/lib64/libmyodbc5a.so(SQLColAttributeW)
Exiting hgolofn, rc=28500 at 2015/08/27-14:00:07
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:424 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway:  NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:113 FUNCTION:hgoexit() ID:Connection context

UNICODE version (/usr/lib64/libmyodbc5w.so)
[...skipped...]
Entered hgolofns at 2015/08/27-14:01:46
 libname=/usr/lib64/libmyodbc5w.so, funcname=SQLSetDescRec
 peflerr=6521, libname=/usr/lib64/libmyodbc5w.so, funcname=SQLSetDescRec
 hoaerr:28500
Exiting hgolofns at 2015/08/27-14:01:46
Failed to load ODBC library symbol: /usr/lib64/libmyodbc5w.so(SQLSetDescRec)
Exiting hgolofn, rc=28500 at 2015/08/27-14:01:46
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:424 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway:  NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:113 FUNCTION:hgoexit() ID:Connection context

How to repeat:
1. Install oracle 11.2.0.4 on OEL 7.1
2. enable yum repository "MySQL community) (rpm -ihv https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm)
3. create odbc connection to some mysql server:
==========[/etc/odbc.ini]=========
[customers]
Description         = Customers Database on the MariaDB Cluster
Driver              = MySQL ODBC 5.3 Unicode Driver
#Driver            = MySQL ODBC 5.3 ANSI Driver
Database        = customers
Server             = 10.10.10.217
User                = oracle
Password       = password
Port                 = 3306
CHARSET       = utf8
==============================
4. create HS config:
==[/opt/oracle/product/11.2.0/db_1/hs/admin/initmysql.ora]==
HS_FDS_CONNECT_INFO = customers
#HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc.so
#HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5a.so
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc5w.so

set ODBCINI= /etc/odbc.ini
HS_NLS_NCHAR=AL32UTF8
HS_LANGUAGE=american_america.al32utf8
HS_FDS_TRACE_LEVEL = 4
===============================================

5. Edit configuration for the oracle listener:
==[/opt/oracle/product/11.2.0/db_1/network/admin/listener.ora]==
ADR_BASE_LISTENER = /opt/oracle
LOGGING_LISTENER = ON
CONNECT_TIMEOUT_LISTENER = 180

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
      (SID_DESC =
            (SID_NAME = mysql)
            (PROGRAM = dg4odbc)
      )
      (SID_DESC =
            (SID_NAME = ORADB)
      )
  )
=======================================================
6. restart listener: 
$ lsnrctl stop; lsnrctl start
7. create database link in oracle:
$ sqlplus "/as sysdba" <<EOF
create public database link mysql 
  connect to "oracle" 
  identified by "password" 
  using 'mysql';
EOF
8. test the link:
$ sqlplus "/as sysdba" <<EOF
select 'x' from dual@MYSQL;
EOF
9. check the logfile at the /opt/oracle/product/11.2.0/db_1/hs/log/
[30 Oct 2015 5:28] Chiranjeevi Battula
Hello Станислав Сухолёт,

Thank you for the bug report.
As per your steps, you are loading the driver directly and actually you should load the Driver Manager first.
Here are some steps attaching for creating connection between Oracle to MySQL.

Thanks,
Chiranjeevi.
[30 Oct 2015 5:29] Chiranjeevi Battula
steps

Attachment: 78242_Steps.txt (text/plain), 16.06 KiB.

[1 Dec 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".