Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
modified for running with new create scripts #1358
Browse files Browse the repository at this point in the history
refs #1358
  • Loading branch information
Tommi2Day committed May 3, 2011
1 parent 0fa0b1a commit 10fd68d
Show file tree
Hide file tree
Showing 5 changed files with 1,623 additions and 1,625 deletions.
Empty file modified module/idoutils/db/mysql/mysql.sql 100644 → 100755
Empty file.
8 changes: 1 addition & 7 deletions module/idoutils/db/oracle/create_icinga_objects_oracle.sql 100644 → 100755
Expand Up @@ -2169,17 +2169,11 @@ CREATE SEQUENCE seq_timeperiods
nocache nomaxvalue;


-- -----------------------------------------
-- set dbversion
-- -----------------------------------------
INSERT INTO dbversion (id, name, version) VALUES ('1', 'idoutils', '&&ICINGA_VERSION');
commit;

/* final check */
select object_name,object_type,status from user_objects where status !='VALID';

/* goodbye */
prompt Object creation finished, ready to start!
prompt Object creation finished
spool off;


18 changes: 18 additions & 0 deletions module/idoutils/db/oracle/icinga_defines.sql
@@ -0,0 +1,18 @@

/*
filesystems to use for distributing index and data. In low frequency environments
this can be the same. trailing slash is mandantory
*/
DEFINE DATAFS=./
DEFINE IDXFS=./
DEFINE LOBFS=./
/*
icinga tablespaces and user must fit definitions in create_icinga_objects_oracle.sql
*/

DEFINE DATATBS=ICINGA_DATA1
DEFINE IDXTBS=ICINGA_IDX1
DEFINE LOBTBS=ICINGA_LOB1
DEFINE ICINGA_USER=icinga_r14
DEFINE ICINGA_PASSWORD=icinga

38 changes: 12 additions & 26 deletions module/idoutils/db/oracle/oracle.sql 100644 → 100755
Expand Up @@ -25,16 +25,9 @@ DEFINE ICINGA_VERSION=1.4.0

-- -----------------------------------------
-- set defines
-- EDIT THIS !
-- EDIT THIS or icinga_defines.sql
-- -----------------------------------------

/*
filesystems to use for distributing index and data. In low frequency environments
this can be the same. trailing slash is mandantory
*/
DEFINE DATAFS=./
DEFINE IDXFS=./
DEFINE LOBFS=./
/*
icinga tablespaces and user must fit definitions in create_icinga_objects_oracle.sql
*/
Expand All @@ -44,6 +37,11 @@ DEFINE IDXTBS=ICINGA_IDX
DEFINE LOBTBS=ICINGA_LOB
DEFINE ICINGA_USER=icinga
DEFINE ICINGA_PASSWORD=icinga

/*
overwrite previous defines if needed
*/
@icinga_defines.sql
-- -----------------------------------------
-- set sqlplus parameter
-- -----------------------------------------
Expand All @@ -55,29 +53,17 @@ set echo on;
set feedback on;
SET ESCAPE \

-- -----------------------------------------
-- load current instance
-- -----------------------------------------
column inst new_value dbinst noprint;
SELECT instance_name inst FROM v$instance;
-- -----------------------------------------
-- second connect may fail if instance_name != your tns name
-- replace &dbinst with real name
-- -----------------------------------------
DEFINE myinst=&dbinst

-- -----------------------------------------
-- run user and tablespace creation
-- CAUTION: THIS WILL DROP EXISTING USER AND TABLESPACE WITH SAME NAME
-- -----------------------------------------
@create_oracle_sys.sql

-- -----------------------------------------
-- Connect to the newly created user
-- and create icinga objects
-- Create icinga objects
-- -----------------------------------------
connect &&ICINGA_USER./&&ICINGA_PASSWORD@&&myinst
@create_icinga_objects_oracle.sql

-- -----------------------------------------
-- set dbversion
-- -----------------------------------------
INSERT INTO dbversion (id, name, version) VALUES ('1', 'idoutils', '&&ICINGA_VERSION');
commit;
/*goodbye */
exit;

0 comments on commit 10fd68d

Please sign in to comment.