SUSE 11 SP3 perl DBI:ODBC模块连接 OushuDB

1.环境初始化

1.1 ODBC 环境初始化

zypper install unixODBC
# 在文件/etc/unixODBC/odbcinst.ini中新增
[OushuDB]
Description = OushuDB driver for linux
Driver = /usr/lib64/unixODBC/libodbcpsql.so.1
Setup = /usr/lib64/unixODBC/libodbcpsqlS.so
# 在文件/etc/unixODBC/odbc.ini中新增
[OushuDB]
Driver = OushuDB
Description = HAWQ DSN
Servername = 10.0.193.85
Database = postgres
Username = gpadmin
Password = gparray
Port = 5432
ReadOnly = No
Fetch = 10000
UseDeclareFetch = 1

1.2 perl 环境初始化

DBI-1.643.tar.gz
DBD-ODBC-1.61.tar.gz
安装步骤如下

perl Makefile.PL
make
make install

2. 可能遇到的问题

*** buffer overflow detected ***: perl terminated
======= Backtrace: =========

文件/etc/unixODBC/odbcinst.ini 配置问题
注意 Driver 只能使用 so.1 不能使用 so
[OushuDB]
Description = OushuDB driver for Linux
Driver = /usr/lib64/unixODBC/libodbcpsql.so.1
Setup = /usr/lib64/unixODBC/libodbcpsqlS.so

评论
    test