# DChfm.cfg: Collects Oracle Hyperion Financial Management Information # $Id: DChfm.cfg,v 1.19 2015/07/09 08:30:40 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/BI/DChfm.cfg,v 1.19 2015/07/09 08:30:40 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20150611 JGS Automate JDBC connection detection. ############################################################################### # Collect HFM setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Oracle Hyperion Financial Management Information' fam=Cygwin,Unix,Windows pre=BI:DCepm req=?B_REQ_WREQ:OFM:DCwreq rpt=B_IN_USE tgt=${I_OH/C} trg=BI:DCepm,?B_REQ_IREQ:OFM:DCireq,?B_REQ_WREQ:OFM:DCwreq var=not_used # Flow:in_use,B_IN_USE,D_ORACLE_PARENT exe=sdcl { "var ${B_REQ_IREQ/T} = undef "var ${B_REQ_WREQ/T} = undef "if ${AUX.N_DEPTH} " var @{AUX.var} = ('D_ORACLE_PARENT') "elsif ${GRP.EPM.I_OH} " var (${I_OH/T},@{AUX.var}) = \ " (last,cond(${PRF.B_TESTS},'in_use','B_IN_USE')) " "macro derive_mw_home "{if ?testDir('d',${ENV.HYPERION_HOME}) " {var @dir = splitDir(catDir(last)) " call pop(@dir) " if expr('>',scalar(@dir),1) " return catDir(@dir) " } " loop $pth (grep(@{ENV.PATH},'\bepmsystem\d+\b')) " {next !?testDir('d',catDir($pth)) " var @dir = splitDir(last) " while ?$dir = pop(@dir) " {next !match($dir,'^epmsystem\d+$') " break expr('<',scalar(@dir),3) " if compare('eq',$dir[-1],'user_projects') " {call pop(@dir) " return catDir(@dir) " } " } " } " return () "} " "macro is_valid_mw_home "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified Middleware home directory does not exist.' " require isAbsolute($dir),\ " 'The specified Middleware home directory is not an absolute path.' " require testFile('f',catFile($dir,'registry.xml')),\ " 'The specified Middleware home directory does not contain some \ " Oracle WebLogic server related-files. Without a valid directory, the \ " collection will be disabled. Rerun the setup with the correct \ " Middleware home directory.' " var ${AUX.nam} = $nam " return true "} " "run BI:EPMlib() } #------------------------------------------------------------------------------ # Setting definitions for BEGIN-based setup #------------------------------------------------------------------------------ [D_ORACLE_PARENT] typ=D dft=(${ENV.MW_HOME},\ ${ENV.BEA_HOME},\ derive_mw_home()) dsc='Oracle Middleware home' inp='Enter the Oracle Middleware home to be used for data analysis' nam=- ref=is_valid_mw_home('D_ORACLE_PARENT',last) val=F var=exists:set_properties [set_properties] typ=B nam=- exe=sdcl { "var $top = ${D_ORACLE_PARENT} "if ?testDir('d',catDir($top,'user_projects','domains','EPMSystem')) " var ${D_COMMON_DOMAIN_HOME:'Oracle WebLogic Server domain home'} = lastDir() "if findDir($top,'^EPMSystem\d+','fp') " var ${D_ORACLE_HOME:'Oracle home'} = first(last) "if ?testDir('d',catDir($top,'user_projects')) " var ${D_INSTANCE_ROOT:'Instance root directory'} = lastDir() "if findDir($top,'^(jdk\d+|jrockit_\d+)','fp') " var ${D_JAVA_HOME:'Java home'} = first(last) } #------------------------------------------------------------------------------ # Setting definitions for HFM-based setup #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Oracle Hyperion Financial Management information requested?' nam=B_IN_USE var=chk_domain,R_AGE,dsp_extraction,get_connections,T_START_TIME,\ chk_start_time,I_OH [not_used] typ=B dft=false dsc='Is Oracle Hyperion Financial Management information requested?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Oracle Hyperion Financial Management information requested?' inp='Do you want RDA to analyze Oracle Hyperion Financial Management (Y/N)?' var=true:chk_domain,R_AGE,dsp_extraction,get_connections,T_START_TIME,\ chk_start_time,I_OH #------------------------------------------------------------------------------ # Determine the collection approach #------------------------------------------------------------------------------ [chk_domain] typ=D alt=chk_instance dft=${GRP.EPM.D_DOMAIN} dsc='Does EPM contain single domain?' nam=-D_TMP_DOMAIN var=T_SERVERS [chk_instance] typ=D dft=${GRP.EPM.D_INSTANCE_ROOT} dsc='Does EPM contain instance root?' nam=- var=exists:set_ins_properties [set_ins_properties] typ=B nam=- var=true:loop_instances exe=sdcl { "keep %OID "var $flg = false "loop $tgt (@{GRP.EPM.I_ORACLE_INSTANCES}) "{var $dir = $tgt->get_first('D_ORACLE_INSTANCE') " next !?testDir('d',$dir) " var ($ins,$oid) = (basename($dir),$tgt->get_oid) " var ${MOD.${VAR.oid}.D_HOME:"Instance home directory for ${VAR.ins}"} = $dir " var $flg = true " var $OID{$ins} = $oid "} "var ${B_REQ_IREQ:\ " 'Does HFM require Oracle instance request handler execution?'} = true "var ${AUX.dft} = $flg } [loop_instances] typ=L dft=keys(%OID) dsc='Iterate on each instance' nam=-RUN/SDSL.W_INS var=loop:domain_home #------------------------------------------------------------------------------ # Setting definitions for Oracle WebLogic Server #------------------------------------------------------------------------------ [domain_home] typ=D dft=${GRP.EPM.D_DOMAINS}->{${RUN.SDSL.W_INS}} dsc='Oracle WebLogic Server domain home' nam=-D_TMP_DOMAIN var=exists:T_SERVERS #------------------------------------------------------------------------------ # Select the server(s) #------------------------------------------------------------------------------ [T_SERVERS] typ=M bef="Server list for '${T_TMP_DOM}' domain:" def=concat('./WREQ_BI_HFM_',replace($OID{${RUN.SDSL.W_INS}},'^OI_','DOM_')) dft='*' dsc="Server list for the domain associated to ${RUN.SDSL.W_INS}" itm=[@{T_TMP_ITM}] pck=true val=E exe=sdcl { "var ($dir,@itm) = (${CTX.D_TMP_DOMAIN}) "if expr('>',scalar(@dir = splitDir($dir)),1) "{loop $srv (findDir(catDir($dir,'servers'),'^[^\.]+$','n')) " {if ?testDir('d',catDir($dir,'servers',$srv,'logs')) " call push(@itm,$srv,$srv) " } " var ${T_TMP_DOM/T} = $nam = pop(@dir) " var @{T_TMP_ITM/T} = @itm " var ${I_DOMAIN:'Target associated with the domain'} = \ " nvl(findItem('DOM','D_DOMAIN_HOME',getShortPath($dir,true)),\ " defineTarget('DOM',{D_DOMAIN_ROOT=>$top = catNative(@dir,''),\ " T_DOMAIN_NAME=>$nam,\ " T_TITLE=>"Domain ${VAR.nam} (in ${VAR.top})"})) " var ${T_TOP_FOCUS:\ " 'Focus areas for Oracle WebLogic Server Middleware collection'} = \ " 'Generic' " var ${T_DOM_FOCUS:\ " 'Focus areas for Oracle WebLogic Server domain collection'} = \ " 'BI_HFM,ExtSnmCfg,NodDomCfg,NodDomLog,SrvErr' " var ${CTX.B_REQ_WREQ:\ " 'Does HFM require Oracle WebLogic Request Handler collection?'} = true "} } #------------------------------------------------------------------------------ # Common settings #------------------------------------------------------------------------------ [R_AGE] typ=N dft=3 dsc='Age limit (in days) of the log files to be collected' err='The number of days must be a positive number' inp='Enter the age limit (in days) for the log files to be collected for \ Hyperion Financial Management' lvl=6 ref='R[0,[' val=F [dsp_extraction] typ=C dsc='Announce the database connection extraction' inp="Retrieving defined Hyperion database connections ...\n" vis=0 [get_connections] typ=B nam=- var=true:B_DB:\ no_connections exe=sdcl { "keep @con "if !?$top = ${D_ORACLE_PARENT} "{var $req = ${GRP.EPM.I_OH} " var $ins = $req->get_first('I_MW_HOME') " var $top = $ins->get_prime('D_MW_HOME') "} "if ?testDir('d',catDir($top,'user_projects','epmsystem1','bin')) "{if ?testFile(cond(isWindows(),'f',\ " isCygwin(), 'f',\ " 'fx'),\ " catFile(lastTestDir(),${AS.BAT:'epmsys_registry'})) " {var $fil = lastTestFile() " var $ver = get_epm_version(${GRP.EPM.D_HOME:\ " ${ENV.EPM_ORACLE_HOME:\ " ${ENV.HYPERION_HOME:''}}}) " if and(compare('SAME',$ver,'11.1.2.2'),compare('OLDER',$ver,'11.1.2.2.300')) " {var $epm = createTemp('EPMPWD','.tmp',false) " call derivePassword('host','BI:EPM','epmsys_registry','EPM_REGISTRY') " call writeTempPassword('EPMPWD',"%s\012",'host','BI:EPM','epmsys_registry',\ " 'Enter Shared Services database password:','') " call closeTemp('EPMPWD') " var ${AUX.dft} = @con = \ " filter_db_connections(extract_db_connections($fil,$epm),\ 'FINANCIAL_MANAGEMENT_PRODUCT') " call unlinkTemp('EPMPWD') " } " else " var ${AUX.dft} = @con = \ " filter_db_connections(extract_db_connections($fil),\ 'FINANCIAL_MANAGEMENT_PRODUCT') " } "} } [no_connections] typ=C dsc='Report that the database collection will be skipped' inp="Warning: Oracle Hyperion Financial Management has not been configured in \ this installation or it was not possible to retrieve connection values \ from the Hyperion registry.\012 Database collection will be skipped." vis=0 [B_DB] typ=B dft=true dsc='Do you want to collect database information?' inp='Do you want to collect database information (Y/N)?' var=true:I_DB,B_ANALYZE [I_DB] typ=I cls='DQ' dft=nvl(findItem('DQ','T_TITLE',concat('Using ',$con->{'usr'},\ ' for Financial Management')),\ ${SET.DB.DB.I_DB}) dsc='Database to analyze' vis=false exe=sdcl { "var $con = pop(@con) "var ${RUN.CLASS.DQ.T_TITLE} = \ " concat('Using ',$con->{'usr'},' for Financial Management') "var ${RUN.CLASS.DQ.T_TYPE} = 'JDBC' "var ${RUN.CLASS.DQ.T_USER} = $con->{'usr'} "var ${RUN.CLASS.DQ.T_SOURCE} = concat($con->{'drv'},'|',$con->{'url'}) "var ${RUN.CLASS.DQ.B_LOCAL} = false "var ${RUN.CLASS.DQ.B_SYSDBA} = false "var ${RUN.CLASS.DQ.W_CLASS} = 'DQ' } [B_ANALYZE] typ=B dft=true dsc='Specific application analysis to be run' inp='Do you want to collect data analysis for a specific application (Y/N)?' var=true:T_APPNAME,T_START_YEAR,T_END_YEAR [T_APPNAME] typ=T dsc='Application to run data analysis on' inp='Enter the application name on which to run data analysis' [T_START_YEAR] typ=T dsc='Start year for running the data analysis' err='Enter four digits for the start year' inp='Enter the start year for performing the data analysis' ref='^[1-2]\d{3}$' val=E [T_END_YEAR] typ=T dsc='End year for running the data analysis' err='Enter four digits for the end year' inp='Enter the end year for performing the data analysis' ref='^[1-2]\d{3}$' val=E [T_START_TIME] typ=T clr='-' dft='' dsc='Start time for task audit and HsvEventLog collections' err='Start time format should be DD-Mon-YYYY_HH24:MI' hlp='If you want to collect task audit and HsvEventLog information for a \ specific time interval, enter the start and end times. Otherwise, RDA \ collects the information for the last 14 days.' # stopwords HsvEventLog inp="Enter the time, when you want to start the collection of task audit and \ HsvEventLog information. When a dash (${AUX.clr}) is specified as input, \ RDA considers last 14 days. Start time should be in DD-Mon-YYYY_HH24:MI \ format." ref='^([0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d)?$' val=E [chk_start_time] typ=B dft=match(${T_START_TIME},'^[0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d$') dsc='Check if the end time must be specified' nam=- var=false:end_time:\ T_END_TIME [end_time] typ=T dft='' dsc='End time for task audit and HsvEventLog collections' nam=T_END_TIME [T_END_TIME] typ=T clr='-' dft='' # stopwords HsvEventLog dsc='End time for task audit and HsvEventLog collections' err='End time format should be DD-Mon-YYYY_HH24:MI' inp="Enter the time, when you want to end the collection of task audit and \ HsvEventLog information. When a dash (${AUX.clr}) is specified as input, \ current time is taken as end time. End time should be in \ DD-Mon-YYYY_HH24:MI format." ref='^([0-3]\d\-[A-Za-z]{3}\-[1-2]\d{3}_[0-2]\d:[0-5]\d)?$' val=E [I_OH] typ=I cls='OH' dsc='Target associated with the EPM home' vis=false