简体   繁体   English

无法连接到iSeries odbc

[英]Unable to connect to iSeries odbc

I've spent a lot of hours trying to figure this out. 我花了很多时间试图解决这个问题。 So maybe anyone can help me out here, pls :(. 所以也许有人可以帮我在这里,请:(。

I was given an ibm-iaccess64.rpm then converted it to deb using alien. 我得到了一个ibm-iaccess64.rpm然后使用外星人将其转换为deb。 Then installed it: sudo dpkg -i ibm-iaccess64.deb. 然后安装它:sudo dpkg -i ibm-iaccess64.deb。 It was a success. 这是成功的。

Then in my /etc/odbcinst.ini I have this config: 然后在我的/etc/odbcinst.ini中我有这个配置:

[ISERIES]
Description = iSeries Access ODBC Driver DSN for iSeries
Driver = iSeries Access ODBC Driver
System = 192.16.1.1
UserID = myuserid
Password = mypassword
Naming = 0
DefaultLibraries = QGPL
Database = MMGSTLIB
ConnectionType = 0
CommitMode = 2
ExtendedDynamic = 0
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression = 1
LibraryView = 0
AllowUnsupportedChar = 0
ForceTranslation = 0
Trace = 0

Then I tried isql -v ISERIES gave me this error: 然后我试了isql -v ISERIES给了我这个错误:

[01000][unixODBC][Driver Manager]Can't open lib '/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so' : file not found [ISQL]ERROR: Could not SQLConnect [01000] [unixODBC] [驱动程序管理器]无法打开lib'/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so':找不到文件[ISQL]错误:无法SQLConnect

I checked the filepath and the libcwbodbc exists >.<... 我检查了文件路径,并且libcwbodbc存在>。<...

Hope anyone can help me here :(. Thanks a many 希望有人能在这里帮助我:(。非常感谢

I had the same problem as this so just wanted to post to say I found a fix; 我遇到了同样的问题,所以我想发帖说我发现了一个问题。

The error is a little missleading, it should say the library has issues. 错误有点误导,应该说图书馆有问题。 You can see this by running ldd against it which will show probably show that it is missing libodbcinst.so.2 您可以通过对它运行ldd来看到这一点,这将显示它可能显示它缺少libodbcinst.so.2

ldd /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
linux-vdso.so.1 => (0x00007fff86dfe000)
**libodbcinst.so.2 => not found**
libcwbcore.so => /usr/lib/x86_64-linux-gnu/libcwbcore.so (0x00007f7f68545000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7f68240000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7f67f3a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7f67d24000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7f6795d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7f6773f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7f6753b000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7f67332000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7f68b98000)

You can put in a 'fix' by symbolic linking the so.1 您可以通过符号链接so.1来“修复”

sudo ln -s /usr/lib/x86_64-linux-gnu/libodbcinst.so.1 /usr/lib/x86_64-linux-gnu/libodbcinst.so.2

I posted a full odbc article on this which you might find useful. 我张贴在一个完整的ODBC文章其中可能对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM