免费注册 查看新帖 |

Chinaunix

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

[新手入门] AIX上通过LEI连接到SQL-Server的方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-26 22:43 |只看该作者 |倒序浏览
如果用户需要通过LEI连接到SQL-server,在Windows上只要简单的配置即可,但是如果在AIX上面连接则相对麻烦,IBM目前提供了通过在AIX上安装Lotus OEM ODBC Driver可以解决该问题。
Lotus OEM ODBC Driver的介绍以及相关配置:
http://www-1.ibm.com/support/docview.wss?rs=1041&uid=swg27009944


Lotus OEM ODBC Driver的安装:
http://www.ibm.com/developerworks/lotus/library/OEM-ODBC/index.html



在这里主要讲一下配置过程中需要注意的地方:

用户的环境变量:

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

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):
Configuring ODBC for the SQL server
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.


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP