[icinga-checkins] icinga.org: icinga-core/mfriedrich/ocilib: prepare idoutils with ocilib

git at icinga.org git at icinga.org
Mon Oct 19 02:08:54 CEST 2009


Module: icinga-core
Branch: mfriedrich/ocilib
Commit: d285b263b904002f86ae06f7bff80b9a69f107e5
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d285b263b904002f86ae06f7bff80b9a69f107e5

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Sep  5 20:43:59 2009 +0200

prepare idoutils with ocilib

---

 module/idoutils/db/oracle.sql    |   20 ++++++++++++++++++++
 module/idoutils/include/ido2db.h |   19 ++++++++++---------
 2 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/module/idoutils/db/oracle.sql b/module/idoutils/db/oracle.sql
index 76cb05c..edd368e 100644
--- a/module/idoutils/db/oracle.sql
+++ b/module/idoutils/db/oracle.sql
@@ -1,3 +1,23 @@
+-- --------------------------------------------------------
+-- oracle.sql
+-- DB definition for Oracle
+--
+-- requirements: no table_prefix, primary key named "id"
+--	renamed columns, tablenames for idoutils
+--
+-- requires ocilib, oracle (instantclient) libs+sdk  to work
+-- specify oracle (instantclient) libs+sdk in configure
+-- ./configure \
+--	--with-oracle-headers-path=/opt/oracle/product/instantclient/instantclient_11_1/sdk/include \
+--	--with-oracle-lib-path=/opt/oracle/product/instantclient/instantclient_11_1/
+-- 
+-- initial version: 2008-02-20 David Schmidt
+-- current version: 2009-09-05 Michael Friedrich <michael.friedrich(at)univie.ac.at>
+--
+-- -- --------------------------------------------------------
+
+
+
 -- set escape character
 SET ESCAPE \
 
diff --git a/module/idoutils/include/ido2db.h b/module/idoutils/include/ido2db.h
index 97818b3..8a3382f 100644
--- a/module/idoutils/include/ido2db.h
+++ b/module/idoutils/include/ido2db.h
@@ -12,6 +12,10 @@
 #include "../../../include/config.h"
 #include "utils.h"
 
+#ifdef USE_ORACLE
+#include "ocilib.h"
+#endif
+
 
 /*************** mbuf definitions *************/
 #define NDO2DB_MBUF_CONTACTGROUP                        0
@@ -54,17 +58,14 @@ typedef struct ndo2db_dbconninfo_struct{
 	int server_type;
 	int connected;
 	int error;
-// From Baecker
+	/* libdbi */
 	dbi_conn dbi_conn;
 	dbi_result dbi_result;
-#ifdef USE_MYSQL
-	MYSQL mysql_conn;
-	MYSQL_RES *mysql_result;
-	MYSQL_ROW mysql_row;
-#endif
-#ifdef USE_PGSQL
-	PGconn *pgsql_conn;
-	PGresult *pgsql_result;
+#ifdef USE_ORACLE
+	/* ocilib */
+	OCI_Connection* oci_connection;
+	OCI_Statement* oci_statement;
+	OCI_Resultset* oci_resultset;
 #endif
 	unsigned long instance_id;
 	unsigned long conninfo_id;





More information about the icinga-checkins mailing list