配置unixODBC连接达梦数据库

配置unixODBC连接达梦数据库

1.安装unixODBC:
tar -zxvf unixODBC-2.3.1.tar.gz
cd unixODBC-2.3.1
./configure --enable-iconv=yes
make
make install
安装完后,odbcinst –j 来查看安装位置等信息,如:
unixODBC 2.3.1
DRIVERS…: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES…: /usr/local/etc/ODBCDataSources
USER DATA SOURCES…: /root/.odbc.ini
SQLULEN Size…: 8
SQLLEN Size…: 8
SQLSETPOSIROW Size.: 8

  1. 配置 odbcinst.ini
    [DM ODBC DRIVER]
    Description = ODBC DRIVER FOR DM
    Driver = /opt/dmdb/dmdbms/bin/libdodbc.so
    Setup = /lib/libdmOdbcSetup.so
    threading = 0

  2. 配置 odbc.ini
    [DM]
    Description = DM ODBC DSN
    Driver = DM ODBC DRIVER
    SERVER = 192.168.100.100
    UID = SYSDBA
    PWD = SYSDBA
    TCP_PORT = 5237

  3. 连接DM数据库
    [dm@localhost opt]# isql –v dm
    ±--------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    ±--------------------------------------+

你可能感兴趣的:(配置unixODBC连接达梦数据库)