# S391OWB.def: Collects Oracle Warehouse Builder Information # $Id: S391OWB.def,v 1.18 2008/02/25 17:32:56 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/S391OWB.def,v 1.18 2008/02/25 17:32:56 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =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 $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() # 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 The Oracle Warehouse Builder module can only be executed on Oracle 9i Release 2 or later. =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) } =head1 SEE ALSO See also 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. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2008, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut