Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Monday, March 29, 2010

Avoid RMAN-08137

I used the below script to delete the archive logs older than 30 mins so that the recent archivelogs will be available to the standby and over come the below error messages:

RMAN-08137: WARNING: archive log not deleted as it is still needed


RUN{
ALLOCATE CHANNEL ch01 TYPE DISK FORMAT '/u0001/${ORACLE_SID}/u01/%d_${BACKUP_TYPE}_%M_%D_%Y_%s_%p_%t';

BACKUP
TAG 'arch_${TODAY}_${TIME}'
FILESPERSET ${ARCHIVE_PERSET}
ARCHIVELOG ALL;
DELETE force noprompt archivelog until time '(sysdate -1/30)' backed up 1 times to device type disk;
RELEASE CHANNEL ch01;

}
EOF

No comments: