Is possible to use IBM DB2 with JRuby on rails? - db2

In DB2 Version 9.7 is said:
The IBM_DB Ruby driver and Rails adapter are not supported on JRuby
The IBM_DB adapter is not supported on JRuby.
The IBM_DB adapter is not supported on JRuby because (as stated in the
JRuby Wiki, "Getting Started"): "Many Gems will work fine in JRuby,
however some Gems build native C libraries as part of their install
process. These Gems will not work in JRuby unless the Gem has also
provided a Java equivalent to the native library." For more
information, see http://kenai.com/projects/jruby/pages/GettingStarted.
The IBM_DB adapter relies on the IBM_DB Ruby driver (C extension) and
the IBM® Data Server Driver for ODBC and CLI to access databases on
IBM data servers. Alternatively, you can either use the regular C
implementation of Ruby, or use JDBC_adapter to access databases.
Has anyone knew if this is fixed in the new versions?Also, is it possible to use JDBC_adapter with JRuby?

I haven't test it but, according to this https://github.com/jruby/activerecord-jdbc-adapter
Activerecord-jdbc-adapter is a database adapter for Rails’ ActiveRecord component that can be used with JRuby. It allows use of virtually any JDBC-compliant database with your JRuby on Rails application.
And the corresponding gem has a Java version. https://rubygems.org/gems/activerecord-jdbc-adapter/versions/1.0.3-java
Regarding your other question, if IBM_DB is fixed in the new versions?
Ithink is not, according to the documentation until JRuby and ActiveRecord-JDBC adapter ripen it wont work.
I found and IBM docummentation that says that can be consider an arrangement in ActiveRecord-JDBC adapter, which can emulate the previous administration providing IBM_DB adapter.
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.apdv.ruby.doc%2Fdoc%2Fc0052771.html

Related

IBM DB2 V7.2 ODBC Driver for Linux

I am trying to connect to a client's DB2 v7.2 database in Linux.
I am pretty new to DB2 and could not find 7.2 odbc driver in IBM site. The earliest is 9.1 odbc driver. Is this compatible with v7.2 ?
IBM does not make such old legacy drivers publicly available, for good reasons.
Genuine IBM customers always have a way to acquire legacy drivers however, although this is wholly dependent on who you know.
The v9.1 ODBC driver might have trouble accessing v7.2. It rather depends on which fixpacks are deployed (client and server), which operating-system (for client), and what authorization level you have for the target instance, and what rights you have at the workstation end, apart from the level of competence needed. This is not work for beginners.
Keep in mind that legacy drivers may not be able to install on modern workstation operating-system versions (for example , they might need the workstation operating system to be also a legacy version).
Another approach is to have a detailed understanding of exactly how (with which versions and tools) the client currently connects to that legacy database, and then seek to emulate that mix of versions, possibly by cloning.
This is not a programming question so stackoverflow may not be the correct forum. There are IBM specific forums run by IBM which may help.

Choosing the correct DB2 drivers to get data acceleration

In order to connect to IBM DB2 from either Excel or a C# .net application, which driver do I need in order to also get the data acceleration? (set current query acceleration all;) Are there drivers that are portable (don't need admin rights to install)?
If they do need admin, I can always ask IT support to install it for me..
Have been using JDBC drivers for my Squirrel SQL client, and they support IBM IDAA (acceleration), but these won't work with Excel nor C#. Obviously.
Any pointers?
To access Db2-for-Z/OS from either Excel or C# .net you will need a CLI driver for Db2 with matching bitness.
Depending on how your Db2-for-Z/OS subsystems are licensed you may also need a license-file on the Microsoft-windows workstation, becase IBM supplied CLI drivers are not free for accessing Db2-fo-Z/OS. Speak with your Z-DBA or passport-advantage-coordinator to get the license-file (and the correct version of it to match your version of Db2-for-Z/OS) or to determine if the target subsystem has already db2connectactivate enabled ( meaning no workstation based licenses are required).
IBM and other companies offer CLI drivers for Db2 for various operating systems including Microsoft Windows.
IBM offers different sizes of CLI driver, depening on how much functionality you need.
Any of these should work with IDAA as long as they are "current", and the keywords needed for IDAA exploitation should be common between the IBM supplied CLI drivers.
The smallest footprint, minimal function, zero install CLI driver from IBM is the "ODBC and CLI" driver, which is a zipfile (just unzip and register it per the docs). Get it via this link, and then install it per this documentation. Note that this driver gets frequently updated, as it is used by all CLI/ODBC based tools (perl, python, r, c#, ruby, c++, ...). It's also possible to use wget to download it. google for that.
A larger driver is the "Db2 runtime client", which has more functionality and the clpplus interface. This is available via the IBM Passport Advantage website , or via fix central for latest fixpacks.
The full Db2 client is a large image, and has all functionality that IBM offers for client side use. Get this via the IBM Passport Advantage website, or via fix central for latest fixpacks.

Mongodb plugin for cakephp 2.10 which will work on php7.4

my old application was on cakephp2.5 , php 5.6 mongodb ichikaway/cakephp-mongodb, i have updated it to cakephp2.10 and php7.4 but this plugin is not working as new php-mongodb driver is not supporting to it. is there any other plugin which will work on cakephp2.5 or is there any other way to make it work.
Thanks
Hi i have found workaround for it Mongo PHP Adapter
The Mongo PHP Adapter is a userland library designed to act as an adapter
between applications relying on ext-mongo and the new driver (ext-mongodb).
It provides the API of ext-mongo built on top of mongo-php-library, thus being
compatible with PHP 7.
Goal
This library aims to provide a compatibility layer for applications that rely on
libraries using ext-mongo, e.g.
Doctrine MongoDB ODM, but want to
migrate to PHP 7 on which ext-mongo will not run.
You should not be using this library if you do not rely on a library using
ext-mongo. If you are starting a new project, please check out
mongodb/mongodb.

Ensure standard library linked to boost matches mongo C++ driver's

I want to install MongoDB C++ client. I read in its manual that:
On systems offering multiple C++ standard libraries, you must ensure
that the standard library linked into boost matches that linked into
the driver.
My O.S is ubuntu 14.04.
Does the above quote applies to my system?
How do I ensure which standard library is linked into the boost which I installed apt-get install libboost-all-dev?
In case libboost-all-dev is not linked against c++11, do I need to build from source?
My application is going to be using multi threading, do I need to make sure boost, mongodb C++ client and other libraries are linked using some multi threaded flag?
Ubuntu is not a system that is offering multiple C++ standard libraries. e.g. in ubuntu you would use GPLish libstdc++ and don't need the libc++.
I don't know how to tell whether the boost package for ubuntu was linked with c++11 but it must have since once I matched my mongo to be linked with c++11 it - mongo stopped crashing.
So if you are using ubuntu and want to use mongo legacy c++ driver you should build mongo with the c++11 flag.
for example:
scons --c++11 install

How can I access two Oracle databases with different versions (8i and 9) using perl?

I'm currently accessing an Oracle database version 9i (9.2.0.8.0) using perl modules DBI (1.613) and DBD::Oracle (1.26). The current scope of the project now requires that I access a version 8i (8.1.7.4.0 ) Oracle database and, according to the DBD::Oracle project, I can only access this second database with a DBD::Oracle version 1.20 or below.
I know I could possibly use the DBD version 1.20 to access both databases, but I was wondering if its possible to have installed the two versions of the DBD module and use the acceptable version for each database (less prone to errors).
I don't believe that the server version has any bearing on the DBD::Oracle version you can use, only the version of the client libraries that you install. The 9.2, 10.1, and 10.2 versions of the Oracle client libraries support connecting to Oracle server 8.1.7.4, and the latest version of DBD::Oracle remains compatible with all client libraries from 9.2 up, so I don't think that you will actually have any problem at all. However, if you install the version 11 client, you will lose the ability to connect to server versions below 9.2.0.
Install the different versions of DBI/DBD::Oracle into two different places, see INSTALL_BASE/--install_base. Access them seperately by setting PERL5LIB appropriately.
local::lib helps you automate this whole affair.
If you want to access the two database versions from the same program run you can do as follows:
install both versions in your system using local::lib
run a DBD::Proxy server with #LIB configured to load one version of DBD::Oracle
run your script with #LIB configured to load the other version of DBD::Oracle
in your script connect to one database using DBD::Oracle as usual and to the other one through the proxy.