Pythian has openings for MySQL and MS SQL Server DBAs in each of our offices in Ottawa, Canada; Boston, USA; Dubai, UAE; and Hyderabad, India. If you are a MySQL and/or SQL Server DBA and would like to evaluate this opportunity, please send us your résumé with an introductory paragraph to hr@pythian.com.

‘plus archivelog’ and RMAN optimization

By sheidaei May 16th, 2007 at 7:30 pm
Posted in Group Blog PostsOracle

I just want to raise a warning flag for DBAs using RMAN and flash recovery area in Oracle 10g.

An RMAN script is usually something like:

backup database plus archivelog

However, the behavior of plus archivelog depends on whether optimization is enabled or disabled in RMAN. The RMAN reference document says that when the plus archivelog command is part of a backup script, RMAN:

  1. runs an ALTER SYSTEM ARCHIVE LOG CURRENT statement.
  2. runs the BACKUP ARCHIVELOG ALL command. Note that if backup optimization is enabled, RMAN only backs up logs that have not yet been backed up.
  3. backs up the files specified in the BACKUP command.
  4. runs an ALTER SYSTEM ARCHIVE LOG CURRENT statement.
  5. backs up any remaining archived redo logs

As the result, if backup optimization is off (which it is by default in RMAN), plus archivelogs will backup all archivelogs. If the archivelog destination is a flash recovery area, your database may keep very old archivelogs (assuming space is not an issue). Thus, the backup size will gradually grow and fill up the flash recovery area, since each backup includes all archivelogs in the flash recovery area.

The lesson is, to avoid backing up archivelogs that have already been backed up when using plus archivelog in a backup script, make sure you enable RMAN optimization.

You can also find more details at http://oradbatips.blogspot.com/. Hope this helps.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Slashdot
  • Google
  • del.icio.us
  • Facebook
  • bodytext
  • Technorati
  • TwitThis
  • Reddit
  • Spurl
  • De.lirio.us
  • Furl
  • blogmarks
  • Ma.gnolia
  • E-mail this story to a friend!

One Response to “‘plus archivelog’ and RMAN optimization”

  1. Alexander Fatkulin Says:

    “The lesson is, to avoid backing up archivelogs that have already been backed up when using plus archivelog in a backup script, make sure you enable RMAN optimization.”

    The more precise thing is to specify “not backed up 1 times”.

    Backup optimization is “all or nothing” - it can (and will) affect other things.

Leave a Reply

Filling out the following captcha not only allows us to cut down on automated blogspam but also helps digitize books. Please feel free to send comments on this approach directly to Paul at vallee@pythian.com.

NOTE: After submitting your comment, verify that it is added to the blog. New comments will be marked as "waiting for moderation" (we only moderate for spam). If the level of spam is as low as we hope, we will bypass this step.