Created by
Ricardo Chu
| #! /bin/bash
#
# date: january 2016
# author: ricardo chu
# purpose: create new partition for ASH data.
# https://jhdba.wordpress.com/2014/07/09/tidying-up-sysaux-removing-old-snapshots-which-you-didnt-know-existed/
#
source /oracle/.bash_profile
LOGDATE=$(date +%m%d%Y)
for LOGSID in {inst1,inst2,inst3,inst4,inst5}
do
export ORACLE_SID=${LOGSID}
ORAENV_ASK=NO
source oraenv
echo 'Connecting to instance ' ${ORACLE_SID}
$ORACLE_HOME/bin/sqlplus -S "/ as sysdba" <<EOF
--set heading off feedback off
set pagesize 0
set linesize 1000
set serverout on
set echo on
select instance_name from v\$instance;
select sysdate from dual;
alter session set "_swrf_test_action" = 72;
select sysdate from dual;
commit;
quit;
EOF
done
|