Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Database 12c Backup and Recovery Survival Guide

You're reading from   Oracle Database 12c Backup and Recovery Survival Guide A comprehensive guide for every DBA to learn recovery and backup solutions

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781782171201
Length 440 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (22) Chapters Close

Oracle Database 12c Backup and Recovery Survival Guide
Credits
About the Author
Acknowledgement
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Understanding the Basics of Backup and Recovery 2. NOLOGGING Operations FREE CHAPTER 3. What is New in 12c 4. User-managed Backup and Recovery 5. Understanding RMAN and Simple Backups 6. Configuring and Recovering with RMAN 7. RMAN Reporting and Catalog Management 8. RMAN Troubleshooting and Tuning 9. Understanding Data Pump 10. Advanced Data Pump 11. OEM12c and SQL Developer Scenarios and Examples – A Hands-on Lab Index

Configuring RMAN


Now is the time to configure our RMAN environment to allow us to run all RMAN scenarios.

Creating the target DB RMAN backup account

Have a look at the following command:

SQL> CREATE USER backup_admin IDENTIFIED BY bckpwd DEFAULT TABLESPACE users;

SQL> GRANT sysbackup TO backup_admin;

$ rman target=backup_admin/bckpwd@pdborcl

Configure RMAN using the configure command

Have a look at the following command:

RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUSET;
RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAL '/data/pdborcl/backups /bck_orcl_%U';
RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK MAXPIECESIZE 200m MAXOPENFILES 8 RATE 150m;
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CONROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/data/pdborcl/backups/controlfile/ctl_orcl_%F';
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;

Backup database

Have a look at the following command:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Checking and deleting obsolete backups

Have a look at the following command:

RMAN> REPORT OBSOLETE;
RMAN> DELETE OBSOLETE;

Creating RMAN catalog user

Have a look at the following command:

SQL> CREATE TABLESPACE catalog_tbs DATAFILE '/data/pdborcl /catalog_01_tbs.dbf' SIZE 100m;
SQL> CREATE USER catalog_bck IDENTIFIED BY rmancatalog DEFAULT TABLESPACE catalog_tbs QUOTA UNLIMITED ON catalog_tbs;
SQL> GRANT connect, resource, recovery_catalog_owner TO catalog_bck;

Creating recovery catalog

Have a look at the following command:

$ rman target / catalog=catalog_bck/rmancatalog@pdborcl

RMAN> CREATE CATALOG tablespace catalog_tbs;

Register your DB in the recovery catalog

Have a look at the following command:

$ rman target=backup_admin/bckpwd catalog=catalog_bck/rmancatalog@pdborcl
RMAN> REGISTER DATABASE;
RMAN> REPORT SCHEMA;

Creating a virtual private catalog

Have a look at the following command:

SQL> CREATE USER fmunoz IDENTIFIED BY alvarez DEFAULT TABLESPACE catalog_tbs;
SQL> GRANT recovery_catalog_owner TO fmunoz;

$ rman catalog=catalog_bck/rmancatalog@pdborcl
RMAN> GRANT CATALOG FOR DATABASE pdborcl TO fmunoz;
RMAN> GRANT REGISTER DATABASE TO fmunoz;

rman catalog=fmunoz/alvarez@pdborcl

RMAN> CREATE VIRTUAL CATALOG;

Enabling Block Change tracking

Have a look at the following command:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
SQL> SELECT status FROM v$block_change_tracking;
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image