# S391OWB.def: Collects Oracle Warehouse Builder Information # $Id: S391OWB.def,v 2.7 2012/08/20 11:11:20 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S391OWB.def,v 2.7 2012/08/20 11:11:20 mschenke Exp $ # # Change History # 20120820 KRA Extend startup scripts collection. =head1 NAME S391OWB - Collects Oracle Warehouse Builder Information =head1 DESCRIPTION This module collects Oracle Warehouse Builder-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OWB module ...',tput('off') # Initialization var $ORACLE_HOME = getSetting('ORACLE_HOME','') var $OWB_LOCAL = getSetting('OWB_LOCAL') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:Oracle Warehouse Builder' # Load the common macros run DBinfo() run library() # Change the database context if $OWB_LOCAL {var $sid = getSetting('ORACLE_SID') var $usr = getSetting('SQL_LOGIN') var $dba = getSetting('SQL_SYSDBA') var $ORACLE_VERSION = get_db_version() } elsif getSetting('OWB_SID') {var $sid = last var $usr = uc(getSetting('OWB_LOGIN','SYSTEM')) var $dba = getSetting('OWB_SYSDBA') # Determine the user password if compare('eq',$usr,'/') var ($usr,$pwd) = ('','') elsif hasSqlPassword($usr,$sid) var $pwd = undef else var $pwd = askPassword(concat('Enter ',$usr,'@',$sid,' user password:')) # Change the current user var $old = setSqlLogin($usr,$pwd,$sid,$dba) # If requested, change the database context and test the connection if getSetting('OWB_SWITCH') var $env = setSqlSid($sid) else var $env = undef var $try = setSqlFailure(0) # Test the database connection and get the database version if !testSql() var $ORACLE_VERSION = get_db_version(true) } else {var $sid = undef # Disable the database access var $env = undef var $old = setSqlLogin('','') var $try = setSqlFailure(-1) } =head2 not_applicable - Not Applicable You can execute the Oracle Warehouse Builder module on Oracle 9i Release 2 or later only. =head2 generic - Generic Information Gathers generic information. =head2 report11g - Repository Information (11g) Gathers release-related information. =head2 report10g - Repository Information (9.2, 10.1, or 10.2) Gathers release-related information. =cut debug ' Inside OWB module, obtain the database version' if match($ORACLE_VERSION,'^(92|10|11)') {run OWBinfo() run OWBr11g() run OWBr10g() } else {report not_applicable write 'The Oracle Warehouse Builder module requires a database connection \ and can only be executed on 9i Release 2 or later.' toc '2:[[',getFile(),'][rda_report][Not Applicable]]' } # Restore the previous context if !$OWB_LOCAL {if defined($env) call setSqlSid($env) call setSqlLogin($old) call setSqlFailure($try) } =head2 Startup Scripts Gets startup scripts. =cut debug ' Inside OWB module, gathering startup scripts' if isUnix() var $sub = 'unix' elsif or(isWindows(),isCygwin()) var $sub = 'win32' pretoc '2:Startup Scripts' call sort_files(3,0,\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BATCH:'cca_admin'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BATCH:'ccashut'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BATCH:'ccastart'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'OMBPlus'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'owbclient'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'reposinst'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'run_service'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'startOwbbInst'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'stopOwbbInst'}),\ catFile($ORACLE_HOME,'owb','bin',$sub,${AS.BAT:'upgradeloc'})) unpretoc =head2 Configuration Files Gets configuration files. =cut debug ' Inside OWB module, gathering configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ catFile($ORACLE_HOME,'owb','bin','owb'),\ catFile($ORACLE_HOME,'owb','bin','owb.boot'),\ catFile($ORACLE_HOME,'owb','bin','owb.conf'),\ catFile($ORACLE_HOME,'owb','bin','logging.properties'),\ catFile($ORACLE_HOME,'owb','bin','owb-debug.conf'),\ catFile($ORACLE_HOME,'owb','bin','owb-nodebug.conf'),\ catFile($ORACLE_HOME,'owb','bin','owb.properties'),\ catFile($ORACLE_HOME,'owb','bin','product.properties'),\ catFile($ORACLE_HOME,'owb','bin','version.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','Compatibility.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','DebugUtility.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','jdbcdriver.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','Preference.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','rtrepos.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','Runtime.properties'),\ catFile($ORACLE_HOME,'owb','bin','admin','owb.classpath'),\ catFile($ORACLE_HOME,'owb','bin','admin','owbclient.logging.properties')) unpretoc =head1 SEE ALSO L, L, L, L, L =begin credits =over 10 =item RDA 4.5: Jean-Philippe Peelman, Mark Rovers. =item RDA 4.7: Jean-Philippe Peelman. =item RDA 4.10: Sarath Babu, Jean-Philippe Peelman. =item RDA 4.29: Mark Rovers. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut