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.
ammrita said
superb blog
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.
Pavan DBA said
hi adi, u r right. a typo error there. i corrected it now. thanks for highlighting it to me.
chandu said
Hi Pavan,
I am looking for online training,is there any facility in your Institute.Please let me know.
Thanks
Chandu
8698650638
Pavan DBA said
yes it is available. plz contact corporate@dbatalent.com
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
Pavan DBA said
yes. it is possible to recover. while recovering the database, u need to specify the backup piece name.
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 ?
Pavan Kumar said
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
Rashmi said
Gm Pavan,
Can you please elaborate on kernal.Semaphore paramater,set while installing oracle on linux.
Thanks.
Pavan Kumar said
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.
Rashmi said
wow !! great explanation.Thanks a lot Pavan..Have a gud day.
Pavan Kumar said
you are welcome
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.
Pavan Kumar said
Hi Rashmi, As per my knowledge, you can start database without pfile only when you are usig spfile.
I mean database can be either started using pfile or spfile. Without any of these files, its not possible to start the database.
Rashmi said
ok..Thanks
Rashmi said
Thanks for the detail explanation.
Pavan Kumar said
you are welcome Rashmi….
Amber Jadhav said
This was asked to me in an interview and I answered it correctly. Thanks to You :-).
Pavan Kumar said
Its great to hear that my posted helped you
Aliyar Sahib said
Good explanation.. Thank you!!
Pavan Kumar said
welcome Sir…. thank you very much for commenting