Chinaunix首页 | 论坛 | 博客
  • 博客访问: 965699
  • 博文数量: 232
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 2315
  • 用 户 组: 普通用户
  • 注册时间: 2005-11-02 11:43
文章分类

全部博文(232)

文章存档

2009年(6)

2008年(22)

2007年(72)

2006年(85)

2005年(47)

我的朋友

分类:

2007-12-26 22:43:02

如果用户需要通过LEI连接到SQL-server,在Windows上只要简单的配置即可,但是如果在AIX上面连接则相对麻烦,IBM目前提供了通过在AIX上安装Lotus OEM ODBC Driver可以解决该问题。
Lotus OEM ODBC Driver的介绍以及相关配置:
 
 
Lotus OEM ODBC Driver的安装:
 
 
 
在这里主要讲一下配置过程中需要注意的地方:
 
用户的环境变量:
 
export ODBCHOME=/opt/odbc
export ODBCINI=/opt/odbc/odbc.ini
 Ensure that the LANG environment variable is correctly set to your appropriate locale and is exported. If this is not set, the default "C" is used.

LANG=C

Ensure that the environment variable LOTUS is set as shown below:

If you use the C shell, your .login file should contain the line:

setenv LOTUS /opt/lotus

For sh or ksh, your initialization file should contain the following:

LOTUS=/opt/lotus; export LOTUS

    Note: For more details on the Domino related exports, refer to the Lotus Enterprise Integrator® (LEI) Installation Guide at the following url: )

export Notes_ExecDirectory=/opt/lotus/notes/latest/ibmpow

export PATH=$PATH:/opt/lotus/notes/latest/ibmpow/res/C:/opt/lotus/notes/latest/ibmpow:/home/notes/notesdata
:/opt/odbc/bin:/opt/odbc/lib:/opt/odbc

For AIX®
export LIBPATH=/opt/lotus/notes/latest/ibmpow:/opt/odbc/lib

For Solaris/Linux®
export LD_LIBRARY_PATH==/opt/lotus/notes/latest/ibmpow:/opt/odbc/lib
 
 
设置ODBC.ini
比较麻烦的是配置数据源(data source):

To modify odbc.ini for SQL, add the following lines below the [SQL Server Wire Protocol] paragraph:

[ODBCToSQLServer7] 这个名字和odbc.ini中最开头的设置要对应起来,
如果需要多个ODBC设置,相应地也要在最开头增加一项,然后在下面增加相应的区段
内容与之对应。
Driver=/opt/odbc/lib/LOmsss19.so
Description=DataDirect 4.20 SQL Server Wire Protocol
Address=127.0.0.3,1433
AnsiNPW=Yes
Database=testdb
LogonID=uid
Password=pwd
QuotedId=No

The following table lists the code, along with any further edits you need to make:

Line Comments
[ODBCToSQLServer7] Replace the name in brackets with your Data Source Name.
Driver=/opt/odbc/lib/LOmsss19.so This identifies the Lotus OEM ODBC driver. This changes from one release to the next.
Description=DataDirect 4.20 SQL Server Wire Protocol This is the description of the driver; leave as is.
Address=127.0.0.3,1433 Enter the address, followed by port number.
AnsiNPW=Yes When field is set to yes, ANSI defined behaviors are uncovered. Do not change this setting.
Database=testdb Enter the database name.
LogonID=uid Enter the user ID for your LogonID.
Password=pwd Enter the password for the LogonID.
QuotedId=No When field is set to No, Quoted Identifiers are turned off for the connection, and SQL Servers use the legacy Transact SQL rules concerning the use of quotation marks in SQL statements. Do not change this setting.
 
阅读(2208) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~