环境:Oracle 11.2.0.1.0 RHEL5.3 64bit mysql Server version: 5.5.9
1:下载[ODBC Driver Manager] unionODBC2.2.14,解压后放入/u01/app/tools/unionodbc 目录下
[oracle@wonder tools]$ ls /u01/app/tools/unionodbc/
bin include lib
2:下载mysql-connector-odbc-3.51.30-linux-rhel5-x86-64bit.tar.gz解压重命名到my5
[oracle@szmlserver12_32 tools]$ ls /u01/app/tools/
my5 odbc.ini unionodbc
3:配置 ODBC data source for MySQLConnector/ODBC driver
[oracle@wonder tools]$ cat /u01/app/tools/odbc.ini
[myodbc3]
Driver =
SERVER = 22.4.22.16
PORT = 3306
USER = soft
PASSWORD = Ugfd3589
DATABASE = estore
OPTION = 3
SOCKET =
4:设置环境变量
[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
export ODBCINI=/u01/app/tools/odbc.ini
export PATH=$ORACLE_HOME/bin:$PATH
红色为新增部分
5:测试连接成功
[oracle@wonder tools]$ isql myodbc3 -v
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
6:配置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