Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[dev.icinga.com #108] IDOUtils with Oracle #36
This issue has been migrated from Redmine: https://dev.icinga.com/issues/108
Created by mfriedrich on 2009-05-26 12:46:05 +00:00
Updated by mfriedrich on 2009-06-08 16:21:27 +00:00
Using the listing of the supported drivers it's easier to grep errors testing libdbi-oracle.
Following describes in short an install of the libdbi for oracle on RHEL x64. Debian should be the same.
1.) Get Oracle Instantclient AND the SDK (which includes oci.h). Depending on your architecture, x86 or x64. Oracle requires an account for downloading.
A softlink is missing otherwise make of libdbi-drivers will fail.
2.) Install the libdbi. Either you install it from repo or you build it yourself by using the tar-ball or cvs-snapshot.
Make sure, you run configure with --disable-docs because make could fail on sqml2pdf-format.
On some systems, it is required to install the libdbi in /usr/lib instead of /usr/local/bin. For that use --prefix=/usr while configure.
3.) libdbi for Oracle is still experimential and cannout be installed from repo. Therefore get the tar-ball or the cvs snapshot. I've experienced automake errors on RHEL x64 while the source from the tarball contains a src typo.
Then tell configure where the oracle libs from the instant client can be found (or the DB in any case you are really using Icinga and Oracle on one server...)
In case set the prefix. If you are compiling on x64, make install could copy the libs to the wrong location. Solution is to copy them manually to /usr/lib64/dbd/ (where libdbmysql is installed by default) and run ldconfig.
4.) Test if the driver is loaded correctly. Used a local GIT branch in module/idoutils and shot the cmd
If there's no error, ido2db should be running.
Next steps are to test the db connection and submit queries.
Updated by mfriedrich on 2009-06-09 14:03:08 +00:00
This is far too fast right now...
I've installed a fresh Icinga with IDOUtils on a testbox, setting the same configs like for ndoutils oracle, only a missing db schema (for testing purposes).
Starting up IDO and Icinga, and looking into /var/log/messages (ido2db.debug doesn't clearly show the error) for the "connection there but schema not found"-error. And it is there, meaning DB connection through libdbi with Oracle is working fine.
So it works, but before issuing queries, I need to develop a matching DB schema because Oracle limits table names to a maximum of 30 characters -> varchar2(30).
Updated by mfriedrich on 2009-06-19 09:06:26 +00:00
The Oracle driver of libdbi throws address mapping exceptions on Oracle 11g RDBM - on the libdbi-mailinglist, Markus Hoenicka said that the driver has not been developed on since 1 year.
Updated by mfriedrich on 2009-08-29 13:51:03 +00:00
adding postgres support to idoutils prepares the queries and the data the way we will use them for oracle. since ocilib will be used instead of libdbi, db connection also need to be rewritten. enabling oracle will be done by a special flag in configure and then requiring ocilib instead of libdbi.