partner webcast - oracle database 12c recovery manager (rman)

59

Upload: oracleimc-isv-migration-center

Post on 11-May-2015

1.466 views

Category:

Technology


6 download

DESCRIPTION

Oracle is offering a comprehensive set of Database High Availability capabilities that seamlessly work together to help reduce both planned and unplanned downtime. Oracle Maximum Availability Architecture (MAA) provides with a best practices blueprint that can significantly reduce the cost and complexity of database high availability deployments. A complete high availability and disaster recovery strategy requires dependable data backup, restore, and recovery procedures. Oracle Recovery Manager (RMAN) is practical, simple, powerful and ready to deliver solution that provides a comprehensive foundation for efficiently backing up and recovering the Oracle database. [Read More @ https://blogs.oracle.com/imc/entry/oracle_database_12c_recovery_manager]

TRANSCRIPT

Page 1: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)
Page 3: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Database 12c Recovery Manager (RMAN)

Okcan Yasin Saygılı IMC DB&DBO [email protected]

Oracle Confidential – Internal

Page 4: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Program Agenda

• Oracle Recovery Manager (RMAN)

• RMAN Backup Concepts

• RMAN Backup Overview

• RMAN Backup Performance

• New in Oracle Recovery Manager for Oracle Database 12c

• Oracle Cloud Service for Database Backup

• Summary – Q&A

Page 5: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Recovery Manager (RMAN) Getting Started with RMAN Recovery Manager Architecture Starting and Interacting with the RMAN Client Configuring the RMAN Environment Using Flashback Database and Restore Points

Page 6: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Database 12c Extreme Availability

• Oracle Database 12c introduces significant new HA capabilities that

– Drastically cut down planned and unplanned downtime

– Eliminate compromises between HA and Performance

– Tremendously boost operational productivity

• These take Availability to unprecedented new levels

– Next-generation Maximum Availability Architecture (MAA)

– Optimized for Oracle

Page 7: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Maximum Availability Architecture

Active Data Guard – Data Protection, DR – Query Offload

GoldenGate – Active-active – Heterogeneous

RMAN, Oracle Secure Backup – Backup to tape / cloud

Active Replica

Edition-based Redefinition, Online Redefinition, Data Guard, GoldenGate – Minimal downtime maintenance, upgrades, migrations

RAC – Scalability – Server HA

Flashback – Human error

correction

Production Site Application Continuity – Application HA

Global Data Services – Service Failover / Load Balancing

Page 8: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Unplanned Downtime

• Physical Failures – Component : server, disk, network, memory

– Network : routers, switches, cables

– Deletion/corruption of physical files

• Logical Failures – Operational errors

– Human errors

– Bad installs and upgrades

– Logical errors in applications

• Site Failures – Whole site down / Physical Failure

Page 9: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Protection Technologies All About RTO & RPO

Technology Protection Against

Type of Failure Downtime

Recovery Time Objective , RTO

Data Loss Exposure Recovery Point Objective , RPO

Oracle Secure Backup Physical Hours/Days Days/Hours

(from last backup)

Recovery Manager (RMAN) Physical Hours/Days Hours

(from last backup)

Flashback Technologies Logical Minutes/Hours Minutes/Hours

(from point-in-time)

Data Guard Site Failure / DR Seconds/Minutes Zero/Seconds

Page 10: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

What is Recovery Manager (RMAN)?

• Comprehensive built-in backup & recovery tool for Oracle Databases

• Operations – Backup: Backup complete or partial Oracle database components

– Restore: Restore complete or partial components from the backup (depends on the type of failure)

– Recover: Make the restored data consistent

• Smallest Database Unit – Data Block

– Extent Segments Tablespaces Data Files (Physical)

Page 11: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Recovery Manager (RMAN) Database Integrated Backup and Recovery

• Unique knowledge of database file formats and recovery procedures

– Oracle block validation

– Table/partition-level recovery

– Online block-level recovery

– Native encryption, compression

– Oracle Multitenant support

• Disk, Tape and cloud backups

• Unified Management

Oracle

Enterprise

Manager

Tape Drive

Amazon S3

RMAN

Data Files Fast Recovery

Area (FRA)

Ora

cle

Secu

re

Backu

p

Oracle Public

Cloud

(Future)

Page 12: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

What Does RMAN Backup?

• Control File : Metadata of the database – such as System change number (SCN)

• Server Parameter : Also called Initialization Parameter (location and configuration data – DB startup)

• Data Files : System & User data (System, SYSAUX, UNDO, TEMP, USER)

• Archived logs : Online redo logs archived before over-written (ARCH Processes) **

• No need to place the database in BACKUP mode !!

Data Files Control File Server Parameter File

Archived Redo Log Files

** Online redo logs : Transaction entries logged – both committed & uncommitted

Page 13: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Delivers…. Comprehensive Protection for the Oracle Database

• Effectively manage RMAN backup / recovery via command line or Oracle Enterprise Manager (EM)

• RMAN backup destinations: “DISK” or “SBT*”

– RMAN writes to “DISK” destinations

– The “sbt” destination stands for System Backup to Tape which is Oracle’s API for backing up and restoring via integration with media management software such as Oracle Secure Backup or 3rd party vendors.

– Oracle Secure Backup, NetBackup etc.

• Backup options to provide maximum flexibility:

– Image copy: Exact block-to-block copy of the database files

– Backup set: RMAN-specific proprietary backup format (binary)

Page 14: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Client and Configuring the Environment

• You have the following basic options for starting RMAN: Start the RMAN executable at the operating system command line without specifying any connection options,

• as in the following example:% rman

• o simplify ongoing use of RMAN, you can set a number of persistent configuration settings for each target database. These settings control many aspects of RMAN behavior.

• You can use the SHOW and CONFIGURE commands to view and change RMAN configurations.

Page 15: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Recovery Manager (RMAN) Backup Concepts Consistent and Inconsistent RMAN Backups Online Backups and Backup Mode Backup Sets Image Copies Multiple Copies of RMAN Backups Control File and Server Parameter File Autobackups Incremental Backups Backup Retention Policies Backing Up the Database

Page 16: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Consistent and Inconsistent RMAN Backups

• A database is in a consistent state after being shut down with the SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL commands.

• A consistent shutdown guarantees that all redo has been applied to the data files.

• If you mount the database and make a backup at this point, then you can restore the database backup later and open it without performing media recovery.

• A backup made when the database is open is inconsistent, as is a backup made after an instance failure or SHUTDOWN ABORT command. When a database is restored from an inconsistent backup,

• Oracle Database must perform media recovery before the database can be opened, applying changes from the redo logs that took place after the backup was created.

http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8003

Page 17: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Online Backups and Backup Mode

• When performing a user-managed backup of an online tablespace or database, an operating system utility can back up a data file at the same time that the database writer (DBWR) is updating the file.

• It is possible for the utility to read a block in a half-updated state, so that the block that is copied to the backup media is updated in its first half, while the second half contains older data.

Page 18: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Backup Sets and Image Copies

• There are some differences between backup and image copy.

• A backup set contains the data from one or more data files, archived redo logs, control files, or server parameter file.

• A backup set contains one or more binary files in an RMAN-specific format. Each of these files is known as a backup piece. A backup set can contain multiple data files. For example, you can back up 10 data files into a single backup set consisting of a single backup piece

• An image copy is an exact copy of a single data file, archived redo log file, or control file. Image copies are not stored in an RMAN-specific format.

• They are identical to the results of copying a file with operating system commands.

Page 19: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Backup Options

Use Cases

Image Copy Backup • RMAN “DISK” destination only

• Block to block copy of database except for temp files

• Level 0 backup (Base Image) used with an Incrementally Updated Backup Strategy (synthetic fulls)

• Cannot be compressed or encrypted by RMAN

• Most common use cases:

• Incrementally Updated Backup Strategy

• Cross platform migration (using CONVERT)

• ZFS cloning solution

Backup Set Backup • RMAN “DISK” or “SBT” destinations

• Smaller backup size than an image copy backup due to RMAN null and unused block compression

• Most widely deployed backup type

• Can leverage RMAN compression or encryption capabilities

• Most common use cases:

• Full / incremental backup strategy

• Tape or cloud backups

• Long-term retention on disk

Page 20: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Multiple copies of RMAN

2 ways for make multiple copies on RMAN,

• Duplex backups with the BACKUP ... COPIES command, in which case RMAN creates multiple copies of each backup set

BACKUP DEVICE TYPE DISK COPIES 3 DATAFILE 7 FORMAT '/tmp/%U','?/oradata/%U','?/%U';

• Back up your files as backup sets or image copies, and then back up the backup sets or image copies with the RMAN BACKUP BACKUPSET or BACKUP COPY OF commands

BACKUP DEVICE TYPE DISK AS BACKUPSET DATABASE PLUS ARCHIVELOG;

http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8003

Page 21: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Incremental Backup

• Incremental Backup is an important backup type.

• A full backup has no effect on subsequent incremental backups and is not considered a part of an incremental backup strategy. Image copies are always full backups because they include every data block in a data file.

• In contrast to a full backup, an incremental backup copies only those data blocks that have changed since a previous backup.

• You can use RMAN to create incremental backups of data files, tablespaces, or the whole database.

http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8003

Page 22: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Retention Policy

• Oracle 12c provide some retention policy with below syntax.

• You can use the CONFIGURE RETENTION POLICY command to create a persistent and automatic backup retention policy.

• When a backup retention policy is in effect, RMAN considers a backup of data files or control files as an obsolete backup, that is, no longer needed for recovery, according to criteria specified in the CONFIGURE command.

• You can use the REPORT OBSOLETE command to view obsolete files and the DELETE OBSOLETE command to delete them.

http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8003

Page 23: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Common RMAN Configuration Settings ….Not Set By Default

Description Benefits Cons

Archived log mode

•Ability to recover to any point in time •Enables online backup operations

Requires more storage space to accommodate both online redo and archived logs

Block Change Tracking (BCT)

Enables fast incremental backups. Without BCT, RMAN would have to scan the entire database to determine which blocks are changed during incremental backups.

MINIMAL overhead on the database server

Control file automatic backup

•Database recoverability even if current control file, recovery catalog is inaccessible. •When in archived log mode, it is backed up automatically when database structural changes are updated.

None

Page 24: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Multi-Tiered Backup Strategy Retention Example

• Customer requirement:

– 7 day recovery capability from disk • Weekly full and daily incremental backups

– 3 month retention on tape • Daily backup from disk to tape

• Set RMAN recovery window = 3 months – CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 90 DAYS;

Page 25: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Multi-Tiered Backup Strategy – Cont’d Script Example

• Weekly script: – BACKUP AS BACKUPSET INCREMENTAL LEVEL 0 DATABASE PLUS

ARCHIVELOG;

– BACKUP BACKUPSET NOT BACKED UP TO DEVICE TYPE SBT;

– DELETE OBSOLETE DEVICE TYPE DISK RECOVERY WINDOW OF 7 DAYS;

– DELETE OBSOLETE;

• Daily script: – BACKUP AS BACKUPSET INCREMENTAL LEVEL 1 DATABASE PLUS

ARCHIVELOG;

– BACKUP BACKUPSET NOT BACKED UP TO DEVICE TYPE SBT;

-- Full backup to disk -- Backs up all backup sets to tape IF not already

done -- Deletes files no longer needed for recovery

window: a) 7 days on disk b) Per configured retention policy (90 days

in example)

-- Incremental backup to disk -- Backs up all backup sets to tape IF not already

done

Page 26: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Multi-Tiered Backup Strategy – Cont’d Storage Requirements

• Determining storage needed to meet 7 day disk retention period (Full/incremental strategy) – add the following: – Size of two full backups (backup set not image copy)

– Size of 12 incremental backups

– Size of 14 days worth of archived logs

• Tape backup for 90 days / 3 months – add the following: – Size of weekly fulls over retention time (12 in this example)

– Size of daily Incrementals (6 per week * 12)

– Archived logs for full retention period

Page 27: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Recovery Manager (RMAN) Backup Overview Specifying Backup Output Options Backing Up Database Files with RMAN Backing Up CDBs and PDBs in Oracle DB12c Backing Up Archived Redo Logs with RMAN Making and Updating Incremental Backups

Page 28: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Backing Up CDBs and PDBs in Oracle DB12c

• RMAN and Oracle Enterprise Manager Cloud Control provide full support for backup and recovery in a multitenant environment.

• The multitenant architecture enables an Oracle Database to function as a CDB. You can back up and recover a whole CDB, the root only, or one or more PDBs.

• You can also back up and recover individual tablespaces and data files in a PDB.

• Oracle Database 12c Backup Types

– 1.Container Database Backup

– 2.Plugable Database Backup

– 3.Tablespace Backup

Page 29: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Backing Up Archived Redo Logs with RMAN

• In a CDB, archived redo logs can be backed up only when you connect to the root as a common user with the SYSDBA or SYSBACKUP privilege.

• When you connect to a PDB as a local user with SYSDBA or SYSBACKUP privilege, you cannot back up or delete archived redo logs.

• If your archived redo logs are being copied to multiple destinations, when you connect to the root and backup archived redo log files, RMAN includes only one copy of the archived redo log files in a backup.

Page 30: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

RMAN Incremental Backup Strategies

Incremental Forever Strategy

• Uses Image Copy method

• Initial RMAN image copy backup to disk

• Subsequently, backup only the changes (incremental)

• Merge the incremental with the base image

• Allows “SWITCH TO COPY” capability

• On-disk retention of 1-7 days

• RMAN compression applicable to the incremental and archived log backups

• RMAN “BACKUP RECOVERY AREA” or BACKUP COPY OF to make addition copies

Full / Incremental Strategy

• Uses Backup Set method

• RMAN backup set backup operation to:

Disk - retention from days to weeks

Tape – retention from weeks to years

Cloud – retention from weeks to years

• RMAN compression applicable to full , incremental and/or archived log backups

• RMAN “BACKUP BACKUPSET” to make additional copy of the backup to disk or tape

High Availability Space Optimization

Page 31: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Incrementally Updated Backups

Database

Day 1

IMAGE COPY backup

Day 2

Day 3

Well-suited for: – No Restore situation (SWITCH TO COPY) – Cloning / Additional copy – Environments where disk can be allocated as the

same size of the database

Level 1

Level 0

Level 1

Day 1

Day 2

Day 3

Day 4

Page 32: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Incrementally Updated Backup Strategy Example Script – 7 Day Recovery Window

• Set the RMAN retention period: RMAN> configure retention policy to recovery window of 7 days;

• Daily script to roll forward the image copy and take incremental backup (maintains 7-day-old image copy);

RMAN> RECOVER COPY OF DATABASE WITH TAG DB_BACKUP UNTIL TIME ‘SYSDATE-8’;

RMAN> BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG ‘DB_BACKUP' DATABASE;

Page 33: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Weekly Full & Daily Incremental Backups Database

Day 1

Level 1 Incremental Backup

Level 0 Backup Set

Level 1 Incremental Backup

Well-suited for: – Databases that can tolerate hours/days RTO – Environments where tape and/or second-tier disks are available (e.g. ZFSSA) – Low-medium change frequency between backups, e.g. < 20%

Day 2

Day 3

Backup Set backup

Page 34: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Data Block – Proprietary Format Unique To Oracle Databases

• Oracle Database manages its logical storage in data blocks

– Minimum unit of I/O

• Oracle Data blocks have a well-defined structure

– Data stored in rows

– Block header

• General block information

• Block Address,

• Type of Segment

• Block Extent Segments

Page 35: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Directory of Oracle Database Blocks

Block Headers

• Block number defines the position of the block from beginning of datafile

– Unique identifier

Oracle Datafile Blocks… Datafile A Datafile B

1A 2A 3A 4A 5A 6A 1B 2B 3B 4B 5B 6B

Backup Piece

1A 1B 2A 3A 2B 5A 3B 4B 6A 5B

Oracle Backup (RMAN) Blocks…

• Datafile blocks are logically grouped into backup pieces

• Ordering of blocks within a backup piece different than the datafile block #

Headers differ

Translating to different block headers / numbers between backup operations -- Only RMAN can map backup block to a datafile block

Page 36: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

What Storage Deduplication Ratios to Expect?

• Typical storage deduplication ratios for RMAN backup set backups

– Full backups in the low, single-digits range

– Incremental backups – minimal, if any

– Archived log backups - zero

Oracle Database

Page 37: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Recovery Manager (RMAN) Performance & Tuning Improved Performance: Faster Clone and Standby Database Creation in Oracle DB12c

Page 38: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Performance Tuning – Read Phase • Determine the throughput of input disk, output media, and network

– RMAN performance impacted by the slowest component

• Configure disk subsystem for optimal performance

– Utilize Automatic Storage Management (ASM) and use separate DATA and FRA disks

• Tune RMAN to fully utilize the disk subsystem and tape

– Use asynchronous enabled I/O

– If not natively supported by the system (very rare), set DBWR_IO_SLAVES which allocates four slave processes per session

– For tape set BACKUP_TAPE_IO_SLAVES which allocates one slave process per channel

• Adjust # of input buffers by tuning MAXOPENFILES and FILESPERSET

– # of input buffers and sizes allocated based on the multiplexing number

• With Oracle Database 11g Release 2 and above, for ASM based input source, input buffers are automatically sized for optimal performance

Refer MOS note 1072545.1

Page 39: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Performance Tuning – Copy Phase

• RMAN encryption and compression are both CPU intensive operations

• If CPU becomes a bottle neck when using compression:

– Consider a less CPU intensive compression level such as LOW or MEDIUM

– Verify that uncompressed backup performance scales properly, as channels are added

• If CPU becomes a bottle neck when using RMAN encryption:

– Review the encryption algorithm - AES128 consumes the least CPU compared to AES256

– If TDE column or tablespace encryption used, review RMAN encryption requirement

• TDE encrypted columns are double encrypted

• TDE tablespace encryption remains encrypted in the backup and is not double encypted

Refer MOS note 1072545.1

Page 40: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Performance Tuning – Write Phase

• Tune the RMAN output buffer size

– Output buffers => blocks written to “disk” or “sbt” destination

– Four buffers allocated per channel

• Default size: “disk” = 1 MB and “sbt” = 256 KB

• “Disk” output buffer count and size can be manually adjusted – See MOS note 1072545.1

• Tune “sbt” buffer by (no changes needed for OSB):

– Adjusting the BLKSIZE channel parameter

– Set BLKSIZE >= media management client buffer size

• With Oracle Database 11g Release 2 and above, for ASM as the destination, output buffers are automatically sized for optimal performance

Refer MOS note 1072545.1

Page 41: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

BACKUP VALIDATE • Reads all the input data • Checks for corruption • Discards data from output

buffer

RESTORE VALIDATE • Trial recovery • Reads backup data but does

not restore

Views • V$BACKUP_ASYNC_IO

• V$BACKUP_SYNC_IO

Troubleshooting IO Problem

Page 42: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Diagnosing Performance Bottlenecks BACKUP VALIDATE Vs Actual Time to Backup

Actual Backup Time Compared to BACKUP

VALIDATE

Potential Problem Phase

Recommendation

Both backup timings almost similar

Read Phase

• Tune multiplexing • Investigate slow performing input files with long waits • Add more disks / Spread file • Query Effective Bytes per Second from

V$BACKUP_ASYNC_IO

Actual backup taking longer

Copy or Write Phase

• Check RMAN compression algorithm • Check RMAN encryption algorithm • For disk, check throughput / add more disks to the

output location • For Tape, check MML configuration settings & the

hardware itself. Refer to the vendor documentation

Page 43: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Tunable Parameters

• Check V$BACKUP_ASYNC_IO and V$BACKUP_SYNC_IO for number & size of RMAN buffers used

• Recommended: Change RMAN buffer using Multiplexing method (MAXOPENFILES, FILESEPERSET) and use of ASM

• List of hidden parameters – _backup_ksfq_bufcnt <= Deprecated as of 11gR2 – _backup_ksfq_bufsz <= Deprecated as of 11gR2 – _backup_disk_bufsz – _backup_disk_bufcnt – _backup_seq_bufsz – _backup_seq_bufcnt – _backup_file_bufsz – _backup_file_bufcnt – _db_file_direct_io_count

• Values for these parameters depend on the database version. Refer MOS note 1072545.1

Page 44: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

New in RMAN for Oracle Database 12c Fine-Grained Recovery: Table Recovery from Backup Simplify Platform Migration: Cross-Platform Backup & Restore Improved Performance: Faster Clone and Standby Database Creation Multitenant Database: Pluggable Database Backup & Recovery

Page 45: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Table Recovery From Backup Fine-Grained Recovery

• Simple RECOVER TABLE command to recover one or more tables/partitions (most recent or older version) from an RMAN backup

• Eliminates time and complexity associated with manual restore, recover & export

– Enables fine-grained point-in-time recovery of individual tables/partitions instead of the contents of the entire tablespace

• Useful when Flashback Table / Flashback Drop not usable

RECOVER TABLE SCOTT.EMP UNTIL TIME 'SYSDATE-1'

AUXILIARY DESTINATION '/tmp/oracle/recover‘;

1 0 1

0 1 0 1 0

1 1 1 0 1 0 0 1

1 0 1 1 0 1 1 1 1 0

0 0 1 0 1 0 0 0 0

1 0 0 1 1 0 1

1 0 1 0

0 1 RMAN

Backups

Page 46: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Table Recovery: Under the Hood

1. Regular RMAN backups are taken using DISK and/or SBT channels.

2. Upon RECOVER TABLE, an auxiliary instance is started using the primary control file, SYSTEM, SYSAUX, UNDO, and user tablespaces containing the table(s).

3. Auxiliary instance is recovered to the desired time/SCN.

4. Tables are imported by primary instance via SQL*Net.

RMAN Backups

Primary Instance

Auxiliary Instance

Data Pump Import

1 2

3

4

Page 47: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

1 1 1 0 1

1 0 1 1 0 1 1 1 1 0 1

0 0 1 0 1 0 0 0 0 1

1 0 0 1

1 1 1 0 1

1 0 1 1 0

1 1 1 1 0 1

0 0

1 0 1 0

0 0

0 1

1 0 0

1

Cross-Platform Backup & Restore Simplified Platform Migration

• Simplifies procedure for platform migration

– Cross-platform Transportable Database : Same endian, Tablespaces : Same or across endians

• Minimize read-only impact using incremental-based approach

• New 12c Syntax: FOR TRANSPORT / TO PLATFORM

Source Database (AIX)

Backup User Tablespaces & DataPump Metadata Export

to Disk/Tape

Restore Backup & Plugin Tablespaces

(includes platform conversion)

Destination Database (Linux)

1

2

3 Copy Backup To Destination

Page 48: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Database 12c Active DUPLICATE Improved Performance via Reduced Network Consumption

• New Active DUPLICATE

– Utilizes clone database channels to pull (i.e. restore) data files and archived logs from source database

– Configure or allocate AUXILIARY channels >= TARGET channels

– Data files are packaged as backup sets – much smaller than copies • RMAN compression and multi-section settings can also be specified

Data File & Archived Log Backup Sets

Source Database Clone Database

Initiate RESTORE request

Page 49: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Fast Standby Database Synchronization Simplified Standby Sync-Up with Primary Database

• Run command connected to standby database as TARGET and primary as AUXILIARY

RECOVER DATABASE FROM SERVICE <PRIMARY DB SID>

• Generates incremental backup on primary as of the current SCN on standby database

• Incremental backup pulled from primary & applied on standby data files to sync up changes

• Refer to documentation for full procedure details:

Incremental Backup + Apply

Primary Database (AUXILIARY)

Standby Database (TARGET)

Initiate Incremental Restore Request

Page 50: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Consolidate and Protect Data RMAN with Oracle Multitenancy

• Backup & Recovery

– CDB: Container Database (CDB) level backup protects all of its Pluggable Databases (PDB)

– PDB: Individual PDBs can also be backed up in isolation

• Point in Time Recovery

– CDB: All PDBs recovered to same point in time

– PDB: Individual PDB can be recovered with no impact on other PDBs

Page 51: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Multitenant Database Backup & Restore

• New PLUGGABLE DATABASE and ROOT keywords

• Connect in RMAN as: • ROOT common user: Backup, Restore, Recover CDB or selected PDBs

• PDB local user: Backup & Restore PDB (excludes archived logs)

• Backup commands as ROOT user: – RMAN> BACKUP DATABASE; -- Backup CDB, including all PDBs

– RMAN> BACKUP (PLUGGABLE DATABASE <PDB1>, <PDB2>);

– RMAN> BACKUP TABLESPACE <PDB1>:<TBS1>, <PDB2>:<TBS1>;

• Restore commands as ROOT user: – RMAN> RESTORE DATABASE; -- Restore CDB, including all PDBs

– RMAN> RESTORE DATABASE ROOT; -- Restore ROOT data files

– RMAN> RESTORE PLUGGABLE DATABASE <PDB1>;

– RMAN> RESTORE TABLESPACE <PDB2>:<TBS1>;

Page 52: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Cloud Service For Database Backup

Page 53: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Cloud Service For Database Backup

• Backup and recovery of application data is the fundamental protection strategy for maintaining enterprise business continuity.

• Depending on the specific RTO (recovery time objective) and RPO (recovery point objective) for each database, different Oracle Maximum Availability Architecture (MAA) strategies can be deployed by the enterprise. From the backup and recovery perspective, the following are general practice guidelines that customers typically follow to address RTO and RPO requirements: • Local Fast Recovery Area (FRA): Typically stores backups for up to 7 days • External Storage (NAS): up to 30 days • Tape media (if available): 1 to 6 months • Tape vaulting (offsite storage): months to years

Oracle Confidential – Internal/Restricted/Highly Restricted 56

Page 54: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

How does this process work?

During the backup process • The Oracle Database Cloud Backup Module (ODCBM) receives backup blocks from RMAN, • Chunks them into 20MB blocks and transmits to Oracle cloud. During the restore process, the same module retrieves data from the Cloud. The Oracle Database Cloud Backup Module is configured as SBT (Tape)

Page 55: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle Database 12c RMAN Continues the Innovation...

• Fine-Grained Recovery: Table Recovery from Backup

• Simplify Platform Migration: Cross-Platform Backup and Restore

• Improved Performance: • Fast Clone and Standby Database Creation

• Fast Synchronization of Standby Database

• Multitenant Database: Pluggable Database Backup and Recovery

• More Efficient Backups: Multisection Incrementals and Image Copies

• Enhanced Separation of Duty: SYSBACKUP Privilege

•…

Page 56: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Resources

• Recovery Manager (RMAN) http://www.oracle.com/goto/rman

• OTN HA Portal http://www.oracle.com/goto/availability

• Oracle Secure Backup (OSB) http://www.oracle.com/goto/osb

• Oracle Cloud - Database Backup https://cloud.oracle.com/database_backup

• Oracle DB 12c Backup & Recovery @ Oracle Learning Library https://apex.oracle.com/pls/apex/f?p=44785:24:0::::P24_CONTENT_ID,P24_PREV_PAGE:8108,1

Page 57: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Q&A

60

Okcan Yasin Saygılı Oracle ISV Migration Center Consultant [email protected] ISV Migration Center blog: http://blogs.oracle.com/imc ISV Migration Center email: [email protected]

Page 58: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

• Oracle.com Partner Hub oracle.com/partners/goto/hub-ecemea

• Migration Center Team Blog blogs.oracle.com/imc

feeds.feedburner.com/oracleIMC

• Partner Webcast Recordings youtube.com/OracleIMCteam

• Partner Webcast Presentations slideshare.net:/Oracle_IMC_team

[email protected]

Oracle Partner Hub ISV Migration Center • twitter.com/OracleIMC

• plus.google.com/+OracleIMC

• facebook.com/OracleIMC

• linkedin.com/groups/Oracle-Partner-Hub-Migration-Center-4535240

Page 59: Partner Webcast - Oracle Database 12c Recovery Manager (RMAN)