22 April, 2017

Script to gather the Apache, WLS and Apps log files

#####################################################################################
#### Start of script for EBS 12.1.x
#####################################################################################
(
# pick up files which have been modified
HowManyDaysOld=3
echo "Picking up files which have been modified in the last ${HowManyDaysOld} days"
set -x
find $LOG_HOME/ora/10.1.3 -type f -mtime -${HowManyDaysOld} > m.tmp
find $LOG_HOME/appl/admin -type f -mtime -${HowManyDaysOld} >> m.tmp
find $LOG_HOME/appl/rgf -type f -mtime -${HowManyDaysOld} >> m.tmp
zip -r AppsLogFiles_`hostname`_`date '+%m%d%y'`.zip -@ < m.tmp
rm m.tmp
) 2>&1 | tee mzLogZip.out
#####################################################################################
#### End of script
#####################################################################################

18 April, 2017

Script to List Materialized Views Dependent on Specific Tables

This script will report on any materialized views that are dependent on a specific table.

REM LOCATION:   Object Management\Materialized Views and Materialized View Logs
REM FUNCTION:   Find dependent tables for a given MView
REM TESTED ON:  10.2.0.3, 11.1.0.6
REM PLATFORM:   non-specific
REM REQUIRES:   dbms_metadata
REM
REM  This is a part of the Knowledge Xpert for Oracle Administration library.
REM  Copyright (C) 2008 Quest Software
REM  All rights reserved.
REM
REM ******************** Knowledge Xpert for Oracle Administration ********************
UNDEF ENTER_OWNER_NAME
UNDEF ENTER_TABLE_NAME
SET serveroutput on
SET feedback off

DECLARE
   v_output   VARCHAR2 (2000);
   v_owner    VARCHAR2 (30);
   v_table    VARCHAR2 (30);
BEGIN
   v_owner := UPPER ('&&ENTER_OWNER_NAME');
   v_table := UPPER ('&&ENTER_TABLE_NAME');
   dbms_mview.get_mv_dependencies (v_owner || '.' || v_table, v_output);
   DBMS_OUTPUT.put_line (CHR (13));
   DBMS_OUTPUT.put_line
      ('Materialized Views Dependent on table      &&ENTER_OWNER_NAME..&&ENTER_TABLE_NAME'
      );
   DBMS_OUTPUT.put_line (CHR (13));
   DBMS_OUTPUT.put_line (v_output);
END;
/
 
 

Sample Output

 

Materialized Views Dependent on table      SCOTT.EMP

"SCOTT"."MV_TEST","SCOTT"."MV_EMP" 
 
 
 
or
 
 
 
select * from dba_dependencies where referenced_name='MSC_TRADING_PARTNERS' and TYPE='MATERIALIZED VIEW'; 

 

OEM Agent Installation

./agentDeploy.sh AGENT_BASE_DIR=/u001/oracle/product/agent13c OMS_HOST=oem-dev.xxx.com EM_UPLOAD_PORT=1159 AGENT_REGISTRATION_PASSWORD=*****...