Book Review: RMAN Recipes for Oracle Database 11g : A Problem-Solution Approach

30 11 2009

Useful for Oracle 10g and Above, with Carefully Constructed, Easily Followed Solutions, February 14, 2009

About six months ago I read the book “Oracle Database 10g RMAN Backup and Recovery”. While I enjoyed reading that book, I found that the book was difficult to use when practicing various backup, recovery, and cloning procedures which were outlined in the book. The reward for flipping through what must have been 50 to 100 pages in order to find everything needed for a practice procedure seemed to be the appearance of unexplained ORA errors, but maybe it was just my inability to follow the directions. In a panic database down situation, should it occur, the “Oracle Database 10g RMAN Backup and Recovery” book will remain on the shelf. So, I started looking for a different resource.

I initially discounted the “RMAN Recipes for Oracle Database 11g” book as irrelevant primarily as I currently use Oracle 10g R2 in production, and did not wish to be confused by a book using 11g specific RMAN syntax without acknowledging that a slightly different syntax is required for Oracle 10g (or 9i, for that matter). In addition to output captures showing that Oracle 11.1.0.x (beta) had been used, other output indicated that Oracle 10.2.0.x was used to demonstrate various commands in the book. The authors made a significant effort to indicate which features are available, and when necessary the alternate syntax in 11g, 10g, and versions prior to 10g. Paraphrasing a couple sections of the book: “Prior to Oracle 10g, it was necessary to set ARCHIVE_LOG_START ([SIC] – LOG_ARCHIVE_START) to TRUE in order to enable automatic archiving of redo logs.” “RMAN does not back up locally managed temporary tablespace tempfiles – starting with Oracle 10g Oracle will recreate the tempfiles when the database is opened.” “Beginning with Oracle database 10g, it is possible to restore a backup from a previous incarnation and recover through a resetlogs command.” “An archived redo log deletion policy is only available starting in Oracle 11g.” “In 11g it is possible to use Active Database Duplication to duplicate a database without any prior backups of the source database.” The extra effort to identify version specific features allows the book to be used successfully with Oracle 11g, 10g, and possibly 9i.

The title of this book is the second reason why I initially discounted the book as unusable. The title implied that the book’s layout was one of “Perform steps X, Y, and Z in order, and don’t bother wondering why it works – essentially, do as I say or your database will not rise when placed into the oven.” That perception of the book’s contents was far from reality. The basic book structure is: Chapter introduction, very brief problem description, well organized step by step problem solution (typically contained on a single page, with relevant related information needed by the solution within 5 pages of the solution), detailed description of how and why each step should be performed as well as side notes and cautionary advice, second very brief problem description, etc. The first half of the book describes how to backup the database, and the second half describes how to recover the database as well as how to set up for special configurations. Roughly 35 pages near the end of the book describe how to configure three different media management products. Most of the book focuses on the command line interface for RMAN, which in my opinion is the correct approach as extensive coverage of backups performed with the Enterprise Manager Database Control would have been a waste of book pages – the nagging question of what to do when the GUI breaks was avoided in this book. The “RMAN Recipes for Oracle Database 11g” book, while not perfect, is organized such that it is not necessary to dig through 50 to 100 pages in order to implement a solution listed in the table of contents, should the book be needed for future reference purposes.

As I did with the “Oracle Database 10g RMAN Backup and Recovery” book, I tested a couple of the backup, recovery, and cloning solutions outlined in this book using Oracle Standard Edition on a Windows platform.

  • Repeated backups with and without a recovery catalog, with and without backing up archived redo logs, with and without automatic control file and spfile auto backups, all with a flash recovery area were performed. All worked as described in the book without issue.
  • Restore of the control file without a recovery catalog – worked as described in the book, the fact that ALTER DATABASE OPEN RESETLOGS; must be executed when a control file is restored from backup was repeatedly emphasized throughout the book.
  • Restore and recovery of a deleted datafile – worked as described in the book.
  • FLASHBACK DATABASE did not work as it is not supported on the Standard Edition of Oracle. Block level recovery also would have failed as it is not supported on Standard Edition. FLASHBACK TABLE TO BEFORE DROP did work without problem. See the Oracle documentation “Oracle Database Licensing Information – Oracle Database Editions” for the list of unsupported features.
  • Recovering to a previous incarnation of the database did not work as expected (it is possible that I missed a step). When testing, be careful with issuing RESET DATABASE INCARNATION 1; as this could lead to complications when later testing other restore and recovery scenarios – dealing with “ORA-00600: internal error code, arguments: [kcvsor_current_inc_rdfail]” is not covered, and may be an indication that the database incarnation needs to be reset to a different value after recovering the control file, but before attempting to recover.
  • Dropping a table and recovering to a past time using the UNTIL TIME syntax worked as described in the book.
  • Cloning a database worked on the second try, after modifying the author’s init.ora to include a line for SGA_TARGET, and there was no sense of frustration trying to locate all of the items to be set as was the case with the “Oracle Database 10g RMAN Backup and Recovery” book.
  • Setting up the production database to permit scheduled cloning of the database worked without problem, although it might have been helpful to stress to the readers that the later addition of data files to the production database will likely require re-executing the RUN block with CONFIGURE AUXNAME so that auxnames are specified for the new datafiles.

General comments about the book, as it was read from cover to cover:

  • The book’s errata page on Apress’ website identifies a number of typos in the book, which may or may not cause problems for people using the book in a high stress situation.
  • The first couple chapters contain many paragraphs with odd sentence structure and strange synonyms, making it difficult in some cases to easily understand the authors’ advice.
  • Page 41 states “Remember to recycle the database after editing the [parameter] file for the changes to take effect.” This is after page 29 states “Stopping and restarting your database in quick succession is known colloquially in the DBA world as bouncing your database.” I have heard of bouncing the database, but I am guessing that recycling the database is what one would do after corrupting the spfile after editing it with a text editor, or what one might do when the database crashes and RMAN cannot recover the database.
  • Page 55 advises against placing the archived redo logs in the flash recovery area, yet page 17, under the heading “Best Practices” states that Oracle recommends using the flash recovery area to store the entire set of backup and recovery related files. “Oracle recommends” is stated a few too many times in the first couple chapters.
  • Paraphrasing: “A backup taken while the database is online or in the mount state (???) is considered to be an inconsistent backup. An inconsistent backup always needs recovery after a restore. A noarchive redo log mode database when backed up with RMAN must be mounted.” This begs the question, how does one create a consistent backup of a database in noarchive redo log mode when the database must be mounted – I think that “mount” is a typo in the book.
  • People reading the book cover to cover will find that the book frequently repeats information throughout the book, but that repetition proves to be quite valuable when using the book as a reference during a backup or recovery situation, as in most cases all need information will be within five pages, or a reference will be made to see Recipe x-y should problem z occur.
  • The book does not indicate what features described in the book require an Enterprise Edition license, nor what features require additional licenses beyond an Enterprise Edition license (this seems to happen in several books by different authors). For example, in Recipe 7-10 Performing Incremental Backups, the authors fail to mention how incremental backups in the Standard Edition differs from incremental backups in the Enterprise Edition.
  • The method of freeing space in the flash recovery area on page 96 appears to be a bit extreme (like launching a grenade at an ant hill), although better approaches are provided later. Page 246 seems to indicate that the method on page 96 might not be as extreme as it first appears.
  • The book shows how to schedule a backup script using either Linux/Unix cron or the Windows task scheduler, with included scripts for both Unix and Windows.
  • The recipe showing how to duplicate (clone) a production database on a single host is very well constructed, showing how to create the backup of the production database, what to enter in the listener.ora, the initialization parameters to specify in the clone database’s init.ora file, starting the clone in NOMOUNT mode using SQL*Plus, and performing the duplication in RMAN. Unfortunately, the authors failed to specify a value for SGA_TARGET in the suggested init.ora file parameters, resulting in “ORA-04031: unable to allocate 100 bytes of shared memory” when RMAN attempted to start cloning the production database. Even with this minor omission, the directions are far easier to follow than directions in other resources describing how to accomplish the same task. It would have been helpful had the directions for cloning the database included a side note stating “On the Windows platform, use ORADIM -NEW -SID TEST1 to create a service for the clone instance.”
  • The book provides a recipe describing how to set up the production database to permit cloning the database on a scheduled basis. A portion of the script closely resembled a similar script in the Oracle 10g R2 documentation “Backup and Recover Advanced User’s Guide”.
  • The book provides a helpful section describing how to respond to various RMAN error messages.
  • The book demonstrates flashback versions queries, flashback table, flashback drop, flashback database.

Overall, I recommend this book to people using Oracle 10g or 11g in production environments which require backup and recovery to be accomplished correctly on the first attempt.




Get every new post delivered to your Inbox.

Join 137 other followers

%d bloggers like this: