on 06-03-2014 3:44 PM
Hi there,
We are currently attempting to load data from ESP into SAP Sybase IQ using
the SAP Sybase IQ Output Adapter but we are receiving the following error:
IQAdapter, IQOutput, sybase_iq_out, 0,
, DEAD, 0, 0, 0, 2014-05-23 16:33:01, Unable to establish a DB connection for
IQODBCService service.
[01000][0][[unixODBC][Driver
Manager]Can't open lib
'/home/cisco/sybase/IQ_Client/IQ-16_0/lib64/libdbodbc16_r.so' : file not found]
Unable to get connection to the
database., NULL
We have double-checked the directory and the file definitely exists and is
executable. We have also added the directory /home/cisco/sybase/IQ_Client/IQ-16_0/lib64
to the LD_LIBRARY_PATH in sybase.sh. The IQ ODBC driver has been successfully
installed on the ESP system, so there should be no issue there either.
Do you know where we might be going wrong?
Kind regards,
Richard
Hi all,
Thanks to Neal and Alice’s help we have now resolved this issue. Ultimately there were two problems that needed to be fixed:
Many thanks for all your help once again.
Richard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
1. Confirm that the version of unixODBC driver you are using is version 2.3.0 or higher:
a. check that LD_LIBRARY_PATH has the correct unixODBC directory included - some flavors of Linux come with unixODBC pre-installed to one directory. System Admins install it to a second directory. So you need to make sure you know which one is in your LD_LIBRARY_PATH.
b. run the command odbcinst -j to get the version
2. Confirm that ESP can find unixODBC's driver manager, libodbc.so.1
a. cd to <esp_install_dir>/lib
b. run the command ldd libesp_db_odbc64_lib.so, e.g.
$ ldd libesp_db_odbc64_lib.so
linux-vdso.so.1 => (0x00007ffff33ff000)
libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x00007fcae0f1e000)
...
3. Run the command ldd /home/cisco/sybase/IQ_Client/IQ-16_0/lib64/libdbodbc16_r.so
and make sure the output for it indicates that all libraries are found
4. Check your .odbc.ini file settings for the IQ DSN, similar to this:
[my_IQ]
Driver = /home/cisco/sybase/IQ-Client/IQ-16_0/lib64/libdbodbc16_r.so
Description = Sybase IQ Server
DatabaseName=iqdemo
ServerName=ffiq
CommLinks=tcpip{host=myhost.com;port=16238}
5. Confirm that your <esp_install_dir>/bin/service.xml settings match what's in your .odbc.ini file, similar to this:
<Service Name="IQ_Service" Type="DB">
<Parameter Name="DriverLibrary">esp_db_odbc64_lib</Parameter>
<Parameter Name="DSN">my_IQ</Parameter>
<Parameter Name="User">DBA</Parameter>
<Parameter Name="Password">sql</Parameter>
</Service>
Thanks,
Alice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alice,
Thank you for the comprehensive response. I have followed each of your proposed steps and have included the outcome of each in turn below.
1. I can confirm that the unixODBC driver version is 2.3.1. It also looks like LD_LIBRARY_PATH has the correct unixODBC directory included. The IQ driver library is also included here.
2. By the looks of it, ESP can find unixODBC's driver manager without a problem.
3. I have run the requested command and everything appears to be in order except libdbtasks16_r.so. Could this be an issue?
4. I have checked the .odbc.ini file settings and these seem fine.[Exact ServerName, DatabaseName and Database File removed for security reasons]. I presume defining the IQ user ID and password in both this file and the service.xml file is inconsequential?
5. The service.xml file settings correctly match up with the .odbc.ini file settings (along with the configuration parameters detailed in the ESP ccl file).
Can you spot anything from the above that we might be missing?
Richard
Hi Alice,
I have had a good look for libdbtasks16_r.so but could not find it anywhere. It is not in /home/cisco/sybase/IQ_Client/IQ-16_0/lib64.
Nor is it in any directory such as /lib or /home/cisco/sybase/ESP-5_1/lib. A simple search did not return anything either.
Is this missing file likely to be the root of our issue?
Richard
I have now copied the libdbtasks16_r.so file from another server to the /home/cisco/sybase/IQ_Client/IQ-16_0/lib64 directory on our ESP server so it can now be found.
However, when I try to run ESP I now get a different error message:
IQAdapter, IQOutput, sybase_iq_out, 0, , DEAD, 0, 0, 0, 2014-06-04 12:41:01, Unable to establish a DB connection for IQODBCService service.
[IM004][0][[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed]
Unable to get connection to the database., NULL
Hi Richard,
The fact that "libdbtasks16_r.so" was missing is very concerning. This would indicate that your IQ installation is incomplete and there could be other files missing.
Before worrying about ESP connecting to IQ, lets try connecting with the unixODBC driver's "isql" utility:
/usr/local/unixODBC/bin/isql -v your_DSN_here your_user your_password
What output does this give you?
Thanks,
Neal
Hello,
It looks like there is a space between ".../bin" and "isql" so you ended up executing Sybase's "isql" utility instead of unixODBC's. So make sure you execute it without spaces:
/usr/local/unixODBC/bin/isql -v IQ dba sql
NOTE: I believe that in more recent releases of IQ, the user "dba" is capitalized.
Thanks,
Neal
Thanks for heads up Neal,
There was actually no space. I just executed the command directly from the /usr/local/unixODBC/bin directory. Specifying the full directory in the command, however, gave me the following output (with both dba and DBA):
This is the same message I get when I try to connect ESP to IQ.
Richard
User | Count |
---|---|
74 | |
26 | |
11 | |
10 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.