Book Image

Oracle Database 12c Backup and Recovery Survival Guide

Book Image

Oracle Database 12c Backup and Recovery Survival Guide

Overview of this book

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 (22 chapters)
Oracle Database 12c Backup and Recovery Survival Guide
Credits
About the Author
Acknowledgement
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Appendix A. Scenarios and Examples – A Hands-on Lab

The main idea of this hands-on appendix is to allow you to practice some of the scenarios you saw in this book (step-by-step) and learn by practice. If you have any doubt about a command of what it will be doing, for more information please refer to the corresponding chapter in this book for the scenario.

To be able to execute the exercises in this appendix, you should first create a test environment performing the following steps:

  1. Download the Oracle VirtualBox (free virtualization tool) at https://www.virtualbox.org/wiki/Downloads.

  2. Download Oracle Enterprise Linux 6.4 (https://edelivery.oracle.com/linux) and Oracle 12c database for Linux at http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-1959253.html.

    Note

    You do not need to use explicitly Linux to be able to run this lab. You can also use Solaris (SPARK and x86) or even Windows 64 bits. The use of VirtualBox with Linux is just a suggestion.

  3. Follow the instructions in my blog to do the installation of the products you downloaded (http://oraclenz.org/?p=3069).

  4. Create the following directories for the examples:

    $ mkdir /data/pdborcl
    $ mkdir /data/pdborcl/backups
    $ mkdir /data/pdborcl/backups/controlfile
    $ mkdir /data/pdborcl/backups/archivelogs
    $ mkdir /data/orcl/fast_recovery_area
    $ mkdir /data/orcl/redologs
    $ chown -R oracle:oinstall /data/pdborcl
    $ chown -R oracle:oinstall /data/orcl
    
  5. Create a test user and tablespace test.

    Note

    Because this is an Oracle 12c book, all scenarios will be for Oracle 12c in this appendix.

    $ sqlplus / as sysdba
    SQL> ALTER SESSION SET CONTAINER=pdborcl;
    SQL> CREATE TABLESPACE test DATAFILE '/data/pdborcl /test_01_tbs.dbf' SIZE 100m;
    SQL> CREATE USER test IDENTIFIED BY test DEFAULT TABLESPACE test QUOTA UNLIMITED ON test;
    SQL> GRANT connect, resource TO test;
    
  6. Create a table employee and load data on the schema test using the following command:

    SQL> CREATE TABLE TEST.EMPLOYEE  
    ( EMP_ID   NUMBER(10) NOT NULL,
      EMP_NAME VARCHAR2(30),
      EMP_SSN  VARCHAR2(9),
      EMP_DOB  DATE
    );
     
    SQL> INSERT INTO test.employee VALUES (101,'Francisco Munoz',123456789,'30-JUN-73');
    
    SQL> INSERT INTO test.employee VALUES (102,'Gonzalo Munoz',234567890,'02-OCT-96');
    
    SQL> INSERT INTO test.employee VALUES (103,'Evelyn Aghemio',659812831,'02-OCT-79');
    
    SQL> COMMIT;
    

Now that you are all set, please perform the following hands-on exercises.

Note

Explanation of the examples is out of the scope of this appendix. These are only practical examples to be executed by the reader to understand how each one works.