I was working on an integration between Orabbix and Rman catalog, in the next release you will see this integration and how it’s work.
Anyway all my backup with rman was used to have this problem:
RMAN-08137: WARNING: archive log not deleted as it is still needed
This is not really a “problem” it’s just a warning, but i don’t like have all my rc_rman_status table of the rman catalog full of this warning.
To solve this i’ve changed my rman script in this way:

run {
# Andrea Dalle Vacche
# TAPE BACKUP ver. 1.3 27/05/2010
#
allocate channel t1 type ‘SBT_TAPE’;
backup format ‘ARC_%n_T%T_t%t_s%s_p%p’ archivelog all;
#
# TO SOLVE RMAN-08137: WARNING: archive log not deleted as it is still needed
#
DELETE ARCHIVELOG UNTIL TIME ‘sysdate – 30/(24*60)’ BACKED UP 1 TIMES TO DEVICE TYPE SBT_TAPE;
release channel t1;
}
exit;

With this script Rman delete the archivelog that are older than 30 minutes and backed up at least one time on tape.

This requirement was born from this query:

SELECT ‘ DB NAME->’
|| db_name
|| ‘- ROW TYPE->’
|| row_type
|| ‘- START TIME->’
|| to_char(start_time, ‘Dy DD-Mon-YYYY HH24:MI:SS’)
|| ‘- END TIME->’
|| to_char(end_time, ‘Dy DD-Mon-YYYY HH24:MI:SS’)
|| ‘- MBYTES PROCESSED->’
|| mbytes_processed
|| ‘- OBJECT TYPE->’
|| object_type
|| ‘- STATUS->’
|| status
|| ‘- OUTPUT DEVICE->’
|| output_device_type
|| ‘- INPUT MB->’
|| input_bytes / 1048576
|| ‘- OUT MB’
|| output_bytes / 1048576
FROM rc_rman_status
WHERE start_time > SYSDATE – 1
AND (status LIKE ‘%FAILED%’ OR status LIKE ‘%ERROR%’)
ORDER BY end_time;

This is the query that i run on catalog to retrieve all the error on rman but i don’t like to have just ‘%FAILED%’ or ‘%ERROR%’ because it’s important keep monitored also ‘%WARNING%’ that sometime help a lot in our work.

Obviously you need use this statement:

DELETE ARCHIVELOG UNTIL TIME ‘sysdate – 30/(24*60)’ BACKED UP 1 TIMES TO DEVICE TYPE SBT_TAPE;

in all backup that you do also on full backup.

e.g. like this one:

run {
# Andrea Dalle Vacche
# TAPE BACKUP ver. 1.3 27/05/2010
#
allocate channel t1 type ‘SBT_TAPE’;
backup full format ‘ONL_FULL_%n_T%T_t%t_s%s_p%p’ database plus archivelog;
#
# TO SOLVE RMAN-08137: WARNING: archive log not deleted as it is still needed
#
DELETE ARCHIVELOG UNTIL TIME ‘sysdate – 30/(24*60)’ BACKED UP 1 TIMES TO DEVICE TYPE SBT_TAPE;
delete noprompt force obsolete;
release channel t1;
}
exit;

Tags: , , , ,

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this. To know all the policy detais click here.

Close