SlideShare a Scribd company logo
Oracle Database 12c – Recovery
Manager New Features
Presented by: Andy Colvin

December 2, 2013
About Enkitec
—  Extensive Oracle Practice – 9 years old
— 
— 
— 
— 
— 

Education
Database Migrations
Performance Reviews
Remote DBA Support
Application Express

—  Enkitec Extreme Exadata Expo
—  Irving, TX
—  June 2-3
—  http://www.enkitec.com/e4
About Me
—  Working around Oracle since 1999
—  Background in systems, network,
database
—  7 years at Enkitec
—  Working on Exadata for 4 years
—  Oracle ACE
Why Talk About RMAN?
—  Everybody should use RMAN
—  It can be quite interesting
—  I’m a fan of cruel and unusual
punishment
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
12c Includes SYSBACKUP Role
—  Special role that only has backup privileges
—  For example, SYSBACKUP does not include SELECT ANY TABLE

—  Recommended method for connecting to RMAN
—  rman target ' "user/pass as sysbackup" '
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
Pluggable Databases
—  Oracle 12c introduces the concept of containers and
pluggable databases
—  Pluggable databases are “virtual” databases
—  Pluggable databases share memory and redo logs
Pluggable Database Support
—  RMAN supports Pluggable Databases
—  Back up entire Container Database or individual Pluggable
Databases
—  Container database – no changes
—  PDB point in time recovery
Containers vs Pluggable Databases
—  Back up container databases like any “standard” database
—  Afterwards, open all of your pluggable databases
RMAN>
2> {
3>
4>
5>
6> }
RMAN>
RMAN>

RUN
SET UNTIL SCN 16747183;
RESTORE DATABASE;
RECOVER DATABASE;
alter database open resetlogs;
alter pluggable database all open;
Pluggable Database Support
RMAN> report schema;
Report of database schema for database with db_unique_name PLUGGY
List of Permanent Datafiles
===========================
File Size(MB) Tablespace
---- -------- -------------------1
770
SYSTEM
3
610
SYSAUX
4
60
UNDOTBS1
5
250
PDB$SEED:SYSTEM
6
5
USERS
7
490
PDB$SEED:SYSAUX
8
250
PLUG1:SYSTEM
9
510
PLUG1:SYSAUX
10
5
PLUG1:USERS

RB segs
------***
***
***
***
***
***
***
***
***

List of Temporary Files
=======================
File Size(MB) Tablespace
---- -------- -------------------1
521
TEMP
2
20
PDB$SEED:TEMP
3
20
PLUG1:TEMP

Maxsize(MB)
----------32767
32767
32767

Datafile Name
-----------------------+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE
+DG/PLUGGY/DATAFILE/FILE

Tempfile Name
-------------------+DG/PLUGGY/TEMPFILE/FILE
+DG/PLUGGY/TEMPFILE/FILE
+DG/PLUGGY/TEMPFILE/FILE
PDB Point In Time Recovery
—  Recover PDBs individually
RMAN>
RMAN>
2> {
3>
4>
5>
6> }
RMAN>

alter pluggable database ERP close;
RUN
SET UNTIL SCN 1674493;
RESTORE PLUGGABLE DATABASE ERP;
RECOVER PLUGGABLE DATABASE ERP;
alter pluggable database ERP open resetlogs;
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
Running SQL From RMAN
—  No More “SQL” Tags
—  Previous versions didn’t support SELECT statements
—  Useful within backup scripts
Running SQL From RMAN (2)
RMAN> select sysdate from dual;
SYSDATE
--------11-FEB-13
RMAN> desc dba_pdbs
Name
Null?
--------------------------PDB_ID
NOT NULL
PDB_NAME
NOT NULL
DBID
NOT NULL
CON_UID
NOT NULL
GUID
STATUS
CREATION_SCN
NOT NULL

Type
---------------------------NUMBER
VARCHAR2(128)
NUMBER
NUMBER
RAW(16)
VARCHAR2(13)
NUMBER
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
Recover Table
—  Recover tables from backups
—  Useful when you can’t use flashback
—  Recover tables or table partitions
—  Remap table names using datapump syntax
—  Must connect with SYSDBA or SYSBACKUP credentials
Recover Table (2)
RMAN> RECOVER TABLE ACOLVIN1.T
2> UNTIL SCN 1674493
3> AUXILIARY DESTINATION '+DATA'
4> DATAPUMP DESTINATION '+DATA'
5> REMAP TABLE 'ACOLVIN1'.'T':'T_RECOVERED';
Recover Table - Process
—  RMAN automatically finds necessary backupsets
—  Auxiliary database created with backupsets
—  Data pump export file automatically created
—  RMAN performs data pump import of the tables to be recovered
(optional)
—  RMAN cleans up after itself, deleting datapump file and temporary
instance files
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
Cross-Platform Backup/Restore
—  Utilizes backupsets (smaller backups to transport)
—  Great for migrations – “read-only” requirement removed
—  Allows for shorter downtime when moving across platforms
Cross-Platform Backup/Restore (2)
1.  Perform backup of the source tablespaces
2.  Restore to the new target database
3.  Take periodic incremental backups and recover on target
4.  Place source tablespaces in read-only mode, take final
incremental backup and export metadata
5.  Restore final incremental backup to target database
6.  Import tablespace metadata into target database
What’s New?
—  New Security Roles
—  Pluggable Databases
—  Run SQL from RMAN
—  Recover Table
—  Cross-Platform Restore
—  Active Duplicate Enhancements
RMAN Duplicate – Old School
—  Each channel is assigned a datafile
—  Files assigned to channels starting with largest first
—  When a file is finished, the next largest available file is
copied

—  Works perfectly when all datafiles are same size
—  What if we have different sized datafiles?
What Does This Mean?
—  Imagine dozens of datafiles
—  Ranging from 50GB to 9TB

—  Allocate too many channels, they will sit idle
—  Don’t allocate enough channels, wait on largest datafiles
***This is changed in 12c***
—  Active duplicate utilizes backupsets
RMAN Duplicate Channel Allocation
Source Database
File 1
1TB

File 5
10GB

File 2
50GB

File 6
10GB

File 3
10GB

File 7
10GB

File 4
20GB

File 8
10GB

RMAN Channel 1

RMAN Channel 2

Target Database
Active Duplicate Enhancements
—  Active duplicate defaults to use backupsets
—  This gives us all of the benefits of backupsets, with active
duplicate
—  PIECE SIZE
—  COMPRESSION

—  Empty space moves much faster
Active Duplicate Enhancements
—  Example code
RMAN> run {
2> allocate channel d1 device type disk;
3> allocate channel d2 device type disk;
4> allocate channel d3 device type disk;
5> allocate auxiliary channel s1 device type disk;
6> duplicate target database for standby
7> from active database piece size 500M;
8> }
Active Duplicate Enhancements
—  What the output looks like
channel s1: starting datafile backup set restore
channel s1: using network backup set from service cloudy
channel s1: specifying datafile(s) to restore from backup set
channel s1: restoring datafile 00001 to +SMITHERS/windy/datafile/
system.273.807276333
channel s1: restoring section 1 of 2
channel s1: restore complete, elapsed time: 00:00:15
channel s1: starting datafile backup set restore
channel s1: using network backup set from service cloudy
channel s1: specifying datafile(s) to restore from backup set
channel s1: restoring datafile 00001 to +SMITHERS/windy/datafile/
system.273.807276333
channel s1: restoring section 2 of 2
Active Duplicate Enhancements
—  Let’s look closer
—  Using a utility called dstat, we can see what’s going on
—  dstat -dnyc -D xvda,xvde,xvdf,xvdg -N eth0 -C total

—  Using a utility called dstat, we can see what’s going on
Active Duplicate Enhancements
--dsk/xvda----dsk/xvde----dsk/xvdf----dsk/xvdg- --net/eth0- ----total-cpu-usage---read writ: read writ: read writ: read writ| recv send||usr sys idl wai hiq siq
0
0 :
0
35M:
0
32M:8192B
34M| 13M 289k|| 1
0 90
9
0
0
0
0 :
0
36M:
0
39M:
0
36M| 109M 2168k|| 1
1 97
1
0
1
0
0 :
0
37M: 32k
37M: 32k
38M| 116M 2299k|| 1
1 97
0
0
empty datafile 1
0
0 :
0
38M:
0
37M:
0
37M| 116M 2345k|| 1
1 97
0
0
1
0
0 : 32k
21M: 96k
22M: 56k
21M| 65M 1311k|| 0
1 97
1
0
0
0
0 : 16k
0 : 16k
16k: 32k
16k| 52B 508B|| 0
0 100
0
0
0
0
0 : 16k 4096B: 32k
0 : 48k
0 | 11k
10k|| 0
0 100
0
0
0
0 4096B:
0
46M: 32k
44M: 16k
44M| 548B 743B|| 1
0 85 14
0
0
0
0 :
0
44M:
0
46M: 24k
46M| 532B 1220B|| 1
0 84 15
0
0
0
16k:
0
26M:
0
29M:8192B
29M|1065k
26k|| 1
0 90
9
0
0
0
0 : 16k
48M: 16k
45M: 32k
42M| 296B 450B|| non-empty14
1
0 85
0
datafile 0
0
0 :
0
46M:
0
46M:
0
46M| 426B 759B|| 1
0 84 15
0
0
0
0 :
0
43M:
0
46M:
0
49M| 584B 434B|| 1
0 85 14
0
0
A Few More Things…
—  Recover/Restore files over network
—  Image copy backups support section size
—  Storage snapshot optimizations
—  Specify that duplicated database does not open after
duplication
Questions?
Contact Information: Andy Colvin
email - andy.colvin@enkitec.com
web - http://www.enkitec.com
blog- http://blog.oracle-ninja.com
twitter - @acolvin

More Related Content

DOCX
Asm disk group migration from
PDF
Open-E DSS V7 Asynchronous Data Replication over a LAN
PPTX
[OSDC 2013] Hadoop Cluster HA 的經驗分享
PDF
Open-E DSS V7 Synchronous Volume Replication over a LAN
DOCX
Backup and Restore of database on 2-Node RAC
PDF
Open-E DSS V7 Asynchronous Data Replication over a WAN
PDF
Backup andrecoverychecklist
PDF
Open-E DSS V7 Asynchronous Data Replication within a System
Asm disk group migration from
Open-E DSS V7 Asynchronous Data Replication over a LAN
[OSDC 2013] Hadoop Cluster HA 的經驗分享
Open-E DSS V7 Synchronous Volume Replication over a LAN
Backup and Restore of database on 2-Node RAC
Open-E DSS V7 Asynchronous Data Replication over a WAN
Backup andrecoverychecklist
Open-E DSS V7 Asynchronous Data Replication within a System

What's hot (20)

ODP
Hadoop admin
PDF
Oracle Database Management Basic 1
PDF
Hadoop single node installation on ubuntu 14
PDF
Step by Step Restore rman to different host
PDF
Install and upgrade Oracle grid infrastructure 12.1.0.2
PPT
Dpm Disaster Recovery Sonvu
PPTX
10 ways to improve your rman script
PDF
Open-E DSS V7 Remote Snapshot Control with CLI/API
PDF
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
DOCX
Rac questions
PDF
B35 all you wanna know about rman by francisco alvarez
PDF
Complex stories about Sqooping PostgreSQL data
PPTX
Understanding Hadoop
PPTX
Introduction to HDFS and MapReduce
DOC
Configure h base hadoop and hbase client
DOCX
DNS windows server(2008R2) & linux(SLES 11)
ODP
Hadoop2.2
PDF
Percona Cluster with Master_Slave for Disaster Recovery
PPTX
Introduction to hadoop and hdfs
PDF
Implementation of k means algorithm on Hadoop
Hadoop admin
Oracle Database Management Basic 1
Hadoop single node installation on ubuntu 14
Step by Step Restore rman to different host
Install and upgrade Oracle grid infrastructure 12.1.0.2
Dpm Disaster Recovery Sonvu
10 ways to improve your rman script
Open-E DSS V7 Remote Snapshot Control with CLI/API
Open-E DSS V7 Active-Active Load Balanced iSCSI HA Cluster (with bonding)
Rac questions
B35 all you wanna know about rman by francisco alvarez
Complex stories about Sqooping PostgreSQL data
Understanding Hadoop
Introduction to HDFS and MapReduce
Configure h base hadoop and hbase client
DNS windows server(2008R2) & linux(SLES 11)
Hadoop2.2
Percona Cluster with Master_Slave for Disaster Recovery
Introduction to hadoop and hdfs
Implementation of k means algorithm on Hadoop
Ad

Viewers also liked (8)

PPT
интернет статистика 2011
PPT
Five senses Poland - Kristýna Kroupová
PDF
Suplemento especial de Informesan: Cincuentenario ESAN
PDF
Top HR Processes Ripe for a Social Enterprise
PDF
Learn BEM: CSS Naming Convention
PDF
SEO: Getting Personal
PDF
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
PDF
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
интернет статистика 2011
Five senses Poland - Kristýna Kroupová
Suplemento especial de Informesan: Cincuentenario ESAN
Top HR Processes Ripe for a Social Enterprise
Learn BEM: CSS Naming Convention
SEO: Getting Personal
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Ad

Similar to Colvin RMAN New Features (20)

PDF
RMAN in 12c: The Next Generation (PPT)
DOC
br_test_lossof-datafile_10g.doc
DOCX
Moving 12c database from NON-ASM to ASM
PPT
Upgrading 11i E-business Suite to R12 E-business Suite
PDF
Testing Delphix: easy data virtualization
PDF
Exam 1z0 062 Oracle Database 12c: Installation and Administration
PDF
The post release technologies of Crysis 3 (Slides Only) - Stewart Needham
PPT
040419 san forum
TXT
oracle dba
PPTX
Convert single instance to RAC
DOC
Oracle data guard configuration in 12c
PPTX
Synapse 2018 Guarding against failure in a hundred step pipeline
PDF
gDBClone - Database Clone “onecommand Automation Tool”
PPT
Champion Fas Deduplication
PDF
Rman 12c new_features
PDF
ZDLRA in Action
PDF
Presentation data domain advanced features and functions
PPTX
EMC Deduplication Fundamentals
PDF
Oow14 con7681-rman-1
DOCX
Physical_Standby_Database_R12.2.4
RMAN in 12c: The Next Generation (PPT)
br_test_lossof-datafile_10g.doc
Moving 12c database from NON-ASM to ASM
Upgrading 11i E-business Suite to R12 E-business Suite
Testing Delphix: easy data virtualization
Exam 1z0 062 Oracle Database 12c: Installation and Administration
The post release technologies of Crysis 3 (Slides Only) - Stewart Needham
040419 san forum
oracle dba
Convert single instance to RAC
Oracle data guard configuration in 12c
Synapse 2018 Guarding against failure in a hundred step pipeline
gDBClone - Database Clone “onecommand Automation Tool”
Champion Fas Deduplication
Rman 12c new_features
ZDLRA in Action
Presentation data domain advanced features and functions
EMC Deduplication Fundamentals
Oow14 con7681-rman-1
Physical_Standby_Database_R12.2.4

More from Enkitec (20)

PDF
Using Angular JS in APEX
PDF
Controlling execution plans 2014
PDF
Engineered Systems: Environment-as-a-Service Demonstration
PDF
Think Exa!
PDF
In Memory Database In Action by Tanel Poder and Kerry Osborne
PDF
In Search of Plan Stability - Part 1
PDF
Mini Session - Using GDB for Profiling
PDF
Profiling Oracle with GDB
PDF
Oracle Performance Tools of the Trade
PDF
Oracle Performance Tuning Fundamentals
PDF
SQL Tuning Tools of the Trade
PDF
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
PDF
Oracle GoldenGate Architecture Performance
PDF
OGG Architecture Performance
PDF
APEX Security Primer
PDF
How Many Ways Can I Manage Oracle GoldenGate?
PDF
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
PDF
Sql tuning made easier with sqltxplain (sqlt)
PDF
Profiling the logwriter and database writer
PDF
Fatkulin hotsos 2014
Using Angular JS in APEX
Controlling execution plans 2014
Engineered Systems: Environment-as-a-Service Demonstration
Think Exa!
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Search of Plan Stability - Part 1
Mini Session - Using GDB for Profiling
Profiling Oracle with GDB
Oracle Performance Tools of the Trade
Oracle Performance Tuning Fundamentals
SQL Tuning Tools of the Trade
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Oracle GoldenGate Architecture Performance
OGG Architecture Performance
APEX Security Primer
How Many Ways Can I Manage Oracle GoldenGate?
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Sql tuning made easier with sqltxplain (sqlt)
Profiling the logwriter and database writer
Fatkulin hotsos 2014

Recently uploaded (20)

PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Modernizing your data center with Dell and AMD
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
GamePlan Trading System Review: Professional Trader's Honest Take
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Monthly Chronicles - July 2025
Modernizing your data center with Dell and AMD
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Review of recent advances in non-invasive hemoglobin estimation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
CIFDAQ's Market Insight: SEC Turns Pro Crypto

Colvin RMAN New Features

  • 1. Oracle Database 12c – Recovery Manager New Features Presented by: Andy Colvin December 2, 2013
  • 2. About Enkitec —  Extensive Oracle Practice – 9 years old —  —  —  —  —  Education Database Migrations Performance Reviews Remote DBA Support Application Express —  Enkitec Extreme Exadata Expo —  Irving, TX —  June 2-3 —  http://www.enkitec.com/e4
  • 3. About Me —  Working around Oracle since 1999 —  Background in systems, network, database —  7 years at Enkitec —  Working on Exadata for 4 years —  Oracle ACE
  • 4. Why Talk About RMAN? —  Everybody should use RMAN —  It can be quite interesting —  I’m a fan of cruel and unusual punishment
  • 5. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 6. 12c Includes SYSBACKUP Role —  Special role that only has backup privileges —  For example, SYSBACKUP does not include SELECT ANY TABLE —  Recommended method for connecting to RMAN —  rman target ' "user/pass as sysbackup" '
  • 7. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 8. Pluggable Databases —  Oracle 12c introduces the concept of containers and pluggable databases —  Pluggable databases are “virtual” databases —  Pluggable databases share memory and redo logs
  • 9. Pluggable Database Support —  RMAN supports Pluggable Databases —  Back up entire Container Database or individual Pluggable Databases —  Container database – no changes —  PDB point in time recovery
  • 10. Containers vs Pluggable Databases —  Back up container databases like any “standard” database —  Afterwards, open all of your pluggable databases RMAN> 2> { 3> 4> 5> 6> } RMAN> RMAN> RUN SET UNTIL SCN 16747183; RESTORE DATABASE; RECOVER DATABASE; alter database open resetlogs; alter pluggable database all open;
  • 11. Pluggable Database Support RMAN> report schema; Report of database schema for database with db_unique_name PLUGGY List of Permanent Datafiles =========================== File Size(MB) Tablespace ---- -------- -------------------1 770 SYSTEM 3 610 SYSAUX 4 60 UNDOTBS1 5 250 PDB$SEED:SYSTEM 6 5 USERS 7 490 PDB$SEED:SYSAUX 8 250 PLUG1:SYSTEM 9 510 PLUG1:SYSAUX 10 5 PLUG1:USERS RB segs ------*** *** *** *** *** *** *** *** *** List of Temporary Files ======================= File Size(MB) Tablespace ---- -------- -------------------1 521 TEMP 2 20 PDB$SEED:TEMP 3 20 PLUG1:TEMP Maxsize(MB) ----------32767 32767 32767 Datafile Name -----------------------+DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE +DG/PLUGGY/DATAFILE/FILE Tempfile Name -------------------+DG/PLUGGY/TEMPFILE/FILE +DG/PLUGGY/TEMPFILE/FILE +DG/PLUGGY/TEMPFILE/FILE
  • 12. PDB Point In Time Recovery —  Recover PDBs individually RMAN> RMAN> 2> { 3> 4> 5> 6> } RMAN> alter pluggable database ERP close; RUN SET UNTIL SCN 1674493; RESTORE PLUGGABLE DATABASE ERP; RECOVER PLUGGABLE DATABASE ERP; alter pluggable database ERP open resetlogs;
  • 13. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 14. Running SQL From RMAN —  No More “SQL” Tags —  Previous versions didn’t support SELECT statements —  Useful within backup scripts
  • 15. Running SQL From RMAN (2) RMAN> select sysdate from dual; SYSDATE --------11-FEB-13 RMAN> desc dba_pdbs Name Null? --------------------------PDB_ID NOT NULL PDB_NAME NOT NULL DBID NOT NULL CON_UID NOT NULL GUID STATUS CREATION_SCN NOT NULL Type ---------------------------NUMBER VARCHAR2(128) NUMBER NUMBER RAW(16) VARCHAR2(13) NUMBER
  • 16. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 17. Recover Table —  Recover tables from backups —  Useful when you can’t use flashback —  Recover tables or table partitions —  Remap table names using datapump syntax —  Must connect with SYSDBA or SYSBACKUP credentials
  • 18. Recover Table (2) RMAN> RECOVER TABLE ACOLVIN1.T 2> UNTIL SCN 1674493 3> AUXILIARY DESTINATION '+DATA' 4> DATAPUMP DESTINATION '+DATA' 5> REMAP TABLE 'ACOLVIN1'.'T':'T_RECOVERED';
  • 19. Recover Table - Process —  RMAN automatically finds necessary backupsets —  Auxiliary database created with backupsets —  Data pump export file automatically created —  RMAN performs data pump import of the tables to be recovered (optional) —  RMAN cleans up after itself, deleting datapump file and temporary instance files
  • 20. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 21. Cross-Platform Backup/Restore —  Utilizes backupsets (smaller backups to transport) —  Great for migrations – “read-only” requirement removed —  Allows for shorter downtime when moving across platforms
  • 22. Cross-Platform Backup/Restore (2) 1.  Perform backup of the source tablespaces 2.  Restore to the new target database 3.  Take periodic incremental backups and recover on target 4.  Place source tablespaces in read-only mode, take final incremental backup and export metadata 5.  Restore final incremental backup to target database 6.  Import tablespace metadata into target database
  • 23. What’s New? —  New Security Roles —  Pluggable Databases —  Run SQL from RMAN —  Recover Table —  Cross-Platform Restore —  Active Duplicate Enhancements
  • 24. RMAN Duplicate – Old School —  Each channel is assigned a datafile —  Files assigned to channels starting with largest first —  When a file is finished, the next largest available file is copied —  Works perfectly when all datafiles are same size —  What if we have different sized datafiles?
  • 25. What Does This Mean? —  Imagine dozens of datafiles —  Ranging from 50GB to 9TB —  Allocate too many channels, they will sit idle —  Don’t allocate enough channels, wait on largest datafiles ***This is changed in 12c*** —  Active duplicate utilizes backupsets
  • 26. RMAN Duplicate Channel Allocation Source Database File 1 1TB File 5 10GB File 2 50GB File 6 10GB File 3 10GB File 7 10GB File 4 20GB File 8 10GB RMAN Channel 1 RMAN Channel 2 Target Database
  • 27. Active Duplicate Enhancements —  Active duplicate defaults to use backupsets —  This gives us all of the benefits of backupsets, with active duplicate —  PIECE SIZE —  COMPRESSION —  Empty space moves much faster
  • 28. Active Duplicate Enhancements —  Example code RMAN> run { 2> allocate channel d1 device type disk; 3> allocate channel d2 device type disk; 4> allocate channel d3 device type disk; 5> allocate auxiliary channel s1 device type disk; 6> duplicate target database for standby 7> from active database piece size 500M; 8> }
  • 29. Active Duplicate Enhancements —  What the output looks like channel s1: starting datafile backup set restore channel s1: using network backup set from service cloudy channel s1: specifying datafile(s) to restore from backup set channel s1: restoring datafile 00001 to +SMITHERS/windy/datafile/ system.273.807276333 channel s1: restoring section 1 of 2 channel s1: restore complete, elapsed time: 00:00:15 channel s1: starting datafile backup set restore channel s1: using network backup set from service cloudy channel s1: specifying datafile(s) to restore from backup set channel s1: restoring datafile 00001 to +SMITHERS/windy/datafile/ system.273.807276333 channel s1: restoring section 2 of 2
  • 30. Active Duplicate Enhancements —  Let’s look closer —  Using a utility called dstat, we can see what’s going on —  dstat -dnyc -D xvda,xvde,xvdf,xvdg -N eth0 -C total —  Using a utility called dstat, we can see what’s going on
  • 31. Active Duplicate Enhancements --dsk/xvda----dsk/xvde----dsk/xvdf----dsk/xvdg- --net/eth0- ----total-cpu-usage---read writ: read writ: read writ: read writ| recv send||usr sys idl wai hiq siq 0 0 : 0 35M: 0 32M:8192B 34M| 13M 289k|| 1 0 90 9 0 0 0 0 : 0 36M: 0 39M: 0 36M| 109M 2168k|| 1 1 97 1 0 1 0 0 : 0 37M: 32k 37M: 32k 38M| 116M 2299k|| 1 1 97 0 0 empty datafile 1 0 0 : 0 38M: 0 37M: 0 37M| 116M 2345k|| 1 1 97 0 0 1 0 0 : 32k 21M: 96k 22M: 56k 21M| 65M 1311k|| 0 1 97 1 0 0 0 0 : 16k 0 : 16k 16k: 32k 16k| 52B 508B|| 0 0 100 0 0 0 0 0 : 16k 4096B: 32k 0 : 48k 0 | 11k 10k|| 0 0 100 0 0 0 0 4096B: 0 46M: 32k 44M: 16k 44M| 548B 743B|| 1 0 85 14 0 0 0 0 : 0 44M: 0 46M: 24k 46M| 532B 1220B|| 1 0 84 15 0 0 0 16k: 0 26M: 0 29M:8192B 29M|1065k 26k|| 1 0 90 9 0 0 0 0 : 16k 48M: 16k 45M: 32k 42M| 296B 450B|| non-empty14 1 0 85 0 datafile 0 0 0 : 0 46M: 0 46M: 0 46M| 426B 759B|| 1 0 84 15 0 0 0 0 : 0 43M: 0 46M: 0 49M| 584B 434B|| 1 0 85 14 0 0
  • 32. A Few More Things… —  Recover/Restore files over network —  Image copy backups support section size —  Storage snapshot optimizations —  Specify that duplicated database does not open after duplication
  • 33. Questions? Contact Information: Andy Colvin email - andy.colvin@enkitec.com web - http://www.enkitec.com blog- http://blog.oracle-ninja.com twitter - @acolvin