免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1522 | 回复: 0
打印 上一主题 下一主题

Informix Client access or SDK working unixODBC [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-16 13:06 |只看该作者 |倒序浏览

http://www.unixodbc.org/doc/informix.html

Getting the ODBC driver from the Informix Client access or SDK working with unixODBC
1. Set the INFORMIXDIR environment variable to the root of your Informix installation, this document assumes /usr/local/informix. /opt/informix is quite common.
2. Define the "online" service in /etc/services (or your equivalent NSS repository).
3. Construct an sqlhosts file in $INFORMIXDIR/etc that defines all your database servers.
4. Make sure the Informix libraries are found by ld. These are located in $INFORMIXDIR/lib and its subdirectories (this includes at least "cli" and "esql"). This usually involved adding these directories to /etc/ld.so.conf and re-running the ldconfig utility as root.
5. Define the ODBCINI environment variable to point at your system wide odbc.ini. Something like: export ODBCINI=/etc/odbc.ini This will mess up the ability of users to define their own data sources, but it seems like ODBCINI is the only way to control where the Informix driver looks for it's configuration information.
6. Add the Informix driver to odbcinst.ini, with no stray white space between parameter names and their values. [Informix]
Description=Informix IDS 2000
Driver=/usr/local/informix/lib/cli/libifcli.so
APILevel=1
ConnectFunctions=YYY
DriverODBCVer=03.00
FileUsage=0
SQLLevel=1
smProcessPerConnect=Y
7. Define you Informix DSNs in odbc.ini [miecr]
Driver=Informix
Server=BARNET
Database=miecr
CLIENT_LOCALE=en_us.8859-1
DB_LOCALE=en_us.8859-1
TRANSLATIONDLL=/usr/local/informix/lib/esql/igo4a304.so
8. You should now (assuming you have permissions to connect to the database server, etc...) be able to "isql miecr".
If you get "Server %s is not listed as a dbserver name in sqlhosts" or anything similiar it is probably caused by stray white space in either the Informix driver definition in odbcinst.ini or the DSN entries in odbc.ini that use the Informix driver. The driver's parser seems to be very easily confused.
This document was originally supplied by Adam Williams, and converted to html by Nick Gorham, so any mistakes are probably down to me (Nick)


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12857/showart_232855.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP