Pavan DBA's Blog

The DBA Knowledge Store

Delete obsolete versus delete expired

Posted by Pavan DBA on December 31, 2009


Speaking of RMAN, the DELETE command obviously deletes what you tell it to, but what is the difference between DELETE OBSOLETE and DELETE EXPIRED? If a backup item (piece or set) is expired, isn’t it also obsolete? Or, if obsolete, is it also expired? One way to look at the difference is this: not needed versus not found. Something expired may or may not be found. Something obsolete may or may not be needed.
What does DELETE do?
DELETE removes the physical files from the backup media, deletes the record of the backup from the recovery catalog (if RMAN is connected to a recovery catalog), and updates the records of these backups in the control file to status DELETED.
In the obsolete case, what helps to clarify the difference between OBSOLETE and EXPIRED is the retention policy. If a backup item is no longer needed for recovery – because it is older than the retention policy – then it is obsolete. What does DELETE OBSOLETE do?

The RMAN DELETE command supports an OBSOLETE option, which deletes backups that are obsolete, that is, no longer needed to satisfy specified recoverability requirements. You can delete files obsolete according to the configured default retention policy, or another retention policy that you specify as an option to the DELETE OBSOLETE command. As with other forms of the DELETE command, the files deleted are removed from backup media, deleted from the recovery catalog, and marked as DELETED in the control file.

The next clarification concerns the EXPIRED status. How does an object become expired?
When the CROSSCHECK command is used to determine whether backups recorded in the repository still exist on disk or tape, if RMAN cannot locate the backups, then it updates their records in the RMAN repository to EXPIRED status. You can then use the DELETE EXPIRED command to remove records of expired backups from the RMAN repository. If the expired files still exist, then the DELETE EXPIRED command terminates with an error.

As you can, something will be deleted when using the DELETE command. It is either a physical item, or metadata. Same thing, but different.

Advertisements

22 Responses to “Delete obsolete versus delete expired”

  1. ammrita said

    superb blog

  2. adi said

    Something obsolete may or may not be found. Something expired may or may not be needed.

    this statement is confusing me. i believe, below statement is the right statement.

    Something expired may or may not be found. Something obsolete may or may not be needed.

    Correct me if I am wrong.

    Thanks,
    Adi.

  3. chandu said

    Hi Pavan,

    I am looking for online training,is there any facility in your Institute.Please let me know.

    Thanks
    Chandu
    8698650638

  4. mani said

    Hi Pavan, what if a backup is obselete but not expired, so is it possible that i can recover the DB in case i am having all backup of archive logs. if yes how if no why? thanks in advance

  5. Rashmi said

    Hi Pavan,

    I am looking for a new dba job ,i dont have any exposure on RAC, but i have exp with other oracle features like Dataguard, Rman, Db administration.Will it be beneficial for me to upgrade on RAC by joining some institutes without any practical knowledge of it as i dont have any rac projects in my current organisation,will it help me to crack interviews ?

    • Hi Rashmi, Yes surely RAC knowledge will help you alot and now a days most of the companies are looking for DBA’s with RAC knowledge. So, I believe its a good idea to do course.

      If you wish, you can join new RAC batch starting in KANNA TECHNOLOGIES from 29th dec. for more details contact 040-40036087 / 8008500064

  6. Rashmi said

    Gm Pavan,

    Can you please elaborate on kernal.Semaphore paramater,set while installing oracle on linux.
    Thanks.

    • In programming, especially in Unix systems, semaphores are a technique for coordinating or synchronizing activities in which multiple processes compete for the same operating system resources. A semaphore is a value in a designated place in operating system (or kernel) storage that each process can check and then change. Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again. Semaphores can be binary (0 or 1) or can have additional values. Typically, a process using semaphores checks the value and then, if it using the resource, changes the value to reflect this so that subsequent semaphore users will know to wait.

      Semaphores are commonly use for two purposes: to share a common memory space and to share access to files. Semaphores are one of the techniques for interprocess communication (IPC). The C programming language provides a set of interfaces or “functions” for managing semaphores.

  7. Rashmi said

    Hi Pavan,

    How is it possible to start db without a pfile ,can u plz let me know if u are aware of this scenario.

    Thanks.

  8. Rashmi said

    Thanks for the detail explanation.

  9. Amber Jadhav said

    This was asked to me in an interview and I answered it correctly. Thanks to You :-).

  10. Aliyar Sahib said

    Good explanation.. Thank you!!

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

 
%d bloggers like this: