Apress

RMAN Recipes for Oracle Database 11g

A Problem-Solution Approach

By Sam R. Alapati , Darl Kuhn , Arup Nanda

RMAN Recipes for Oracle Database 11g Cover Image

Oracle experts Darl Kuhn, Sam Alapati, and Arup Nanda have come together in this book to show you the power of Recovery Manager, or RMAN, which is Oracle's backup and recovery tool of choice.

Full Description

  • ISBN13: 978-1-59059-851-1
  • 670 Pages
  • User Level: Beginner to Advanced
  • Publication Date: August 29, 2007
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $59.99
  • eBook Price: $41.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

It’s sometimes said that the true job of an Oracle database administrator can be summed up in one, essential skill: to be able to recover your database.

There’s much wisdom in that statement. Of all the things you are responsible for as a database administrator, nothing is more important than the data itself. Like it or not, the fearsome responsibility of protecting your organization's most critical data falls squarely upon your shoulders:

 

  • Lose that data and your company could fail.
  • Lose that data and you could be out of a job.

 

Scared? You should be. But there's help. You are not alone. Oracle experts Darl Kuhn, Sam Alapati, and Arup Nanda have come together in this book to show you the power of Recovery Manager, or RMAN, which is Oracle's backup and recovery tool of choice. RMAN Recipes for Oracle Database 11g helps you take advantage of all that RMAN has to offer by providing easy-to-understand solutions to business-critical backup and recovery operations. This handy guide:

 

  • Demystifies the steps required to protect your business data
  • Provides ready-made and step-by-step solutions to simple and complex backup, restore, and recovery operations
  • Is task-oriented, making it easy for you to find the solution to pressing backup and recovery problems
  • Respects your time by providing example-based solutions, not endless reading material

 

When the pressure’s on, you don't have time for long discussions of theory. This book gets right to the point with quick and easy-to-read, step-by-step solutions that can help you backup and recover your data with confidence.

What you’ll learn

Oracle Database experts Darl Kuhn, Sam Alapati, and Arup Nanda show you how to

 

  • Reliably back up and recover your database using Oracle's Recovery Manager
  • Utilize new Oracle Database 11g features such as the Data Recovery Advisor
  • Let Oracle Database manage your backup files via the Flash Recovery Area
  • Automate backup and recovery tasks by writing scripts
  • Troubleshoot RMAN problems and optimize RMAN performance
  • Interface with a Media Management Layer to manage your backup tape library
  • Recover from the loss of a control file, loss of an online redo log, and other (hopefully!) unusual situations

Who this book is for

Oracle database administrators responsible for database backup and recovery operations.

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 11:

Please see the Author-submitted errata below.
Author Comment:

Chapter 1, Page 11, there is no "shutdown force" command
-----------------------------
Chapter 1, Page 11, 6th bullet on the page, should say "Any uncommitted changes are not rolled back automatically"

On page 24-25:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 2, Page 24, members of oinstall OS group cannot start/stop an instance
-----------------------------
Chapter 2, Page 25, in "How It Works", that should say "RMAN uses OS authentication and password files to allow privileged users connect to the database" (not "the rman utility")
-----------------------------
Chapter 2, Page 25, in "Explaining OS Authentication", in 11g, the groups are dba and oper, oinstall is for installing/patching the software only.

On page 27:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 2, Page 27, typo recipe 2-2, it says "refer to recipe 1-2 for details..." that should say "refer to recipe 2-1 for details..."

On page 29:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 2, Page 29, you can connect as sysdba or as sysoper; full dba privileges are not needed.

On page 31-32:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 2, Page 31, the parameter is "log_archive_start", not "archive_log_start".
-----------------------------
Chapter 2, Page 32, clarification in the Solution section: ".. or a user with sydba privilege" is better than " .. or a username/password that is in the password file" because names of users with oper privilege only are in the password file too.

On page 40:

3.1 recipe
alter system set db_recovery size =4g;
alter system set db_recovery_dest = '....

I think you mean db_recovery_file_dest_size and db_recovery_file_dest


On page 40:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 3, Page 40, recipe 3-1, step 3 should read:
alter system set db_recovery_file_dest_size=4G;
alter system set db_recovery_file_dest='/home/oracle/flasharea';

On page 49:
The total value is found in V$RECOVERY_FILE_DEST, in the column PERCENT_SPACE_USED

should be

The total value is found in V$RECOVERY_FILE_DEST, in the column SPACE_USED

On page 49:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 3, Page 49, recipe 3-4:
The total value is found in V$RECOVERY_FILE_DEST, in the column PERCENT_SPACE_USED

should be

The total value is found in V$RECOVERY_FILE_DEST, in the column SPACE_USED

On page 55:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 3, Page 55, alternative approach, recipe 3-7:
1. Move files to new location
2. crosscheck
3. delete expried
4. catalog recovery area

On page 61:

Please see the author-submitted errata below.
Author Comment:

Chapter 3, Page 61, typo in table 3-3 has "DCOLD1" and "DCOLD2" as column headers while the previous lines refer to DCOL1 and DCOL2.

On page 68-69:

Please see the author-submitted errata below.
Author Comment:

Chapter 3, Page 68, clarification, "Oracle defines an active redo log group as may or may not have been archived and is required for crash recovery."
-----------------------------
Chapter 3, Page 69, Figure 3-1, in Group 1, the folder on the right should say "g1m2"

On page 91-92:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 4, Page 91, "How it Works", XFree86 is not an operating system, that should say something like "operating system tool."
-----------------------------
Chapter 4, Page 92, "How it Works", Text says "enclose reserved keywords with double quotes as show in the example" but example uses single quotes. The offending word is "backup".

On page 97:

recipe 4.8, second paragraph. It mentions that <<- Eof is in line 2, 5 and EOF is in line 4 and 18.

<<-Eof only in line 2 and EOF in line 15. There is no line 18, only 15 lines.

On page 98:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 4, Page 98, recipe 4.8
second paragraph. It mentions that <<- Eof is in line 2, 5 and EOF is in line 4 and 18.

<<-Eof only in line 2 and EOF in line 15. There is no line 18, only 15 lines.

On page 107:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 4, Page 107 "Starting a Database", The example shows correctly "startup dba ..." but text says "use the dba option with the shutdown command".

On page 114-115:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 4, page 114

RMAN> show all;

CONFIGURE DEVICE TYPE ... TO BACKUPSET; #default

should read:

CONFIGURE DEVICE TYPE ... TO BACKUP SET; #default (i.e. include space between BACKUP and SET)

-----------------------------
Chapter 5, Page 115, typo, in table 5-1, the retention policy parameter is listed twice with a slightly different description.
-----------------------------
Chapter 5, Page 115, "How it Works", "backup optimization off" does not skip unchanged datablocks in datafiles, it would skip unchanged datafiles.

On page 114:

RMAN> show all;

CONFIGURE DEVICE TYPE ... TO BACKUPSET; #default


should read:
CONFIGURE DEVICE TYPE ... TO BACKUP SET; #default (i.e. include space between BACKUP and SET)

On page 117:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 5, Page 117

run {
configure retention policy to 1 redundancy 2;....


should be changed to

run {
configure retention policy to redundancy 2;...

On page 117:

run {
configure retention policy to 1 redundancy 2;....


should be changed to

run {
configure retention policy to redundancy 2;...

On page 123:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 5, Page 123
At the beginning of last paragraph:
The control_file_record_time initialization parameter...

should read:
The control_file_record_keep_time initialization parameter..

On page 123:

At the beginning of last paragraph:
The control_file_record_time initialization parameter...

should read:
The control_file_record_keep_time initialization parameter..

On page 145:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 5, Page 145, clarification, the syntax in recipe 5-20 works for 11g and not 10g. The recipe states this fact, however, some readers have missed that note.

On page 158:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 6, Page 158, "Connecting to the Catalog from the Command Line", Shouldn't say, starting backups in nocatalog mode would not break permanently the link between target database and catalog. Permanently means forever and this is not true because the contents in controlfile and recovery catalog can be resynchronized.

On page 162:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 6, Page 162, "How it Works", Recataloging backups is not shown in recipe 6-6, it's shown in recipe 6-7.

On page 203-204:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 7, Page 203, "Solution" The second example on this page uses a format string. Above the example there is correcty written that "%f" and "%d" are substitution variables but after the example that, has that '%' and '_' are wildcards. That's true for SQL but not for the RMAN format string.
-----------------------------
Chapter 7, Page 204, "Solution", There's a mismatch between the text and the given example. The text uses the tag "whole_db" but the example uses "whole_tag".

On page 253:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 8, Page 253, clarification, this is an 11g command, does not work in 10g:

RMAN> validate database;

The same is true on page 255, because the following RMAN commands will only work starting in 11g:

RMAN> validate recovery area;
RMAN> validate recovery files;
RMAN> validate spfile;
RMAN> validate tablespace <tablespace_name>;
RMAN> validate controlfilecopy <filename>;

On page 316:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 11, Page 316, observation, if you place your database in READ ONLY mode, you can get the "huh?" answer.

On page 326:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 11, Page 326, "Solution"

The note says "one line datafiles" instead of "online datafiles".

On page 376:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 12, Page 376, typo, recipe 12-10, the first example should have "alter database open resetlogs".
Currently it says "alter database open reset logs".

On page 378:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 12, Page 378, top of page, first paragraph, currently says “...you’ll lose any transactions that were created prior to the point to which you restore. It should say "...you'll lose any transactions that were created after the point to which you restore."

On page 452:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 15, Page. 452, "Solution", On the previous page at point 5, correctly starts the database with
NOMOUNT because you don't have a controlfile yet, but the text after the
example says ".. and mount the new controlfile".

On page 458-459:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 15, Page. 458, "Solution", In point 2 you set the auxiliary database name to TEST1 but in point 6
and 7 you use AUXDB.
----------------------------
Chapter 15, Page. 459, "Solution", The output in point 7 shows that the auxiliary database is not started and the instance has been started. But in point 4 you started the auxiliary instance manually and according to the output in point 6 the instance is mounted.

On page 466:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 15, Page. 466, "Solution" In point 6 we should recommend setting DB_UNIQUE_NAME in the init.ora of
the standby database although it's not necessary for the duplication.

The SID "AUX" in the example in point 7 is not correct, it should be "PROD".

Point 8 and 9 do not match, because in point 8 you test the connectivity to the primary database with tnsname "PROD1" and to the recovery catalog but in 9 you use the tnsname "PROD" for the primary database and don't use the recovery catalog at all. Both steps are executed on the standby, so the tnsnames should match to not confuse the reader.

On page 468:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 15, Page 468, "Solution", A small typo in the connect string for the auxiliary database. The password is enclosed by '<.' instead of '<>'. I would remove 'nofilenamecheck' from the example because the example's description does not mention if it's the same or different host.

On page 476:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 15, Page 476, "How it Works" In point 5 the text says first says, RMAN performs a PITR, but in the next sentence "RMAN performs a complete database recovery because no 'until' clause has been specified". RMAN uses an implicit 'set until
scn' clause and the recovery is always incomplete because of the missing online redologs.

On page 611:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 20, clarification, some of the output that you see may differ from what is in the book because when the book was written, the authors used a previous version of 11g, and that output now differs from the current version of 11g.

On page 632:

Please see the author-submitted errata listed below.
Author Comment:

Chapter 21, Page 632, in 1st paragraph:

"This directory has a subdirectory called HomeSelector. In that subdirectory you will see a file called ohsel.exe. That file is used to choose a different Oracle Home."

That should be rewritten to add the 10g/11g content:

"This directory has a subdirectory called HomeSelector. In that subdirectory you will see a file called ohsel.exe. That file is used to choose a different Oracle Home in Oracle 9i and earlier. For Oracle 10g, use Oracle Universal Installer to change Oracle Homes."