Pavan DBA's Blog

The DBA Knowledge Store

Archive for the ‘RMAN’ Category

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 obsolete may or may not be found. Something expired 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.

Posted in RMAN | 15 Comments »

Faster incremental backups in 10g RMAN

Posted by Pavan DBA on November 3, 2009

With the introduction of CTWR (change track writer) background process, 10g RMAN made the incremental backups faster than before.

CTWR background process will be started when we enable change tracking feature in database using following command
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

An OMF file will be created in DB_CREATE_FILE_DEST location with the initial size of 10M and will grow in 10M of size. This file will record the information of the blocks which are getting changed including their block SCN. We can use already existing file also as change tracker file as follows:
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE ‘/u01/oradata/MYSID/rman_change_track.f’ REUSE;

Note: Enabling change tracking may cause overhead in performance of database

The following command can be used to disable change tracking:
ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

To know the status of change tracking feature, use:
SELECT status FROM v$block_change_tracking;

Posted in RMAN | 4 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 1,477 other followers