# DCesb.ctl:371:Collects Enterprise Service Bus Information # $Id: DCesb.ctl,v 1.2 2013/10/30 07:18:32 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCesb.ctl,v 1.2 2013/10/30 07:18:32 RDA Exp $ # # Change History # 20130112 KRA Initial RDA 8 version. =head1 NAME OFM:DCesb - Collects Enterprise Service Bus Information =head1 DESCRIPTION This module collects the Enterprise Service Bus-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.ESB module ...',tput('off') # Initialization var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $TAIL = ${DFT.N_TAIL:1000} var $ESB_HOME = catDir($ORACLE_HOME,'integration','esb') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Enterprise Service Bus' # Load the common macros run DB:DBinfo() run RDA:library() =head2 rep_info - Repository Information Collects the repository information from the Enterprise Service Bus database. =cut # Set the database context call setSqlTarget(${I_DB}) # Test the database connection if testSql() {echo '' echo tput('bold'),'The schema containing the ESB repository is not \ accessible.',tput('off') echo tput('bold'),'Therefore RDA cannot collect repository information.',\ tput('off') if getSqlMessage() echo last echo '' } else {debug ' Inside ESB module, gathering the repository information' report rep_info var $TTL = '---+!! Enterprise Service Bus Repository Information' var @DBG = ('',\ ' - Getting tablespace information',\ ' - Getting free space in default tablespaces for ORAESB',\ ' - Getting extents of default tablespaces for ORAESB',\ ' - Getting total number of invalid objects',\ ' - Getting list of invalid objects',\ ' - Getting total number of rows in ESB_Control table',\ ' - Getting total number of rows in ESB_Error table',\ ' - Getting total number of rows in ESB_Monitor table',\ ' - Getting ESB_Parameter table information') var @TTL = ('',\ '---+ Tablespace Information',\ '---+ Free Space in Default Tablespaces for ORAESB',\ '---+ Extents of Default Tablespaces for ORAESB',\ '---+ Total Number of Invalid Objects',\ '---+ List of Invalid Objects',\ '---+ Number of Rows in ESB_Control Table',\ '---+ Number of Rows in ESB_Error Table',\ '---+ Number of Rows in ESB_Monitor Table',\ '---+ ESB_Parameter Table Information') 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*|',\ '|*Parameter Name*|*Parameter Value*|') set $sql {SELECT '|' || " username || ' |' || " TO_CHAR(created,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " default_tablespace || ' |' || " temporary_tablespace || ' |' " FROM dba_users " WHERE username = 'ORAESB'; "PROMPT ___Macro_separator(2)___ "SELECT '|' || " tablespace_name || ' | ' || " SUM(bytes) / 1048576 || '|' " FROM dba_free_space " WHERE tablespace_name IN ( " SELECT default_tablespace " FROM dba_users " WHERE username = 'ORAESB') " GROUP BY tablespace_name " ORDER BY tablespace_name; "PROMPT ___Macro_separator(3)___ "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 = 'ORAESB') " ORDER BY tablespace_name; "PROMPT ___Macro_separator(4)___ "SELECT '| ' || " COUNT(*) || '|' " FROM all_objects " WHERE status = 'INVALID'; "PROMPT ___Macro_separator(5)___ "SELECT '|' || " owner || ' |' || " object_name || ' |' || " object_type || ' |' || " status || ' |' " FROM all_objects " WHERE status = 'INVALID'; "PROMPT ___Macro_separator(6)___ "SELECT '| ' || " COUNT(*) || '|' " FROM esb_control; "PROMPT ___Macro_separator(7)___ "SELECT '| ' || " COUNT(*) || '|' " FROM esb_error; "PROMPT ___Macro_separator(8)___ "SELECT '| ' || " COUNT(*) || '|' " FROM esb_monitor; "PROMPT ___Macro_separator(9)___ "SELECT '|' || " param_name || ' |' || " param_value || ' |' " FROM esb_parameter; } call separator(1) call writeSql($sql) call separator(0,'Repository Information') } =head2 Configuration Files Gathers Enterprise Service Bus-related configuration files. =cut debug ' Inside ESB module, collecting the configuration files' pretoc '2:Configuration Files' call sort_files(3,$TAIL,\ grepDir(catDir($ESB_HOME,'config'),'\.(ini|xml|esb)','p')) unpretoc 2 =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.10: Sunil Hingorani, Selva Parthasarathy. =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