aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar aldot <aldot@5e8054f6-fb45-0410-9d17-f830fe724320>2009-04-21 14:58:34 +0000
committerGravatar aldot <aldot@5e8054f6-fb45-0410-9d17-f830fe724320>2009-04-21 14:58:34 +0000
commitab6d9a8181e15c833d980ddb71bc952af94f2908 (patch)
treee799a6f7e850628a721bd258bb50990a510b45dc
parenta9581d54d6c76629eadc9220d2edd66540cf694d (diff)
downloadndoutils-oracle-ab6d9a8181e15c833d980ddb71bc952af94f2908.tar.gz
ndoutils-oracle-ab6d9a8181e15c833d980ddb71bc952af94f2908.tar.bz2
- reinstate original table names for !oracle (which has a limit of 30 chars
for table names). Thanks to Hendrik Baecker for the reminder! git-svn-id: https://www.nagiosforge.org/svn/ndoutils_oracle/trunk/ndoutils-1.4b7-oracle@90 5e8054f6-fb45-0410-9d17-f830fe724320
-rw-r--r--src/db.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/db.c b/src/db.c
index 0c817a3..8780204 100644
--- a/src/db.c
+++ b/src/db.c
@@ -22,6 +22,7 @@ extern int errno;
extern ndo2db_dbconfig ndo2db_db_settings;
extern time_t ndo2db_db_last_checkin_time;
+/* Oracle has a limit of 30 chars for the length of accepted table names. */
char *ndo2db_db_rawtablenames[NDO2DB_MAX_DBTABLES]={
"instances",
"conninfo",
@@ -44,7 +45,11 @@ char *ndo2db_db_rawtablenames[NDO2DB_MAX_DBTABLES]={
"comments",
"notifications",
"contactnotifications",
+#ifndef USE_ORACLE
+ "contactnotificationmethods",
+#else
"contact_notif_methods",
+#endif
"acknowledgements",
"statehistory",
"downtimehistory",
@@ -75,12 +80,20 @@ char *ndo2db_db_rawtablenames[NDO2DB_MAX_DBTABLES]={
"hostescalations",
"hostescalation_contacts",
"serviceescalations",
+#ifndef USE_ORACLE
+ "serviceescalation_contacts",
+#else
"srvcescal_contacts",
+#endif
"hostdependencies",
"servicedependencies",
"contacts",
"contact_addresses",
+#ifndef USE_ORACLE
+ "contact_notificationcommands",
+#else
"contact_notifcmds",
+#endif
"hosts",
"host_parenthosts",
"host_contacts",
@@ -89,8 +102,13 @@ char *ndo2db_db_rawtablenames[NDO2DB_MAX_DBTABLES]={
"customvariables",
"host_contactgroups",
"service_contactgroups",
+#ifndef USE_ORACLE
+ "hostescalation_contactgroups",
+ "serviceescalation_contactgroups"
+#else
"hostescal_contactgroups",
"srvcescal_contactgroups"
+#endif
};