You are previewing Oracle Database 12c Backup and Recovery Survival Guide.
O'Reilly logo
Oracle Database 12c Backup and Recovery Survival Guide

Book Description

A comprehensive guide for every DBA to learn recovery and backup solutions

  • A practical reference to all Oracle backup and recovery options available, making it essential to any DBA in the world

  • A valuable guide for readers on the most frequent backup and recovery scenarios they can find in real life

  • Provides hands-on examples and a full hands-on lab to practise everything learned in this book

In Detail

The three main responsibilities of a successful DBA are to ensure the availability, recoverability, and performance of any database. To ensure the recoverability of any database, a DBA needs to have a strong backup and recovery skills set. Every DBA is always looking for a reference book that will help them to solve any possible backup and recovery situation that they can come across in their professional life.

Oracle Database 12c Backup and Recovery Survival Guide has the unique advantage to be a reference to all Oracle backup and recovery options available, making it essential for any DBA in the world. If you are new to Oracle Database, this book will introduce you to the fantastic world of backup and recovery that is vital to your success. If you are an experienced DBA, this book will become a reference guide and will also help you to learn some possible new skills, or give you some new ideas you were never aware about. It will also help you to easily find the solution to some of the most well known problems you could find during your career as a DBA. This book contains useful screenshots, scripts, and examples that you will find more than useful.

Most of the books currently available in the market concentrate only on the RMAN utility to backup and recovery. This book will be an exception to the rule and will become a must-have reference, allowing you to design a real and complete backup and recovery strategy. It covers the most important topics on Oracle database such as backup strategies, Nologging operations, new features in 12c, user managed backups and recoveries, RMAN (including reporting, catalog management, troubleshooting, and performance tuning), advanced data pump, Oracle Enterprise Manager 12c and SQL Developer.

"Oracle Database 12c Backup and Recovery Survival Guide" contains everything a DBA needs to know to keep data safe and recoverable, using real-life scenarios.

Table of Contents

  1. Oracle Database 12c Backup and Recovery Survival Guide
    1. Table of Contents
    2. Oracle Database 12c Backup and Recovery Survival Guide
    3. Credits
    4. About the Author
    5. Acknowledgement
    6. About the Author
    7. Acknowledgement
    8. About the Reviewers
    9. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    10. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    11. 1. Understanding the Basics of Backup and Recovery
      1. Purpose of backup and recovery
        1. Testing backups
      2. Protecting data
        1. Media failure
        2. Hardware failure
        3. Human error
        4. Application error
      3. Types of backup
        1. A physical backup
        2. A logical backup
      4. Backup strategies
      5. Restore versus recovery
      6. What is redo?
      7. Redo generation and recoverability
      8. The NOARCHIVELOG mode
      9. The ARCHIVELOG mode
        1. Understanding the ARCHIVELOG mode
        2. Preparing for the ARCHIVELOG mode
        3. Checking the status of the ARCHIVELOG mode
        4. Specifying parameters
        5. Viewing the status of archival destinations
        6. Placing a database into the ARCHIVELOG mode
        7. Differences between redo and undo
        8. Facing excessive redo generation during an online backup?
      10. Summary
    12. 2. NOLOGGING Operations
      1. LOGGING versus NOLOGGING
      2. Disabling redo generation (NOLOGGING)
        1. NOLOGGING operations
        2. Indexed organized tables – an exception
      3. Reducing redo generation
        1. Tips when LOGGING is in effect (not using NOLOGGING)
          1. Backups
          2. Bulk inserts
          3. Bulk deletes
          4. Bulk updates
          5. Partitioning
          6. Tips for developers
        2. Tips when NOLOGGING is in effect
          1. Partitioning
          2. Direct path inserts
          3. Bulk inserts
          4. Bulk deletes
          5. Bulk updates
      4. Backups and NOLOGGING
      5. Redo-related wait events
        1. The 'log file parallel write' event
        2. The 'log file sync' event
        3. The 'redo log space request' event
          1. The 'log buffer space' event
      6. Block corruption due to NOLOGGING
      7. Repairing NOLOGGING changes on physical and logical standby databases
      8. Finding sessions that generate lots of redo
      9. Some other important facts
        1. Redo and undo for DML
        2. Redo and temporary tables
        3. Redo generation and materialized views
        4. Flashback and NOLOGGING
        5. Performance and recovery considerations
        6. Direct path load using SQL*Loader
      10. Some useful scripts
        1. Redo generated since instance startup
        2. Redo generated since session startup
        3. Redo generated by current user sessions
        4. Current status for redo logs
        5. Redo log group and log switch information
        6. NOLOGGING objects in the database
      11. Summary
    13. 3. What is New in 12c
      1. Pluggable database
      2. RMAN new features and enhancements
        1. Container and pluggable database backup and restore
        2. Enterprise Manager Database Express
        3. Backup privileges
        4. SQL and DESCRIBE
        5. Multi-section backups for incremental backups
        6. Network-based recovery
        7. Active Duplicate
        8. Support for the third-party snapshot
        9. Cross-platform data transport
        10. Table recovery
      3. Data Pump's new features and enhancements
        1. Disabling LOGGING on Data Pump Import
        2. Full transportable Export/Import
        3. Exporting views as tables
        4. Extended character data types
        5. Encryption password
        6. Compressing tables on Import
        7. Exporting data from the data vault
        8. Creating SecureFile LOBs on Import
        9. Auditing Data Pump commands
      4. Summary
    14. 4. User-managed Backup and Recovery
      1. Cold backup
      2. Offline backup
      3. Hot backups
        1. Hot backup of a whole database
        2. Hot backup of tablespaces
        3. Hot backup of a container database
          1. Whole container database
          2. Root only or individual pluggable database
          3. Check datafile status
      4. Control file backup
        1. Binary backup
        2. Text file backup
      5. Flashback database
      6. Recovering from a user-managed backup
        1. Other recovery scenarios
          1. Losing all copies of the current control file
          2. Losing one copy of a multiplexed control file
          3. Loss of archived redo logs or online redo logs
          4. Loss of SPFILE
      7. Summary
    15. 5. Understanding RMAN and Simple Backups
      1. Why RMAN?
      2. Getting started with RMAN
      3. RMAN architecture
        1. Target database
        2. Target Control File
        3. RMAN channels
        4. Auxiliary database
        5. Recovery Catalog
        6. RMAN client
        7. Oracle Enterprise Manager (EM) Cloud Control 12c
        8. Media Management Library (MML)
        9. Oracle secure backup
        10. Memory requirements for RMAN
        11. Configuring ARCHIVELOG mode and FRA
      4. Introducing RMAN backup formats
        1. Backup sets
        2. Image copy
          1. Full backup
          2. Incremental backups
            1. Differential incremental backup
            2. Cumulative incremental backup
          3. Power of one
          4. Getting introduced to RMAN commands
            1. Taking your first RMAN backup
            2. File sections for backups of large data files
      5. Using RMAN for performing incremental backups
      6. Fast incremental backups using the block change tracking (BCT) file
      7. Multi-section incremental backups
      8. Incrementally updated backups
      9. Performing backups of the control file, the SPFILE, and archived redo logs
      10. Using RMAN compression for backups
      11. RMAN for multitenant container databases
        1. Performing a full backup of a multitenant CDB
        2. Partial backup of a multitenant CDB
        3. Performing backup of a pluggable database and root
        4. Performing backups of backups
        5. Restarting RMAN backups
        6. Useful RMAN views related to backups
      12. Summary
    16. 6. Configuring and Recovering with RMAN
      1. RMAN configuration – an introduction
        1. Using the V$RMAN_CONFIGURATION view
        2. Using the SHOW ALL command
      2. Configuring the backup retention policy
        1. Redundancy retention policy
        2. Recovery window retention policy
      3. Using backup optimization
      4. Configuring the device types for the backup
      5. Configuring auto backup for the control file and SPFILE
      6. Configuring RMAN channels
      7. Creating duplexed backups
      8. Configuring encrypted backups
        1. Transparent encryption of backups
        2. Creating and using Oracle Software Keystore
        3. Password encryption
        4. Dual-mode encryption
      9. Configuring compression for backups
      10. Configuring the snapshot control file
      11. Configuring the archived log deletion policy
      12. Configuring the FRA
      13. Configuring authentication for RMAN
        1. Operating system authentication
        2. Authenticating the password file
      14. Crash and media recovery
      15. Key terms related to recovery
        1. Overview of stages in the database startup
        2. Steps involved in the crash/instance recovery
        3. Instance recovery in container and pluggable databases
        4. Performing media recovery
        5. Recovery in the NOARCHIVELOG mode
        6. Loss of a temporary file
        7. Loss of non-system data files
        8. Loss of system data files
        9. Recovering whole CDBs, PDBs, and root container databases
          1. Complete recovery of a container database
          2. Complete recovery of a pluggable database
          3. Complete recovery of the root container
        10. Performing control file recovery
        11. Performing Block Media Recovery (BMR)
        12. Performing point-in-time recovery
          1. Database Point-in-time Recovery (DBPITR)
          2. Tablespace Point-in-time Recovery (TSPITR)
        13. Table and table partition-level recovery from RMAN backups
        14. Data recovery advisor
      16. Summary
    17. 7. RMAN Reporting and Catalog Management
      1. Using the control file for RMAN metadata
      2. Using the CONTROLFILE_RECORD_KEEP_TIME parameter
      3. What is a recovery catalog
        1. Creating the recovery catalog
          1. Sizing and creating a database for the recovery catalog
          2. Creating the default tablespace for the catalog owner
          3. Creating the catalog owner schema
          4. Granting privileges to the catalog owner
          5. Creating the recovery catalog
          6. Using the recovery catalog
          7. Resynchronizing the recovery catalog with the control file
          8. Merging multiple recovery catalogs into one
        2. Using virtual private catalogs
        3. Creating and managing stored scripts
        4. Making a recovery catalog highly available
        5. Upgrading the recovery catalog
        6. Unregistering databases from the recovery catalog
        7. Dropping a recovery catalog
        8. Views related to the recovery catalog
      4. Reporting in RMAN
        1. Using the LIST command
        2. Using the REPORT command
      5. Summary
    18. 8. RMAN Troubleshooting and Tuning
      1. Getting started with RMAN troubleshooting
        1. Using CHECKSYNTAX
        2. Reading the RMAN error stack
        3. Debugging RMAN using the DEBUG clause
        4. Using the alert log and operating system trace files
      2. RMAN tuning – an introduction
        1. I/O and RMAN – two sides of one coin
        2. Number and size of the input and output buffers
        3. Synchronous and asynchronous I/O modes
        4. Setting the Large Pool memory
        5. Monitoring RMAN I/O performance using dictionary views
          1. V$BACKUP_ASYNC_IO (for asynchronous I/O)
          2. V$BACKUP_SYNC_IO (for synchronous I/O)
        6. Tuning SBT (tape) performance
      3. Monitoring RMAN sessions and operations
      4. Stopping RMAN from being uncontrollable
      5. Using incremental, multi-section, multiplexing, and parallelism
      6. Troubleshooting RMAN performance using tracing
      7. Summary
    19. 9. Understanding Data Pump
      1. What is Data Pump?
      2. The Data Pump architecture
      3. New concepts with Data Pump
      4. Methods to move the data
        1. Datafile copy
        2. Direct path
        3. External tables
        4. Conventional path
        5. Network link
      5. Data Pump files
        1. Roles for Data Pump export and import
        2. Directory objects
          1. Creating directory objects
      6. Data Pump scenarios
        1. Schema export and import
        2. Exporting and importing tables
        3. Exporting and importing a whole database/pluggable database
        4. Using Export to estimate space
        5. Parallel full database export and interactive-command mode
        6. Importing tables with only metadata
        7. Exporting views as tables
        8. Importing data via a network link
      7. Summary
    20. 10. Advanced Data Pump
      1. Data masking
      2. Metadata repository and version control
      3. Using SOURCE_EDITION and TARGET_EDITIONS
      4. Cloning a user
      5. Creating smaller copies of production
      6. Creating your database in a different file structure
      7. Moving all objects from one tablespace to another
      8. Moving an object to a different schema
      9. Migrating data for upgrade
      10. Downgrading an Oracle Database
      11. Transporting a tablespace
      12. Data Pump flashback
      13. Monitoring Data Pump job status
      14. Some performance tuning tips
      15. Summary
    21. 11. OEM12c and SQL Developer
      1. Configuring backup, recovery, and catalog settings
        1. Backup settings
        2. Recovery settings
        3. Catalog settings
      2. Scheduling an RMAN backup
        1. Using the Oracle-Suggested Backup strategy option
        2. Using the Customized Backup option
      3. Restore points
      4. Export/Import with OEM12c
        1. Executing an export operation
      5. Monitoring the job
      6. SQL developer 3.2
        1. RMAN operations
        2. Data Pump operations
      7. Summary
    22. A. Scenarios and Examples – A Hands-on Lab
      1. Configuring the database
        1. Making sure an spfile is used to start the database
        2. Placing the database in the archivelog mode and activating Flashback
        3. Creating a new redo log group and associated files
      2. Configuring RMAN
        1. Creating the target DB RMAN backup account
        2. Configure RMAN using the configure command
        3. Backup database
        4. Checking and deleting obsolete backups
        5. Creating RMAN catalog user
        6. Creating recovery catalog
        7. Register your DB in the recovery catalog
        8. Creating a virtual private catalog
        9. Enabling Block Change tracking
      3. Playing with RMAN, FRA, and catalog views
        1. Monitoring a backup
        2. Incremental backups
        3. Multisection backups
        4. FRA – checking number of redo switches
        5. Check for alerts
        6. Check FRA usage
        7. See the archived log generated by the DB target
        8. See the control file backups
        9. See the corrupted list that exists in datafile backups
        10. See block corruption in the DB, populated when backup or backup validate
        11. See all RMAN configurations (equivalent to show all)
        12. Monitor backup outputs (RMAN)
        13. Offline backups with RMAN
        14. Offline backup without using configured defaults
        15. Using backup limits (duration)
        16. Modifying the retention policy for a backup set (archival backups)
        17. Archive deletion policy
        18. Using RMAN to scan DB for physical and logical errors
        19. Configuring tablespaces for exclusion from whole database backups
        20. Skipping offline, inaccessible, or read-only datafiles
        21. Forcing backups of read-only datafiles
        22. Backup of newly added datafiles
        23. Backup files not backed up during a specific period
        24. General backup examples
        25. Backup copies
      4. Advanced RMAN
        1. Information about fully-completed backups
        2. Summary of the active session history
        3. How long does it take?
        4. V$BACKUP_ASYNC_IO
        5. Tablespace Point-in-time Recovery (TSPITR)
        6. Reporting from a catalog
        7. Duplex backup
        8. Check if the database is recoverable
        9. Recover advisor
      5. Magic with Data Pump
        1. Preparing Data Pump
        2. Data masking
        3. Metadata repository
        4. Cloning a user
        5. Creating smaller copies of production
        6. Creating your database in a different structure
        7. Time-based flashback
      6. Backup and recovery scenarios
        1. Active duplication of a database to a different server with the same structure (non-OMF and non-ASM)
        2. Duplicating a PDB
        3. ASM backup and restore
        4. Recovering from the loss of the SYSTEM tablespace
        5. Recovering a lost datafile using an image from an FRA
    23. Index