Archive Log Deletion Script in SAP & Linux Environment with Oracle
Dear All,
Need your help on the below:
Application: SAP R/3
Primary: 2 Node RAC
Standby: Single Instance
Oracle: 10.2.0.2.0
OS: RHEL 4 (Update 5)
We need to create a shell script to delete the archive log files from Archive Destination {/oracle/SID/oraarch} based on two conditions:
1. The Archive log files must be shipped and applied to the Local/Remote Standby. {Can be checked by "select max(sequence#) from v$archived_log where applied='YES'"}
2. The Archive log files must be successfully backed up by brarchive utility.
Brarchive utility creates a logfile "/oracle/SID/saparch/archSID.log" which has information about the backed up archive log files.
The script should delete the archive log files or move to some location only if both the conditions above are TRUE.
Regards,
Paresh