# S248CONT.def: Collects Oracle Content Services Information # $Id: S248CONT.def,v 1.10 2008/02/25 17:32:55 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/S248CONT.def,v 1.10 2008/02/25 17:32:55 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME S248CONT - Collects Oracle Content Services Information =head1 DESCRIPTION This module collects Oracle Content Services information (for example, configuration and log files). The reports are regrouped under C. =head1 REPORTS =cut echo tput('bold'),'Processing Content module ...',tput('off') # Load the common macros run library() # Initialization var $ORACLE_HOME = getSetting('ORACLE_HOME','') var $ORACLE_SID = field(':',-1,getSetting('ORACLE_SID','')) var $TAIL1 = getSetting('OCS_TAIL1',5000) var $TAIL2 = getSetting('OCS_TAIL2',500) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '^1:Oracle Collaboration Suite' toc '1+:Oracle Content Services' =head2 repos_info - Repository Collects the repository information such as repository version, domain properties, node, service, and server configurations. Requests for the Oracle Content Services repository user password. For batch/cron execution, you can encode the password in the setup file using the pseudo user C. =cut report repos_info debug ' Inside the CONT module, collecting the Content repository information' write '---+!! Oracle Content Services Repository Information' write $TOC macro get_info {var ($obj,$nam,$val) = @arg if xmlFind($obj,$nam) var $val = xmlValue(last,'VALUE') return $val } var $xml = xmlLoadFile(catFile($ORACLE_HOME,'sysman','emd','targets.xml')) var ($ocs) = xmlFind($xml,'.../Target TYPE="oracle_files"') var $CONTENT_PWD = getSetting('SQL_PASSWORD_CONTENT_REPOS_USER') var $CONTENT_REP = get_info($ocs,'Property NAME="DBConnectDescriptor"',\ $ORACLE_SID) var $CONTENT_USR = get_info($ocs,'Property NAME="SchemaName"') if and($CONTENT_REP,$CONTENT_USR) {# Get the user password if $CONTENT_PWD var ($CONTENT_PWD) = unpack('u',$CONTENT_PWD) else var $CONTENT_PWD = askPassword(concat('Enter ',$CONTENT_USR,\ ' user password: ')) # Change the database context var $old = setSqlLogin(concat($CONTENT_USR,'@',$CONTENT_REP),$CONTENT_PWD) var $try = setSqlFailure(0) # Get the repository version debug ' Inside the CONT module, collecting the repository version' prefix write '---+ Repository Version' set $sql {SELECT '|*Version*|' || value || ' |' " FROM odmz_RepositoryParameter " WHERE name = 'SCHEMAVERSION'; } call writeSql($sql) if hasOutput(true) write $TOP # Get the domain properties debug ' Inside the CONT module, collecting the domain properties' prefix {write '---+ Domain Properties' write '|*Property*|' } set $sql {SELECT '|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue, " 11, p.publicobjectvalue, " p.bundle) || '|' " FROM odmv_PropertyBundle pb, odmv_Property p " WHERE pb.name = 'IFS.DOMAIN.Properties' " AND p.bundle = pb.id " ORDER BY p.name; } call writeSql($sql) if hasOutput(true) write $TOP # Get the node configurations debug ' Inside the CONT module, collecting the node configurations' prefix {write '---+ Node Configurations' write '|*Node Name*|*Property*|' } set $sql {SELECT '|' || " nc.name || '(' || nc.id || ')|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue, " 11, p.publicobjectvalue, " p.bundle) || '|' " FROM odmv_NodeConfiguration nc, " odmv_Property p " WHERE nc.propertybundle = p.bundle "UNION "SELECT '|' || " nc.name || '(' || nc.id || ')|' || " '~ ' || p.name || '/' || p1.name || '=' || " DECODE(p1.datatype, 2, p1.stringvalue, " 4, p1.integervalue, " 5, DECODE(p1.booleanvalue, 0, 'false', 1, 'true'), " 8, p1.longvalue, " 11, p1.publicobjectvalue, " p1.bundle) || '|' " FROM odmv_NodeConfiguration nc, " odmv_PropertyBundle pb, " odmv_property p, " odmv_PropertyBundle pb1, " odmv_Property p1 " WHERE nc.services = pb.id " AND p.bundle = pb.id " AND pb1.id = p.publicobjectvalue " AND p1.bundle = pb1.id "UNION "SELECT '|' || " nc.name || '(' || nc.id || ')|' || " '~~ ' || p.name || '/' || p1.name || '=' || " DECODE(p1.datatype, 2, p1.stringvalue, " 4, p1.integervalue, " 5, DECODE(p1.booleanvalue, 0, 'false', 1, 'true'), " 8, p1.longvalue, " 11, p1.publicobjectvalue, " p1.bundle) || '|' " FROM odmv_NodeConfiguration nc, " odmv_PropertyBundle pb, " odmv_property p, " odmv_PropertyBundle pb1, " odmv_Property p1 " WHERE nc.servers = pb.id " AND p.bundle = pb.id " AND pb1.id = p.publicobjectvalue " AND p1.bundle = pb1.id; } call writeSql($sql) if hasOutput(true) write $TOP # Get the service configurations debug ' Inside the CONT module, collecting the service configurations' prefix {write '---+ Service Configurations' write '|*Service Name*|*Property*|' } set $sql {SELECT '|' || " sc.name || '(' || sc.id || ')|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue, " 11, p.publicobjectvalue, " p.bundle) || '|' " FROM odmv_ServiceConfiguration sc, " odmv_Property p " WHERE sc.id = p.bundle " ORDER BY sc.name, p.name; } call writeSql($sql) if hasOutput(true) write $TOP # Get the server configurations debug ' Inside the CONT module, collecting the server configurations' prefix {write '---+ Server Configurations' write '|*Server Name*|*Property Name*|' } set $sql {SELECT '|' || " sc.name || '(' || sc.id || ')|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue, " 11, p.publicobjectvalue, " p.bundle) || '|' " FROM odmv_ServerConfiguration sc, " odmv_Property p " WHERE sc.id = p.bundle " ORDER BY sc.name, p.name ; } call writeSql($sql) if hasOutput(true) write $TOP # Display the last SQL error message if getSqlMessage() write '%BR%',last # Restore the previous context call setSqlLogin($old) call setSqlFailure($try) } else {echo 'Missing information to connect to the Content repository' write '**Missing information to connect to the Content repository.**' } toc '2:[[',getFile(),'][rda_report][Repository]]' =head2 Configuration and Log Files Gets configuration and log files for Content Services node. =cut pretoc "2:Content Services' Node Config and Log Files" var $dir = catDir($ORACLE_HOME,'content') var $log = catFile($dir,'log','ContentMTConfig.log') var $LOG{$log} = 0 call sort_files(3,$TAIL1,\ catFile($dir,'settings','oracle','ifs','utils','common',\ 'Settings.properties'),\ catFile($dir,'temp','ifsoc4j.properties'),\ grepDir(catDir($dir,'log','Content'),'_Node.log$','ip'),\ $log) unpretoc =pod Gets configuration and log files for Content Services HTTP Node. =cut pretoc '2:HTTP Node Config and Log Files' var $dir = catDir($ORACLE_HOME,'j2ee','OC4J_Content') var $dir1 = catDir($dir,'config') var $dir2 = catDir($dir,'log','OC4J_Content_default_island_1') var $dir3 = catDir($dir,'application-deployments','content',\ 'OC4J_Content_default_island_1') var %LOG = () call sort_files(3,$TAIL1,\ catFile($dir3,'application.log')) call sort_files(3,$TAIL2,\ catFile($dir1,'application.xml'),\ catFile($dir1,'data-sources.xml'),\ catFile($dir1,'default-web-site.xml'),\ catFile($dir1,'global-web-application.xml'),\ catFile($dir1,'http-web-site.xml'),\ catFile($dir1,'internal-settings.xml'),\ catFile($dir1,'j2ee-logging.xml'),\ catFile($dir1,'jazn.xml'),\ catFile($dir1,'jazn-data.xml'),\ catFile($dir1,'jms.xml'),\ catFile($dir1,'oc4j-connectors.xml'),\ catFile($dir1,'principals.xml'),\ catFile($dir1,'rmi.xml'),\ catFile($dir1,'server.xml'),\ catFile($dir2,'default-web-access.log'),\ catFile($dir2,'global-application.log'),\ catFile($dir2,'jms.log'),\ catFile($dir2,'rmi.log'),\ catFile($dir2,'server.log')) unpretoc =pod Gets configuration and log files for Content Services Records Management Node. =cut pretoc '2:Records Management Node Config and Log Files' var $dir = catDir($ORACLE_HOME,'j2ee','OC4J_RM') var $dir1 = catDir($dir,'config') var $dir2 = catDir($dir,'log','OC4J_RM_default_island_1') var $dir3 = catDir($dir,'application-deployments','content',\ 'OC4J_RM_default_island_1') call sort_files(3,$TAIL1,\ catFile($dir3,'application.log')) call sort_files(3,$TAIL2,\ catFile($dir1,'application.xml'),\ catFile($dir1,'data-sources.xml'),\ catFile($dir1,'default-web-site.xml'),\ catFile($dir1,'global-web-application.xml'),\ catFile($dir1,'http-web-site.xml'),\ catFile($dir1,'internal-settings.xml'),\ catFile($dir1,'j2ee-logging.xml'),\ catFile($dir1,'jazn.xml'),\ catFile($dir1,'jazn-data.xml'),\ catFile($dir1,'jms.xml'),\ catFile($dir1,'oc4j-connectors.xml'),\ catFile($dir1,'principals.xml'),\ catFile($dir1,'rmi.xml'),\ catFile($dir1,'server.xml'),\ catFile($dir2,'server.log'),\ catFile($dir2,'default-web-access.log'),\ catFile($dir2,'jms.log'),\ catFile($dir2,'global-application.log'),\ catFile($dir2,'rmi.log')) unpretoc =pod Gets configuration and log files for Java containers running Content Services Node, HTTP Node, and Records Management Node. =cut pretoc '2:Java Containers Config and Log Files' var $dir1 = catDir($ORACLE_HOME,'opmn','conf') var $dir2 = catDir($ORACLE_HOME,'opmn','logs') call sort_files(3,$TAIL2,\ catFile($dir1,'opmn.xml'),\ catFile($dir2,'Content~Node~1'),\ catFile($dir2,'Content~OC4J_Content~default_island~1'),\ catFile($dir2,'Content~OC4J_RM~default_island~1')) unpretoc # Disable the group title in next index toc '-:Oracle Collaboration Suite' =head1 SEE ALSO See also L, L. =begin credits =over 10 =item RDA 4.1: Bert Vanderstraeten, Matthias von Ehrenstein. =item RDA 4.2: Frederic Daurelle, Bert Vanderstraeten. =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