delete expired archive logs

If archive logs are deleted by OS level, these archive logs information will be still in controlfile. So to remove these information from controlfile, you need to crosscheck archive logs and then execute delete expired archive logs.

Note: this command will not delete any archive logs. it will only check archive logs are not available those will be marked as expired in controlfile. So you only can remove the information from controlfile.

rman target /
run
{
allocate channel d1 type disk;
crosscheck archivelogs;
delete noprompt expired archivelog all;
}
exit;
Advertisements

About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in rman. Bookmark the permalink.

2 Responses to delete expired archive logs

  1. Dmitry says:

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found “identifier”: expecting one of: “archivelog, backup, backuppiece, backupset, copy, controlfilecopy, datafilecopy, proxy”
    RMAN-01008: the bad identifier was: archivelogs
    RMAN-01007: at line 4 column 12 file: standard input

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found “;”: expecting one of: “allocate, alter, backup, beginline, blockrecover, catalog, change, connect, copy, convert, create, crosscheck, configure, duplicate, debug, delete, drop, exit, endinline, flashback, host, {, library, list, mount, open, print, quit, recover, register, release, replace, report, renormalize, reset, restore, resync, rman, run, rpctest, set, setlimit, sql, switch, spool, startup, shutdown, send, show, test, transport, upgrade, unregister, validate”
    RMAN-01007: at line 4 column 23 file: standard input

    • Sher khan says:

      Hi,

      Thanks for the contact.

      If delete the archived logs at OS level the information will still be in the controlfile. So to remove the information from the controlfile, you needs first to crosscheck the archive logs and 2nd step is to delete expired archive log.

      Please share your rman commands and what is your desired result.

      Thanks,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s