oracle如何使用odbc连接dm7
小编给大家分享一下oracle如何使用odbc连接dm7,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
1 在oracle服务器创建dm的数据源
1.1 先安装unixODBC-2.3.0
上传软件包到服务器,运行以下命令:
tar zxf unixODBC-2.3.0.tar.gz cd unixODBC-2.3.0 ./configure --with-iconv-char-enc=GB18030 --enable-iconv=yes make && make install |
1.2 配置unixODBC
cd /usr/local/etc vim odbc.ini [DM7] Description = DM ODBC DSN Driver = DM7 ODBC DRIVER SERVER = 192.168.1.33 UID = SYSDBA PWD = SYSDBA TCP_PORT = 5236 vim odbcinst.ini [DM7 ODBC DRIVER] Description = ODBC DRIVER FOR DM7 Driver = /dmdbms/bin/libdodbc.so threading = 0 |
1.3 测试oracle服务器能连接dm数据源
isql -v DM7 SYSDBA SYSDBA |
2 配置HS
file $ORACLE_HOME/bin/dg4odbc ELF 64-bit LSB executable, x86-64 cd /oracle/app/oracle/product/11.2.0/hs/admin vim initDM7.ora HS_FDS_CONNECT_INFO = DM7 HS_FDS_TRACE_LEVEL = debug set ODBCINI=/usr/local/etc/odbc.ini HS_FDS_SHAREABLE_NAME = /usr/local/lib/libodbc.so |
3 oracle配置静态监听
cd $ORACLE_HOME/network/admin vim listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = DM7) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0) (PROGRAM = dg4odbc) ) ) |
4 配置Oracle的tnsnames.ora
vim tnsnames.ora DM7 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DM7) ) (HS=OK) ) lsnrctl status |
5 创建dblink和测试
sqlplus "/as sysdba" SQL> create public database link dmlink connect to "SYSDBA" identified by SYSDBA using 'DM7'; SQL> select name,status$ from v$instance@dmlink; |
看完了这篇文章,相信你对"oracle如何使用odbc连接dm7"有了一定的了解,如果想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!