-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to remote DB2 instance on Mac OSX #25
Comments
Hi, |
Thanks @arvindgu. Slightly different error:
Interestingly this:
|
Aside: If I get this working, I'll gladly write up a wiki page and submit a PR. |
Could you unset the IBM_DB_HOME and try. |
Slightly different again:
For completeness, I'm running v2.5.26 of the gem installed via bundler. |
Could you please confirm that you have set the DYLD_LIBRARY_PATH to the directory where libdb2.dylib is present under location of extracted the odbc_cli distributable. |
The package I've downloaded is the "Driver for ODBC and CLI (64-bit)" located here: https://www-304.ibm.com/support/docview.wss?rs=4020&uid=swg27016878 There is no libdb2.dylib within this package. Do I need another package in this case? |
You can download it from below location, extracted it and set the DYLD_LIBRARY_PATH to the directory where libdb2.dylib is present. |
FYI, we have these steps to automate in our TODO list. |
That worked @arvindgu. Thank you. Is there a linux version as well that you recommend to work with this gem? |
In linux, while installing ibm_db gem the odbc_cli libraries will get downloaded and configured automatically. You do not need to do manually. FYI, for linux 64-bit you can download odbc_cli libraries from below location: |
Thanks for the information @arvindgu. Requiring the gem is working properly now, but am unable to connect to my remote DB2 database running on an iSeries. I've tried specifying a DSN configuration as well as passing in a connection string directly:
results in:
results from db2diag:
|
@bjubinville , the above logs are from CLI traces. Can you please provide the logs from db2diag.log file. |
@arvindgu please note that I have only downloaded the odbc drivers discussed previously. I've extracted these to a directory and have set environment variables based on that path. In response to your question regarding connecting directly via a command prompt:
**N.B. db2diag.log is not generated when running any of these commands. I do appreciate the assistance on this even though it's not particularly an issue with ibm_db. |
@bjubinville I was able to recreate this problem. To overcome this problem, please add authentication=server in connection string. |
@arvindgu, one step closer! Thanks for your continued help here. This may be an issue with the DB2 instance, but I thought I'd post it here regardless.
|
to connect to a iSeries DB2, you need a connect license. Please contact your DBA who should be able to help you get the license file |
Will do @mariobriggs. Is that license file to reside somewhere in the ODBC/CLI installation path? |
in the license folder |
@mariobriggs I'm trying to find information about this license, but have had little luck from people at IBM on the matter. I've cross-posted to StackOverflow here: Any insight? |
I use DB2 Connect with license from my Linux machine all the time (Ruby ibm_db, PHP ibm_db2, etc.).
Perhaps, when you figure this out, post here and i will add 'Mac' to list of stuff tried on wiki. |
@rangercairns thanks for this. I'll check it out and report back. Also very happy to contribute to a wiki article here in this repo for others once I get this sorted out. |
Hello,
I'm having trouble requiring the ibm_db gem inside an irb session, or plain ruby file.
I'm running Mac OS 10.10.2, rbenv with ruby 2.0.0-p353. I've downloaded and extracted the odbc_cli distributable from IBM.
I was able to install the gem properly after setting the IBM_HOME_DB environment variable pointing to the extracted assembly.
From an irb session, when requiring the ibm_db gem, I get the following:
Can you provide any assistance?
The text was updated successfully, but these errors were encountered: