#!/bin/sh
# Setting Oracle SID
ORACLE_SID=SID
export ORACLE_SID
#Setting Oracle Home
ORACLE_HOME=Oracle_Home
export ORACLE_HOME
# To Print Start Time
startTime=`date`
print
print "Starting $startTime"
# To delete archivelog files older than 3 days.
rman target/ << EOF
crosscheck archivelog all;
delete noprompt archivelog all completed before 'sysdate-3';
crosscheck archivelog all;
exit;
EOF
# To Print End Time
endTime=`date`
print "Complete $endTime"
No comments:
Post a Comment