Linux platform configuration ODBC connected database up to the dream

1 Install the ODBC library

DM ODBC on Linux operating system is dependent on UnixODBC library, we here to install unixODBC, there are two ways:

1.1 Use YUM to install

Yum source arranged not elaborated here, the self-Baidu

yum install unixODBC.x86_64 unixODBC-devel.x86_64 -y

1.2 installation manual translation

Download unixODBC
http://www.unixodbc.org/download.html

Decompression, installation and configuration

tar xzvf unixODBC-2.3.0.tar.gz
cd unixODBC-2.3.0/
./configure
make && make install
find / -name libodbcinst.so

If you are installing UnixODBC generated dynamic library name is not libodbcinst.so (such as libodbcinst.so.1.0.0 or libodbcinst.so.2.0.0, etc.), you need to create a symbolic link to the actual library file

2 manual configuration

Find drivers:

find / -name libdodbc.so

Edit /etc/odbcinst.ini, enter the following:

[DM7 ODBC DRIVER]
Description = ODBC DRIVER FOR DM7
Driver = /dm/dmdbms/bin/libdodbc.so

Edit /etc/odbc.ini, enter the following:

[dm] 
Description = DM ODBC DSN
Driver = DM7 ODBC DRIVER
SERVER = localhost 
UID = SYSDBA 
PWD = SYSDBA 
TCP_PORT = 5236

Precautions:

  1. Driver odbc.ini the same contents must be defined in the drive odbcinst.ini the node name of the dream.
  2. The odbc.ini IP SERVER can enter the database server.

Loading a configuration file:

odbcinst -i -d -f /etc/odbc.ini
odbcinst -i -s -l -f /etc/odbc.ini
Published 55 original articles · won praise 5 · Views 9310

Guess you like

Origin blog.csdn.net/fengxiaozhenjay/article/details/104433496