Books for professionals By professionals®RMAN Recipes for Oracle Database 11g: A Problem-Solution Approach Dear Reader, RMAN is the tool of choice for Oracle database backup and recover
Trang 1Books for professionals By professionals®
RMAN Recipes for Oracle Database 11g:
A Problem-Solution Approach
Dear Reader, RMAN is the tool of choice for Oracle database backup and recovery RMAN contains core features that aren’t available with other backup and recovery solutions Furthermore, Oracle continues to integrate RMAN with other products such as Enterprise Manager, RAC, ASM, and Data Guard If you are a DBA in an Oracle shop, then it’s vital that you know how to use RMAN effectively Your job depends on it
This recipe book provides you with focused solutions for the gamut of RMAN backup and recovery tasks We know from hard experience that sometimes all you need is an easy-to-find, clear example showing how a feature works This is especially true when you have a critical issue that is causing database downtime
In those situations, people expect you to earn your keep and quickly solve the problem Failure is not an option
This book is unique in that it contains answers for almost any RMAN backup and recovery problem that you’re likely to encounter We tackle all scenarios, from simple to complex Each recipe title is an indexed entry to a particular problem In the recipe you’ll find the solution and a detailed explanation of how it works You won’t be shown merely how to parrot RMAN commands We
explain why features work like they do.
If your company uses Oracle technology, then RMAN should be a key piece
of your data protection strategy As a DBA, you’re the one responsible for making
it work We hope that you’ll use this book to fully maximize RMAN to protect, secure, and ensure the availability of your company’s databases
Sincerely, Darl Kuhn, Sam Alapati, Arup Nanda
US $59.99
Shelve in
Databases/Oracle
User level:
Beginner–Intermediate
The eXperT’s Voice® in oracle
RMAN Recipes
A Problem-Solution Approach
Companion eBook Available
THE APRESS ROADMAP
Expert Oracle Database Architecture
RMAN Recipes for
Oracle Database 11g
Expert Oracle Database
10g Administration
Practical
Busy DBA
Practical
RMAN for the Busy DBA
An example-based approach to backing
up and recovering your Oracle database.
MaGenTa Black
panTone 123 c
Darl Kuhn, coauthor of
Oracle RMAN
Pocket Reference
ISBN-13: 978-1-59059-851-1 ISBN-10: 1-59059-851-2
9 781590 598511
5 5 9 9 9 www.apress.com
SOURCE CODE ONLINE
Companion eBook
See last page for details
on $10 eBook version
Sam Alapati, author of
Expert Oracle Database
10g Administration
Arup Nanda, author of
Oracle 11g New Features
Series on Oracle
Technology Network
Trang 3Darl Kuhn, Sam Alapati, and Arup Nanda
RMAN Recipes for
Oracle Database 11g
A Problem-Solution Approach
Trang 4Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark
Lead Editor: Jonathan Gennick
Technical Reviewer: Bernard Lopuz
Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jonathan Gennick,
Jason Gilmore, Jonathan Hassell, Chris Mills, Matthew Moodie, Jeffrey Pepper, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh
Project Manager: Richard Dal Porto
Copy Edit Manager: Nicole Flores
Copy Editor: Kim Wimpsett
Assistant Production Director: Kari Brooks-Copony
Production Editor: Lori Bring
Compositor: Diana Van Winkle, Van Winkle Design Group
Proofreader: Dan Shaw
Indexer: Broccoli Information Management
Artist: Diana Van Winkle, Van Winkle Design Group
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013 Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www.springeronline.com
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705 Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit
http://www.apress.com
The information in this book is distributed on an “as is” basis, without warranty Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work
The source code for this book is available to readers at http://www.apress.com in the Source Code/ Download section You will need to answer questions pertaining to this book in order to successfully download the code
Trang 5To Heidi, Lisa, and Brandi —Darl Kuhn
To my wife Valerie; for her enormous support and sacrifice —Sam Alapati
To Anu and Anish —Arup Nanda
Trang 6unregister command, 161–162
unregistering databases, 161–162
unsetenv OS command, 535
until clause, 326, 340, 360, 469
until scn clause, 370
until sequence clause, 346
until time clause, 190, 468
UNUSED status, 432
updating
crontab, 266 image copies, 221–223 recovery catalogs, 164–166 repository after manually deleting backups, 239–240
stored scripts, 281–282 upgrade catalog command, 170, 173, 175
Use Recovery Catalog option, 601
USE_COUNT column, 502, 503
user accounts, Oracle Secure Backup (OSB),
549–551 changing user attributes, 550 listing users, 550
removing users, 550–551 renaming users, 550 user errors, 3
user process failures, 2–3
user_dump_dest initialization parameter,
533 user_dump_dest initialization variable, 538
user_dump_dest location, 539
USERNAME column, 500
USER_RECYCLEBIN view, 413
USER_SEGMENTS dictionary view, 409
USER_TABLES data dictionary view, 408
using clause, 101
utlrp.sql script, 489
■ V
validate command, 252, 254, 324–325
validate datafile command, 214
validating
backup sets, 252–255 data blocks, 252–255 datafiles, 252–255 V$ARCHIVED_LOG view, 365, 524
V$BACKUP_ASYNC_IO view, 492, 500–501,
503 V$BACKUP_CORRUPTION view, 335
V$DATABASE_INCARNATION view, 376 V$DATAFILE view, 317
V$DATAFILE_HEADER view, 317, 321 verifying media management layer (MML) installation, 579–581
Veritas NetBackup, 558–569 backing up using, 566–567 checking for files on tape, 563–565 configuring parameters in RMAN, 565–566 defining client databases in, 562–563 installing agent for Oracle, 558–560 maintaining policies for RMAN backups, 560–562
restoring using, 567–569 scheduling RMAN jobs, 562 VERSIONS_ENDSCN column, 422 VERSIONS_ENDTIME column, 421–422 VERSIONS_OPERATION column, 420, 422 VERSIONS_STARTSCN column, 422 VERSIONS_STARTTIME column, 422 VERSIONS_XID column, 422 VERSTIONS_STARTTIME column, 422 V$FLASHBACK_DATABASE_LOG view, 400 V$FLASHBACK_DATABASE_STAT column, 402–403
V$FLASH_RECOVERY_AREA_USAGE view, 48
vidunique option, 551 View Job button, 592 View Results button, 620 virtual private catalog, 150, 153, 167 virtual private recovery catalogs, 150 V$LGMNR_CONTENTS view, 369 V$LOG view, 430
V$LOGFILE view, 430, 432 V$LOG_HISTORY view, 365 V$LOGMNR_LOGS view, 369 V$MTTR_TARGET_ADVICE view, 511 V$NLS_PARAMETERS view, 528 V$NLS_VALID_VALUES view, 528 V$PROCESS view, 492–493, 630 V$RECOVER_FILE view, 13, 321 V$RECOVERY_FILE_DEST view, 48 V$RECOVERY_PROGRESS view, 493, 498 V$RMAN_BACKUP_JOB_DETAILS view, 492, 494
V$RMAN_OUTPUT view, 94, 530 V$RMAN_STATUS view, 531
Trang 7V$SESSION view, 493
V$SESSION_LONGOPS view, 493, 498, 526 V$SESSION_WAIT view, 493
■ W
warm backup, 9
web tool, 548
weekly_backup identifier, 182
weekly_copy tag, 203
which command, 91
whole backups, 9
whole recovery, 597
whole_db tag, 204
Windows
developing batch files to run RMAN, 267–271
scheduling in from command line, 276–277
scheduling scripts in via graphical user interface (GUI), 272–275
setting up credentialed OS users, 587 terminating processes, 525
using RMAN on, 623–643 Windows Task Scheduler, 275
write-ahead protocol, 5
writewindow option, 551
writewindow parameter, 552
■ X
xcopy utility, 640
■I N D E X
670