Environment: Oracle 11.2.0.1.0 RHEL5.3 64bit mysql Server version: 5.5.9
1: Download [ODBC Driver Manager] unionODBC2.2.14, decompress the package, and put it in the/u01/app/tools/unionodbc directory.
[Oracle @ wonder tools] $ ls/u01/app/tools/unionodbc/
Bin include lib
2: Download mysql-connector-odbc-3.51.30-linux-rhel5-x86-64bit.tar.gz and decompress it to my5.
[Oracle @ szmlserver12_32 tools] $ ls/u01/app/tools/
My5 odbc. ini unionodbc
3: Configure ODBC data source for MySQLConnector/ODBC driver
[Oracle @ wonder tools] $ cat/u01/app/tools/odbc. ini
[Mydbc3]
Driver =/u01/app/tools/my5/lib/libmydbc3.so
SERVER = 22.4.22.16
PORT = 3306
USER = soft
PASSWORD = Ugfd3589
DATABASE = estore
OPTION = 3
SOCKET =
4. Set Environment Variables
[Oracle @ wonder tools] $ cat ~ /. Bash_profile
PATH = $ PATH: $ HOME/bin
Export PATH
Export ORACLE_BASE =/u01/app
Export ORACLE_HOME =/u01/app/oracle
Export ORACLE_SID = hidb
Export LANG = en
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/u01/app/tools/unionodbc/lib
Export ODBCINI =/u01/app/tools/odbc. ini
Export PATH = $ ORACLE_HOME/bin: $ PATH:/u01/app/tools/unionodbc/bin
Red is the new part
5: the connection is successfully tested.
[Oracle @ wonder tools] $ isql mydbc3-v
+ --------------------------------------- +
| Connected! |
|
| SQL-statement |
| Help [tablename] |
| Quit |
|
+ --------------------------------------- +
SQL>
6: Configure listener. ora
[Grid @ wonder ~] $ Cat/u01/app/11.2.0/grid/network/admin/listener. ora
# Listener. ora Network Configuration File:/u01/app/11.2.0/grid/network/admin/listener. ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = wonder.easou.com) (PORT = 1521 ))
)
)
ADR_BASE_LISTENER =/u01/app/11.2.0
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON # line added by Agent
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER = OFF
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = mydbc3)
(ORACLE_HOME =/u01/app/oracle)
(PROGRAM = dg4odbc)
(ENVS = LD_LIBRARY_PATH =/u01/app/oracle/bin:/u01/app/tools/unionodbc/lib:/u01/app/tools/my5/lib)
)
)