ITPub博客

首页 > 数据库 > 国内数据库 > DM8 Linux环境下配置ODBC

DM8 Linux环境下配置ODBC

原创 国内数据库 作者:LEVEL7 时间:2021-08-19 18:20:32 0 删除 编辑

Linux 系统调用ODBC驱动,前提条件是操作系统安装unixODBC环境。

1.     下载unixODBC

http://www.unixodbc.org/

What is ODBC?

ODBC is an open specification for providing application developers with a predictable API with which to access Data Sources. Data Sources include SQL Servers and any Data Source with an ODBC Driver.

2.     将附件unixODBC-2.3.9.tar.gz上传到/usr/local下,执行安装。

[root@rhel7 local]#  tar -zxvf unixODBC-2.3.9.tar.gz

[root@rhel7 local]#  cd unixODBC-2.3.9/

[root@rhel7 unixODBC-2.3.9]#  ./configure

[root@rhel7 unixODBC-2.3.9]#  make

[root@rhel7 unixODBC-2.3.9]#  make install

3.     查看操作系统上查看ODBC版本

[dmdba@rhel7 ~]$  odbc_config --version

2.3.9

4.     查看ODBC配置文件存放的位置

[dmdba@rhel7 ~]$  odbc_config --odbcini

/usr/local/etc/odbc.ini

[dmdba@rhel7 ~]$  odbc_config --odbcinstini

/usr/local/etc/odbcinst.ini

5.     修改odbc.ini文件

[root@rhel7 ~]#  vi /usr/local/etc/odbc.ini

[dm]

Description = DM ODBC DSN

Driver =  DM8 ODBC DRIVER

SERVER = localhost

UID = SYSDBA

PWD = SYSDBA

TCP_PORT = 5236

6.     修改odbcinst.ini文件

[root@rhel7 ~]#  vi /usr/local/etc/odbcinst.ini

[ DM8 ODBC DRIVER]

Description = ODBC DRIVER FOR DM8

Driver = /dm8/bin/libdodbc.so

7.     测试连接

[dmdba@rhel7 ~]$  isql dm

+---------------------------------------+

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

+---------------------------------------+

SQL>

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31516603/viewspace-2787871/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: RHEL7 yum源配置
请登录后发表评论 登录
全部评论
Oracle/DM DBA

注册时间:2018-01-10

  • 博文量
    20
  • 访问量
    21246