# S565FCM.def: Collects Oracle Hyperion Financial Close Management Information # $Id: S565FCM.def,v 1.15 2012/01/03 13:34:47 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S565FCM.def,v 1.15 2012/01/03 13:34:47 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S565FCM - Collects Oracle Hyperion Financial Close Management information =head1 DESCRIPTION This module collects information for Oracle Hyperion Financial Close Management. This module is applicable for Microsoft Windows only. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing FCM module ...',tput('off') # Initialization var $EPM_HOME = ${EPM_HOME:${ENV.EPM_ORACLE_HOME:${ENV.HYPERION_HOME:''}}} var $FCM_DB = ${FCM_DB} var $FCM_REQUESTS = ${FCM_REQUESTS} var $TAIL = ${RDA_TAIL:1000} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' if $FCM_DB pretoc '1:Financial Close Management' else pretoc '0: * Financial Close Management' =head2 dbinfo - Generic Database Information Collects generic information for Oracle Financial Close Management from an Oracle Database. =cut if $FCM_DB {run DBinfo() # Change the database context if getSetting('FCM_LOCAL') {var $sid = getSetting('ORACLE_SID') var $usr = getSetting('SQL_LOGIN') } elsif getSetting('FCM_SID') {var $sid = last var $usr = uc(getSetting('FCM_LOGIN','FCM')) # 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) # If requested, change the database context if getSetting('FCM_SWITCH') var $env = setSqlSid($sid) else var $env = undef var $try = setSqlFailure(0) } else {# Disable the database access var $env = undef var $old = setSqlLogin('','') var $try = setSqlFailure(-1) } # Test the database connection and collect information debug ' Inside FCM module, getting generic database information' report dbinfo write '---+!! Generic Database Information' toc '2:[[',getFile(),'][rda_report][Generic Database Information]]' if testSql() {echo '' echo tput('bold'),\ 'The schema containing FCM repository is not accessible.',tput('off') if $msg = getSqlMessage() {echo $msg } echo '' write 'FCM repository not accessible (',$msg,')' } else {# Display Oracle version set $sql {SELECT '|' || v.banner || '|' " FROM v$version v; } prefix {write '---+ Oracle Database Versions from V$Version' write '|*Banner*|' } call writeSql($sql) =head2 schedule - Schedule Information Collects schedule information from an Oracle Database. =cut debug ' Inside FCM module, getting schedule information' report schedule var $TTL = '---+!! Schedule Information' var @TTL = ('',\ '---+ List of Schedules',\ '---+ Schedule and Task Information') var @HDR = ('',\ '| *Deployment Id*|*Deployment Name*|*Description*|*Status*|\ *Start Date*|*End Date*| *Template Id*|',\ '| *Source Id*|*Deployment Name*| *Task Count*| *Status Id*|') set $sql {SELECT '| ' || " deployment_id || '|' || " deployment_name || ' |' || " description || ' |' || " status || ' |' || " TO_CHAR(start_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(end_date,'DD-Mon-YYYY HH24:MI:SS') || ' | ' || " template_id || '|' " FROM fcc_deployments " ORDER BY deployment_name; "PROMPT ___Macro_separator(2)___ "SELECT '| ' || " t.source_id || '|' || " d.deployment_name || ' | ' || " COUNT(t.task_id) || '| ' || " t.status_id || '|' " FROM fcc_tasks t, fcc_deployments d " WHERE t.source_type = 'DEPLOYMENT' " AND t.source_id = d.deployment_id " GROUP BY t.source_id, d.deployment_name, t.status_id " ORDER BY d.deployment_name; } call separator(1) call writeSql($sql) call separator(0,'Schedule Information') =head2 integration - Integration Type Information Collects integration type information from an Oracle Database. =cut debug ' Inside FCM module, getting integration type information' report integration var $TTL = '---+!! Integration Information' var @TTL = ('',\ '---+ List of Integration Applications',\ '---+ List of Integration Types') var @HDR = ('',\ '| *Application Id*|*Application Name*|*Web Application*|\ *Web Service*|') set $sql {SELECT '| ' || " application_id || '|' || " application_name || ' |' || " web_app || ' |' || " webservice || ' |' " FROM fcc_integration_apps " ORDER BY application_name; } if getSqlColumns('RDA','','fcc_integration_types','validation_error_msg_elem') {var $HDR[2] = \ '| *Integration Type Id*|*Integration Code*|*User Created*| \ *Application Id*|*Deleted*|*Execution Type*|*End User URL*|\ *Service WSDL Loc*|*Service URI*|*Service Port*|*Service Name*|\ *SOAP Action*|*Callback Port*|*Callback Name*|*Response XSL Template*|\ *Response Namespaces*|*Validation WSDL Loc*|*Validation URI*|\ *Validation Port*|*Validation Name*|*Validation SOAP Action*|\ *Validation Response Element*|*Validation Parameter Code Element*|\ *Validation Error Message Element*|' append $sql {PROMPT ___Macro_separator(2)___ "SELECT '[[[' || CHR(10) || '| ' || " integration_type_id || '|' || " integration_type_code || ' |' || " user_created || ' | ' || " application_id || '|' || " deleted || ' |' || " execution_type || ' |' || " end_user_url || ' |' || " service_wsdl_loc || ' |' || " service_uri || ' |' || " service_port || ' |' || " service_name || ' |' || " soap_action || ' |' || " callback_port || ' |' || " callback_name || ' |' || " REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( " LTRIM(response_xsl_template), " '|','|'), " ']',']'), " '[','['), " '<','<'), " '>','>'), " CHR(10),'%BR%'), " ' ',' ') || ' |' || " response_namespaces || ' |' || " validation_wsdl_loc || ' |' || " validation_uri || ' |' || " validation_port || ' |' || " validation_name || ' |' || " validation_soap_action || ' |' || " validation_response_elem || ' |' || " validation_param_code_elem || ' |' || " validation_error_msg_elem || ' |' || " CHR(10) || ']]]' " FROM fcc_integration_types " ORDER BY integration_type_code; } } else {var $HDR[2] = \ '| *Integration Type Id*|*Integration Code*|*User Created*| \ *Application Id*|*Deleted*|*Execution Type*|*End User URL*|\ *Service WSDL Loc*|*Service URI*|*Service Port*|*Service Name*|\ *SOAP Action*|*Callback Port*|*Callback Name*|*Response XSL Template*|\ *Response Namespaces*|*Response URI*|*Response Root Element*|\ *Request URI*|*Request Namespace*|*Root Element*|*SSO Parameter*|\ *Validation Status*|*Validation Message*|*Validation Log Loc*|\ *Validation Report Loc*|' append $sql {PROMPT ___Macro_separator(2)___ "SELECT '[[[' || CHR(10) || '| ' || " integration_type_id || '|' || " integration_type_code || ' |' || " user_created || ' | ' || " application_id || '|' || " deleted || ' |' || " execution_type || ' |' || " end_user_url || ' |' || " service_wsdl_loc || ' |' || " service_uri || ' |' || " service_port || ' |' || " service_name || ' |' || " soap_action || ' |' || " callback_port || ' |' || " callback_name || ' |' || " REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( " LTRIM(response_xsl_template), " '|','|'), " ']',']'), " '[','['), " '<','<'), " '>','>'), " CHR(10),'%BR%'), " ' ',' ') || ' |' || " response_namespaces || ' |' || " response_uri || ' |' || " response_root_element || ' |' || " request_uri || ' |' || " request_namespace || ' |' || " root_element || ' |' || " sso_parameter || ' |' || " validation_status || ' |' || " validation_msg || ' |' || " validation_log_location || ' |' || " validation_report_location || ' |' || " CHR(10) || ']]]' " FROM fcc_integration_types " ORDER BY integration_type_code; } } call separator(1) call writeSql($sql) call separator(0,'Integration Information') =head2 tasktype - Task Type Information Collects task type information from an Oracle Database. =cut debug ' Inside FCM module, getting task type information' report tasktype set $sql {SELECT '[[[' || CHR(10) || '| ' || " task_type_id || '|' || " task_type_name || ' |' || " REPLACE(description,CHR(10),'%BR%') || ' | ' || " integration_type_id || '|' || " execution_type || ' |' || " user_created || ' |' || " aggregate_task || ' |' || " deleted || ' | ' || " notification_msg_id || '| ' || " approver_msg_id || '| ' || " error_msg_id || '|' || " CHR(10) || ']]]' " FROM fcc_task_types " ORDER BY task_type_name; } prefix {write '---+ Task Type Information' write '| *Task Type Id*|*Task Type Name*|*Description*| \ *Integration Type Id*|*Execution Type*|*User Created*|\ *Aggregate Task*|*Deleted*| *Notification Message Id*|\ *Approver Message Id*| *Error Message Id*|' } call writeSql($sql) call separator(0,'Task Type Information') =head2 task - Task Information Collects task information from an Oracle Database. =cut debug ' Inside FCM module, getting task information' report task var $TTL = '---+!! Task Information' var @TTL = ('',\ '---+ Tasks with Errors',\ '---+ Tasks and Predecessors with Errors') var @HDR = ('',\ '| *Source Id*| *Task Id*|*Task Name*|*Error Message*|\ *Description*| *Task Type Id*| *Aggregation Parent*|\ *Actual Start Date*| *Actual End Date*|*Start Date*|*End Date*|\ *Scheduled Start Date*|*Scheduled End Date*| *Duration*|\ *Skip Flag*|*Deleted*|',\ '| *Predecessor Source Id*| *Predecessor Task Id*|\ *Predecessor Task Name*| *Predecessor Status Id*|\ *Predecessor Task Type*| *Source Id*| *Task Id*|*Task Name*| \ *Status Id*|') set $sql {SELECT '[[[' || CHR(10) || '| ' || " source_id || '| ' || " task_id || '|' || " task_name || ' |' || " REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( " LTRIM(error_msg), " '|','|'), " ']',']'), " '[','['), " '<','<'), " '>','>'), " CHR(10),'%BR%'), " ' ',' ') || ' |' || " description || ' | ' || " task_type_id || '| ' || " aggregation_parent || '|' || " TO_CHAR(actual_start_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(actual_end_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(start_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(end_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(scheduled_start_date,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " TO_CHAR(scheduled_end_date,'DD-Mon-YYYY HH24:MI:SS') || ' | ' || " duration || '|' || " skip_flag || ' |' || " TO_CHAR(deleted,'DD-Mon-YYYY HH24:MI:SS') || ' |' || " CHR(10) || ']]]' " FROM fcc_tasks " WHERE status_id IN (9, 13, 17, 33) " AND source_type = 'DEPLOYMENT' " ORDER BY source_id,task_id; "PROMPT ___Macro_separator(2)___ "SELECT '| ' || " t1.source_id || '| ' || " t1.task_id || '|' || " t1.task_name || ' | ' || " t1.status_id || '|' || " p.predecessor_task_type || ' |' || " t2.source_id || '| ' || " t2.task_id || '|' || " t2.task_name || ' | ' || " t2.status_id || '|' " FROM fcc_tasks t1, fcc_task_predecessors p, fcc_tasks t2 " WHERE p.predecessor_task_id = t1.task_id " AND p.task_id = t2.task_id " AND t1.source_type = 'DEPLOYMENT' " AND t2.source_type = 'DEPLOYMENT' " AND (t1.status_id IN (9, 13, 17, 33) OR t2.status_id IN (9, 13, 17, 33)) " ORDER BY t1.source_id, t1.task_id; } call separator(1) call writeSql($sql) call separator(0,'Task Information') } # Restore the previous database context if defined($env) call setSqlSid($env) call setSqlFailure($try) call setSqlLogin($old) } =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic reports generated by the WREQ module for the associated Oracle WebLogic Server domain (on versions earlier than 11.1.2 having a product registry). =cut if !?$FCM_REQUESTS {if ?${FCM_DOM_REQ_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_FCM_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_FCM_DOM.toc")%' toc '%POP2%' } } =head1 DEPLOYMENT REPORTS Available on version 11.1.2 and later. =cut else {loop $uid (split('\|',$FCM_REQUESTS)) {next !$uid var $ins = getSetting(concat('FCM_HOME',$uid)) call setAbbr(concat('FCM_i',$uid)) pretoc '%SPLIT%' pretoc "1+:'",getSetting(concat('FCM_INSTANCE',$uid)),"' Deployment" =head2 diaglogs - Diagnostic Log Files Collects the diagnostic log files from F<$INSTANCE_HOME/diagnostics/logs> directory. =cut report diaglogs var $log = catDir($ins,'diagnostics','logs') prefix {write '---+!! Diagnostic Log Files' write '---## From: ',$log write ' * Last ',$TAIL,' lines from the log files captured' 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($log,'\.log$','irt')) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output d,concat('L_',basename($fil)) if ${CUR.LAST}->write_tail($fil,$TAIL) var $lnk = concat('[[',${CUR.LAST}->get_file,'][_blank][',$lnk,']]') call $[OUT]->end_report(${CUR.LAST}) } write '|',$lnk,' | ',$siz,'|',\ getLastModify($fil,'%d-%b-%Y %H:%M:%S'),' |' } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Diagnostic Log Files]]' =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic reports generated by the WREQ module for the associated Oracle WebLogic Server domain. =cut if ?getSetting(concat('FCM_DOM',$uid,'_REQ_DOMAIN')) {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_FCM_TOP',$uid,'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_FCM_DOM',$uid,'.toc",1)%' toc '%POP2%' } unpretoc 2 } } unpretoc =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.20: Fang Liu, Tony Mitri. =item RDA 4.21: Fang Liu, Tony Mitri. =item RDA 4.26: Fang Liu. =item RDA 4.27: Fang Liu. =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