# DCsoa.ctl:370:Collects Oracle SOA Suite Information # $Id: DCsoa.ctl,v 1.21 2015/08/21 15:30:22 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCsoa.ctl,v 1.21 2015/08/21 15:30:22 RDA Exp $ # # Change History # 20150821 MSC Improve time consistency. =head1 NAME OFM:DCsoa - Collects Oracle SOA Suite Information =head1 DESCRIPTION This module collects diagnostic information for Oracle SOA Suite 11g or later. The following reports can be generated and are regrouped under C: =cut use Xml echo tput('bold'),'Processing OFM.SOA module ...',tput('off') # Initialization var $DETAIL = ${W_DETAIL:'MAX'} var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $TAIL = ${DFT.N_TAIL:1000} var @req = ${CUR.O_SETUP}->search('^WREQ_OFM_SOA_DOM') var $MOD = cond(isUnix(),'fx','fr') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle SOA Suite',check($DETAIL,'^BAS$',' (Basic)',\ '^MIN$',' (Minimum)') =head1 ORACLE HOME COLLECTIONS =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle home collection. =cut debug ' Inside SOA module, collecting defined abbreviations' report abbr prefix {write '---+ Oracle Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 error - SOA Error Indicates that the specified Oracle home does not contain Oracle SOA Suite information. =cut # Indicate SOA error macro dsp_error {echo ' Error: The specified Oracle home does not contain SOA information' report error write '** Error: The specified Oracle home does not contain files related to \ Oracle SOA 11g or later.**%BR%' write '%BR%' if @arg {write '|*Oracle Home*|',encode($arg[0]),' |' write '|*Install Name*|',$arg[1],' |' write '|*Install Version*|',$arg[2],' |' } toc '2:[[',getFile(),'][rda_report][SOA Error]]' } macro dsp_error12 {echo ' Error: The specified Oracle home does not contain SOA information' report error write '** Error: The specified Oracle home does not contain feature sets \ related to Oracle SOA 12c or later.**%BR%' write '%BR%' write '|*Oracle Home*|',encode($arg[0]),' |' toc '2:[[',getFile(),'][rda_report][SOA Error]]' } # Validate the profile type var ($AS12,$flg) = (false,true) if ?testDir('dr',catDir($ORACLE_HOME,'inventory','distributions')) {if !grepDir(catDir($ORACLE_HOME,'inventory','featuresets'),'^soa_\w+\_12\.') {call dsp_error12($ORACLE_HOME) var $flg = false } var $AS12 = true } elsif ?testFile('fr',\ catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml')) {if xmlFind(xmlLoadFile(lastFile()),'PRD_LIST/TL_LIST/COMP') {var ($xml) = (last) var $ver = xmlValue($xml,'VER') var $dsc = xmlData(xmlFind($xml,'EXT_NAME')) if !and(match($dsc,'^(Oracle SOA Suite 11g|\ SOA Application Server 11g)',true),\ match($ver,'^11\.')) {call dsp_error($ORACLE_HOME,$dsc,$ver) var $flg = false } } } if $flg {if !?testDir('d',catDir($ORACLE_HOME,'soa')) call dsp_error() } =head2 rep_info - Repository Information Collects the repository information from the Oracle SOA Suite database (applicable for C collection). =cut if compare('eq',$DETAIL,'MAX') {# Initialization var $SOA_JDK = ${D_JDK:''} var $CFGTOOLLOGS_HOME = catDir($ORACLE_HOME,'cfgtoollogs') var $CLONE_HOME = catDir($ORACLE_HOME,'clone') var $INSTALL_HOME = catDir($ORACLE_HOME,'install') var $SYSMAN_HOME = cond($AS12,\ catDir($ORACLE_HOME,'oracle_common','sysman'),\ catDir($ORACLE_HOME,'sysman')) # Load the common macros run DB:DBinfo() run OFM:WLSlib() run RDA:library() # Collect the repository information if ${I_DB} {call setDbTarget(last) var (undef,undef,$usr) = getDbInfo() debug ' Inside SOA module, gathering the repository information' report rep_info if testDb() {echo '' echo tput('bold'),'The database is not accessible.',tput('off') if getDbMessage() {echo last write '---+ SOA Repository Information' write 'Database not accessible (',getDbMessage(),')' toc '2:[[',getFile(),'][rda_report][Repository Information]]' } echo '' } else {var $TTL = '---+!! SOA Repository Information' var @DBG = ('',\ ' - Getting tablespace information',\ concat(' - Getting free space in default tablespaces for ',\ $usr),\ concat(' - Getting extents of default tablespaces for ',$usr),\ concat(' - Getting total number of invalid objects for ',$usr),\ concat(' - Getting list of invalid objects for ',$usr),\ ' - Getting total number of rows in Cube_Instance table',\ ' - Getting total number of rows in Cube_Scope table',\ ' - Getting total number of rows in Dlv_Message table',\ ' - Getting total number of rows in Dlv_Subscription table',\ ' - Getting total number of rows in Audit_Trail table',\ ' - Getting total number of rows in Audit_Details table',\ ' - Getting total number of rows in Test_Details table',\ ' - Getting total number of rows in Document_Ci_Ref table',\ ' - Getting total number of rows in Native_Correlation table',\ ' - Getting total number of rows in Xml_Document table',\ ' - Getting total number of rows in Attachment table',\ ' - Getting total number of rows in Attachment_Ref table',\ ' - Getting total number of rows in Ci_Indexes table',\ ' - Getting RCU schema related information',\ concat(' - Getting table health related information for ',\ $usr),\ ' - Getting SOA schema version information',\ ' - Getting composite instance count information',\ ' - Getting cube instance count information',\ ' - Getting last 1 day composite summary information',\ ' - Getting last 2 days composite summary information',\ ' - Getting top 10 composite summary information',\ ' - Getting top 10 reference instance summary information',\ ' - Getting top 10 component instance summary information',\ ' - Getting top 10 cube instance summary information',\ ' - Getting top 10 mediator instance summary information',\ ' - Getting top 10 HWF task instance summary information',\ ' - Getting top 10 rules instance summary information',\ ' - Getting distributed lock timeout information',\ ' - Getting total number of rows in V$Pending_Xatrans$ table',\ ' - Getting total number of rows in V$Xatrans$ table',\ ' - Getting total number of rows in Pending_Trans$ table',\ ' - Getting total number of rows in Dba_2pc_Pending table',\ ' - Getting total number of rows in Dba_Pending_Transactions \ table',\ ' - Getting total number of rows in Dbms_System table',\ ' - Getting NLS_Database_Parameters table information') var @TTL = ('',\ '---+ Tablespace Information',\ concat('---+ Free Space in Default Tablespaces for ',$usr),\ concat('---+ Extents of Default Tablespaces for ',$usr),\ concat('---+ Total Number of Invalid Objects for ',$usr),\ concat('---+ List of Invalid Objects for ',$usr),\ '---+ Number of Rows in Cube_Instance Table',\ '---+ Number of Rows in Cube_Scope Table',\ '---+ Number of Rows in Dlv_Message Table',\ '---+ Number of Rows in Dlv_Subscription Table',\ '---+ Number of Rows in Audit_Trail Table',\ '---+ Number of Rows in Audit_Details Table',\ '---+ Number of Rows in Test_Details Table',\ '---+ Number of Rows in Document_Ci_Ref Table',\ '---+ Number of Rows in Native_Correlation Table',\ '---+ Number of Rows in Xml_Document Table',\ '---+ Number of Rows in Attachment Table',\ '---+ Number of Rows in Attachment_Ref Table',\ '---+ Number of Rows in Ci_Indexes Table',\ '---+ Repository Creation Utility (RCU) Schema Information',\ '---+ Table Health Information',\ '---+ SOA Schema Version Information',\ '---+ Composite Instance Count Information',\ '---+ Cube Instance Count Information',\ '---+ Last 1 Day Composite Summary Information',\ '---+ Last 2 Days Composite Summary Information',\ '---+ Top 10 Composite Summary Information',\ '---+ Top 10 Reference Instance Summary Information',\ '---+ Top 10 Component Instance Summary Information',\ '---+ Top 10 Cube Instance Summary Information',\ '---+ Top 10 Mediator Instance Summary Information',\ '---+ Top 10 HWF Task Instance Summary Information',\ '---+ Top 10 Rules Instance Summary Information',\ '---+ Distributed Lock Timeout Information',\ '---+ Number of Rows in V$Pending_Xatrans$ Table',\ '---+ Number of Rows in V$Xatrans$ Table',\ '---+ Number of Rows in Pending_Trans$ Table',\ '---+ Number of Rows in Dba_2pc_Pending Table',\ '---+ Number of Rows in Dba_Pending_Transactions Table',\ '---+ Number of Rows in Dbms_System Table',\ '---+ NLS_Database_Parameters Table Information') var @TXT = (undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ undef,\ "Displays the SOA schema version for the domain.",\ "Selects the total count of composite instance records from the \ ``COMPOSITE_INSTANCE`` table, grouping them by state and \ ordering them by state count.",\ "Selects the total count of cube instance records from the \ ``CUBE_INSTANCE`` table, grouping them by state and ordering \ them by state count.",\ "Selects the count of composite instances created in the last \ 24 hours from the ``COMPOSITE_INSTANCE`` table, grouping them \ by state and ordering them by state count.",\ "Selects the count of composite instances created in the last \ 48 hours from the ``COMPOSITE_INSTANCE`` table, grouping them \ by state and ordering them by state count.",\ "Selects the total count of composite instances from the \ ``COMPOSITE_INSTANCE`` table, grouping them by state and \ composite DN. We then order the results by composite instance \ count and display the first 10 rows.",\ "Selects the total count of reference instances from the \ ``REFERENCE_INSTANCE`` table, grouping them by state, \ reference name and composite DN. We then order the results by \ reference instance count and display the first 10 rows.",\ undef,\ "Selects the total count of cube instances from the \ ``CUBE_INSTANCE`` table, grouping them by state, component \ name and composite revision. We then order the results by cube \ instance count and display the first 10 rows.",\ "Selects the total number of Mediator instances from the \ ``MEDIATOR_INSTANCE`` table, grouping them by component state \ and component name. We then order the results by mediator \ instance count and display the first 10 rows.",\ "Selects the total task count from the ``WFTASKHISTORY`` table, \ grouping them by status, component name and composite DN. We \ then order them by task count and display the first 10 rows.",\ "Selects the total rules instance count from the \ ``BRDECISIONINSTANCE`` table, grouping them by state and \ component DN. We then order the results by rule instance \ count and display the first 10 rows.") var @HDR = ('',\ '|*Username*|*Created*|*Default Tablespace*|*Temp Tablespace*|',\ '|*Default Tablespace*|*Free Tablespace (MiB)*|',\ '|*Tablespace Name*|*Initial Extent*|*Next Extent*|\ *Pct Increase*|*Allocation Type*|*Segment Space Management*|\ *Extent Management*|',\ '| *Count*|',\ '|*Owner*|*Object Name*|*Object Type*|*Status*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '|*Component Id*|*Component Name*|*MRC Name*|*MR Name*|\ *MR Type*|*Owner*|*Version*|*Status*|*Upgraded*|*Start Time*|\ *Modified*|',\ '|*Table Name*| *Segment Size (MiB)*| *Extent Used*| \ *Total Rows*|*Last Analyzed Date*|',\ '',\ '| *Instance Count*| *State*|',\ '| *Instance Count*| *State*|',\ '| *Instance Count*| *State*|*Composite DN*|',\ '| *Instance Count*| *State*|*Composite DN*|',\ '| *Instance Count*| *State*|*Composite DN*|',\ '| *Instance Count*| *State*|*Reference Name*|*Composite DN*|',\ '| *Instance Count*| *State*|*Component DN*|',\ '| *Instance Count*| *State*|*Component Name*|*Composite Name*|\ *Composite Revision*|',\ '| *Instance Count*| *Component State*|*Component Name*|',\ '| *History Count*|*State*|*Component Name*|*Composite DN*|',\ '| *Instance Count*| *State*|*Component DN*|',\ '|*Name*|*Value*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '| *Count*|',\ '|*Parameter*| *Value*|') set $sql {# SQL1 "SELECT '|' || " username || ' |' || " TO_CHAR(created,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " default_tablespace || ' |' || " temporary_tablespace || ' |' " FROM dba_users " WHERE username = ':1' "/ "# MACRO separator(2) "# SQL2 "SELECT '|' || " tablespace_name || ' | ' || " SUM(bytes) / 1048576 || '|' " FROM dba_free_space " WHERE tablespace_name IN ( " SELECT default_tablespace " FROM dba_users " WHERE username = ':1') " GROUP BY tablespace_name " ORDER BY tablespace_name "/ "# MACRO separator(3) "# SQL3 "SELECT '|' || " tablespace_name || ' | ' || " initial_extent || '| ' || " next_extent || '| ' || " pct_increase || '|' || " allocation_type || ' |' || " segment_space_management || ' |' || " extent_management || ' |' " FROM dba_tablespaces " WHERE tablespace_name IN ( " SELECT default_tablespace " FROM dba_users " WHERE username = ':1') " ORDER BY tablespace_name "/ "# MACRO separator(4) "# SQL4 "SELECT '| ' || " COUNT(*) || '|' " FROM all_objects " WHERE status = 'INVALID' " AND owner = ':1' "/ "# MACRO separator(5) "# SQL5 "SELECT '|' || " owner || ' |' || " object_name || ' |' || " object_type || ' |' || " status || ' |' " FROM all_objects " WHERE status = 'INVALID' " AND owner = ':1' "/ "# MACRO separator(6) "# SQL6 "SELECT '| ' || " COUNT(*) || '|' " FROM cube_instance "/ "# MACRO separator(7) "# SQL7 "SELECT '| ' || " COUNT(*) || '|' " FROM cube_scope "/ "# MACRO separator(8) "# SQL8 "SELECT '| ' || " COUNT(*) || '|' " FROM dlv_message "/ "# MACRO separator(9) "# SQL9 "SELECT '| ' || " COUNT(*) || '|' " FROM dlv_subscription "/ "# MACRO separator(10) "# SQL10 "SELECT '| ' || " COUNT(*) || '|' " FROM audit_trail "/ "# MACRO separator(11) "# SQL11 "SELECT '| ' || " COUNT(*) || '|' " FROM audit_details "/ "# MACRO separator(12) "# SQL12 "SELECT '| ' || " COUNT(*) || '|' " FROM test_details "/ "# MACRO separator(13) "# SQL13 "SELECT '| ' || " COUNT(*) || '|' " FROM document_ci_ref "/ "# MACRO separator(14) "# SQL14 "SELECT '| ' || " COUNT(*) || '|' " FROM native_correlation "/ "# MACRO separator(15) "# SQL15 "SELECT '| ' || " COUNT(*) || '|' " FROM xml_document "/ "# MACRO separator(16) "# SQL16 "SELECT '| ' || " COUNT(*) || '|' " FROM attachment "/ "# MACRO separator(17) "# SQL17 "SELECT '| ' || " COUNT(*) || '|' " FROM attachment_ref "/ "# MACRO separator(18) "# SQL18 "SELECT '| ' || " COUNT(*) || '|' " FROM ci_indexes "/ "# MACRO separator(19) "# SQL19 "SELECT '|' || " comp_id || ' |' || " comp_name || ' |' || " mrc_name || ' |' || " mr_name || ' |' || " mr_type || ' |' || " owner || ' |' || " version || ' |' || " status || ' |' || " upgraded || ' |' || " start_time || ' |' || " modified || ' |' " FROM schema_version_registry "/ } if ${B_DEHYD_STORE} {append $sql {# MACRO separator(20) "# SQL20 "SELECT '|' || " dt.table_name || ' | ' || " ds.bytes/1024/1024 || '| ' || " ds.extents || '| ' || " dt.num_rows || '|' || " TO_CHAR(dt.last_analyzed,'DD-Mon-YYYY HH24:MI:SS') || ' |' " FROM dba_segments ds,dba_tables dt " WHERE dt.owner = ds.owner " AND dt.owner = ':1' " AND dt.tablespace_name = ds.tablespace_name " AND dt.table_name = ds.segment_name " AND ds.segment_type = 'TABLE' " AND dt.table_name IN ('AUDIT_TRAIL','COMPONENT_INSTANCE', " 'COMPOSITE_INSTANCE','CUBE_INSTANCE', " 'DLV_MESSAGE','DOCUMENT_CI_REF', " 'MEDIATOR_CASE_INSTANCE','MEDIATOR_INSTANCE', " 'REFERENCE_INSTANCE','WORK_ITEM', " 'XML_DOCUMENT','') "/ } var ($HDR[21],$col21) = getDbColumns('RDA','VERSION') call clearDbColumns('RDA') if $col21 {append $sql {# MACRO separator(21) "# SQL21 "SELECT :2 " FROM version "/ } } append $sql {# MACRO separator(22) "# SQL22 "SELECT '| ' || " COUNT(*) || '| ' || " state || '|' " FROM composite_instance " GROUP BY state " ORDER BY COUNT(*) DESC "/ "# MACRO separator(23) "# SQL23 "SELECT '| ' || " COUNT(*) || '| ' || " state || '|' " FROM cube_instance " GROUP BY state " ORDER BY COUNT(*) DESC "/ "# MACRO separator(24) "# SQL24 "SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " composite_dn || ' |' " FROM composite_instance " WHERE created_time > SYSDATE - 1 " GROUP BY state,composite_dn " ORDER BY COUNT(*) DESC "/ "# MACRO separator(25) "# SQL25 "SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " composite_dn || ' |' " FROM composite_instance " WHERE created_time > SYSDATE - 2 " GROUP BY state,composite_dn " ORDER BY COUNT(*) DESC "/ "# MACRO separator(26) "# SQL26 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " composite_dn || ' |' " FROM composite_instance " GROUP BY state,composite_dn " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(27) "# SQL27 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " reference_name || ' |' || " composite_dn || ' |' " FROM reference_instance " GROUP BY state,reference_name,composite_dn " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(28) "# SQL28 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " component_dn || ' |' " FROM component_instance " GROUP BY state,component_dn " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(29) "# SQL29 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " component_name || ' |' || " composite_name || ' |' || " composite_revision || ' |' " FROM cube_instance " GROUP BY state,component_name,composite_name,composite_revision " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(30) "# SQL30 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " component_state || '|' || " component_name || ' |' " FROM mediator_instance " GROUP BY component_state,component_name " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(31) "# SQL31 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '|' || " state || ' |' || " componentname || ' |' || " compositedn || ' |' " FROM wftaskhistory " GROUP BY state,componentname,compositedn " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ "# MACRO separator(32) "# SQL32 "SELECT * " FROM ( SELECT '| ' || " COUNT(*) || '| ' || " state || '|' || " component_dn || ' |' " FROM brdecisioninstance " GROUP BY state,component_dn " ORDER BY COUNT(*) DESC ) " WHERE ROWNUM <= 10 "/ } } append $sql {# MACRO separator(33) "# SQL33 "SELECT '|' || " SUBSTR(name,0,512) || '|' || " NVL(SUBSTR(value,0,512), '%NULL%') || '|' " FROM v$parameter " WHERE name = 'distributed_lock_timeout' "/ "# MACRO separator(34) "# SQL34 "SELECT '| ' || " COUNT(*) || '|' " FROM v$pending_xatrans$ "/ "# MACRO separator(35) "# SQL35 "SELECT '| ' || " COUNT(*) || '|' " FROM v$xatrans$ "/ "# MACRO separator(36) "# SQL36 "SELECT '| ' || " COUNT(*) || '|' " FROM pending_trans$ "/ "# MACRO separator(37) "# SQL37 "SELECT '| ' || " COUNT(*) || '|' " FROM dba_2pc_pending "/ "# MACRO separator(38) "# SQL38 "SELECT '| ' || " COUNT(*) || '|' " FROM dba_pending_transactions "/ "# MACRO separator(39) "# SQL39 "SELECT '| ' || " COUNT(*) || '|' " FROM dbms_system "/ "# MACRO separator(40) "# SQL40 "SELECT '|' || " parameter || ' | ' || " value || '|' " FROM nls_database_parameters " WHERE parameter LIKE 'NLS%CHARACTERSET' "/ } call separator(1) call writeDb(bindDb($sql,$usr,$col21)) call separator(0,'Repository Information') } } } =head2 version - Version Information Gathers the product version information (applicable for C and C collections). =cut if match($DETAIL,'^(MAX|MIN)$') {if ?nvl(\ testFile('f',catFile($ORACLE_HOME,'soa','bin',${AS.CMD:'soaversion'})),\ testFile('f',catFile($ORACLE_HOME,'bin',${AS.CMD:'soaversion'}))) {report version prefix {write '---+ Version Information' write '---## Using: ',encode(lastTestFile()) } call writeCommand(lastTestCommand()) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Version Information]]' } =head2 product_info - Product Information Gathers the product information if Oracle SOA Suite is installed in a separate Oracle home (applicable for C and C collections). =cut if ${B_DISTINCT_HOME} {# Load the common macros run RDA:INVinfo() debug ' Inside SOA module, processing Product Information (can take time)' report product_info title '---+!! SOA Oracle Home Product Information' title '---## From ',encode($ORACLE_HOME),' ' title $TOC prefix write '---+ Files in SOA Oracle Home' call statDir('an',$ORACLE_HOME) if hasOutput(true) write $TOP call inventory_details(catDir($ORACLE_HOME,'inventory'),${B_INTERIM}) if isCreated() toc '2:[[',getFile(),'][rda_report][Product Information]]' } } =head2 Installation and Configuration Gathers the Oracle Fusion Middleware configuration and installation files (applicable for C collection). =cut if compare('eq',$DETAIL,'MAX') {debug ' Inside SOA module, getting installation and configuration information' pretoc '2:Installation and Configuration' call sort_files(3,$TAIL,\ grepDir($CFGTOOLLOGS_HOME,'\.(ini|log|properties|xml)','dir'),\ grepDir($CLONE_HOME,'\.log','dir'),\ grepDir($INSTALL_HOME,'\.(ini|log)','dir')) unpretoc if ?testDir('d',catDir($ORACLE_HOME,'diagnostics')) {debug ' Inside SOA module, gathering diagnostics information' pretoc '2:Diagnostics' call sort_files(3,$TAIL,\ grepDir(lastDir(),'\.((conf|ini|xml|properties|err)$|log)|\~','dir')) unpretoc } =head2 Manifest Information Gathers the Oracle home manifest information (applicable for C collection). =cut debug ' Inside SOA module, getting Oracle home manifest information \ (can take time)' pretoc '2:Manifest Information' call dsp_manifest(3,$ORACLE_HOME) unpretoc } =head2 Application Files Gathers the Oracle SOA-related application files (applicable for C and C collections). =cut if match($DETAIL,'^(MAX|MIN)$') {debug ' Inside SOA module, gathering application files' pretoc '2:Application Files' loop $req (@req) {var ($dir,$dom,%fil) = () # Get the application files if ?testFile('fr',catFile(\ $req->get_first('I_DOMAIN')->get_first('D_DOMAIN_HOME'),\ 'config','config.xml')) {var $obj = xmlLoadFile(lastFile(),xmlDisable(xmlParser(),'BCDEPR')) var $dom = xmlData(xmlFind($obj,'domain/name')) if xmlFind($obj,'domain/app-deployment|name *="^soa-infra"') {var ($xml) = last if ??$xml->find('source-path')->get_data var $fil{getNativePath(last)} = true if ??$xml->find('plan-dir')->get_data var $dir = getNativePath(last) if ??$xml->find('plan-path')->get_data var $fil{getNativePath(last)} = true } } # Write the application files report concat('d_',$dom,'_app_files') prefix {write "---+ '",$dom,"' Domain Application Files" write ' * Links point to files that have been collected in their \ original format. Opening them directly in your browser \ can present risks. To prevent them, access the file \ outside the browser or use the link to save them and use \ an adequate viewer.' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $fil (grepDir($dir,'^[^\.]','np')) var $fil{$fil} = true loop $fil (keys(%fil)) {if ?testFile('fr',$fil) {var $lnk = encode(addSymbol($fil)) var $siz = getSize($fil) if $siz {output d,concat('app_',basename($fil)) if ${CUR.O_LAST}->write_data($fil) var $lnk = concat('[[',${CUR.O_LAST}->get_raw(true),\ '][_blank][',$lnk,']]') end ${CUR.O_LAST} } write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } } if isCreated(true) toc '3:[[',getFile(),"][rda_report]['",$dom,"' Domain]]" } unpretoc =head2 jdk_info - JDK Information Checks for the available Java Development Kit and reports its version (applicable for C collection). =cut if compare('eq',$DETAIL,'MAX') {debug ' Inside SOA module, gathering jar files' report jdk_info title '---+!! JDK Information' title $TOC var @tbl = grepDir(replace($SOA_JDK,'\\:',':'),'^java(\.exe)?$','inr') loop $cmd (@tbl) {if ?testFile($MOD,$cmd) {var $cmd = last prefix write '---++ JDK Location: ',encode(catSymbol($cmd)) call statFile('p',$cmd) var $cmd = quote($cmd) prefix write '---++++!! JDK Version' call writeCommand(concat($cmd,' -version 2>&1')) prefix write '---++++!! JDK Full Version' call writeCommand(concat($cmd,' -fullversion 2>&1')) if hasOutput(true) write $TOP } } if !hasOutput(true) {write '---+ JDK information' write '**No java executable found inside the JDK directory structure.**' } if isCreated() toc '2:[[',getFile(),'][rda_report][JDK Information]]' =for stopwords Libs =head2 jdk_libs - Java Libs Gathers information about all C<*.jar> files located in the common directory. For each Java archive file, the report collects file information and the output from C (applicable for C collection). =cut debug ' Inside SOA module, gathering Java libs information' report java_libs title '---+!! Information about Java Libs' title '%TOC3-2%' var $cmd = findCommand('cksum') loop $jar (\ grepDir(catDir($ORACLE_HOME,'j2ee','home'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'jlib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'lib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'jdbc','lib'),'\.(jar|zip)$','dir'),\ grepDir(catDir($ORACLE_HOME,'oracle_common','jlib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'oracle_common','lib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'soa','jlib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'soa','lib'),'\.jar$','inr')) {if ?testFile('f',$jar) {prefix write '---++ ',encode(catSymbol($jar)) call statFile('p',$jar) if $cmd {prefix write '---++++!! cksum: (checksum size filename)' call writeCommand(concat($cmd,' ',quote($jar))) } if hasOutput(true) write $TOP } } if isCreated() toc '2:[[',getFile(),'][rda_report][Java Libs]]' =head2 SYSMAN Gathers SYSMAN information (applicable for C collection). =cut debug ' Inside SOA module, gathering SYSMAN information' pretoc '2:SYSMAN' call sort_files(3,$TAIL,grepDir($SYSMAN_HOME,'\.(log|properties|xml)','inr'),\ grepDir(catDir($SYSMAN_HOME,'config'),'^[^\.]','pn'),\ grepDir(catDir($SYSMAN_HOME,'log'),'^[^\.]','pn')) unpretoc } =head2 HCVE Performs the postinstallation checks (applicable for C and C collections). =cut debug ' Inside SOA module, executing the postinstallation checks' test TOOL:TLhcve('OFM:Psoa11_gen') =head1 COMMON HOME INFORMATION Includes the reports generated by the L module about the common home (applicable for C and C collections). =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("OFM_IREQ_OFM_SOA_CH_TF.toc")%' toc '%POP2%' } =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS It includes all reports produced by the L module for the specified Oracle WebLogic Server domains. =cut # Analyze the domain requests var %tbl = () loop $req (@req) {var $dom = $req->get_first('I_DOMAIN') if ?$dom->get_first('I_WL_HOME') var $tbl{last->get_oid,$req->get_oid} = $dom->get_first('T_DOMAIN_NAME') else var $tbl{'WH',$req->get_oid} = $dom->get_first('T_DOMAIN_NAME') } # Include the table of content files produced by WREQ loop $oid (keys(%tbl)) {if $orp = compare('eq',$oid,'WH') toc '%PUSH("0: * Orphan Domains")%' toc '%PUSH("%SPLIT%")%' if $AS12 toc '%PUSH("1+:Product and Patch Overview")%' else toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_SOA_',$oid,'_TF.toc")%' toc '%POP2%' loop $tid (keys($tbl = $tbl{$oid})) {toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$tbl->{$tid},"'",' Domain")%' toc '%INCLUDE("OFM_',$tid,'_TF.toc")%' toc '%POP2%' } if $orp toc '%POP%' } =head2 HCVE Performs the postinstallation checks (applicable for C and C collections). =cut if match($DETAIL,'^(MAX|MIN)$') {debug ' Inside SOA module, executing the postinstallation checks' var $tbl = {} loop $req (@req) {var $tgt = addTarget($req->get_first('I_DOMAIN')) var $tbl->{catDir($tgt->get_domain('.'))} = \ [catDir($tgt->get_domain('top')),$tgt->get_domain('nam','')] } var ${RUN.HCVE.OFM.SOA.T_DOMAINS} = $tbl test TOOL:TLhcve('OFM:Psoa11_gen') } unpretoc =head1 SEE ALSO L, L, L, L, L, L =begin credits =over 10 =item RDA 4.14: Greg Cook, Andrew Salt. =item RDA 4.21: Raja Vairavaraja. =item RDA 4.24: Greg Cook, Antony Reynolds, Andrew Salt, Maria Salzberger. =item RDA 4.25: Maria Salzberger. =item RDA 4.26: Shawn Bailey, Maria Salzberger. =item RDA 4.27: Shawn Bailey, Maria Salzberger. =item RDA 8.00: Shawn Bailey, Maria Salzberger. =item RDA 8.03: Wes Root, Maria Salzberger. =item RDA 8.04: Wes Root, Maria Salzberger. =item RDA 8.08: Maria Salzberger, Sayed Muhammed Sha. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, 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