RMAN Best Practices For Real Application Clusters (RAC) : Presented By: Syed Jaffer Hussain Slide # 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

RMAN best practices for Real Application Clusters (RAC)

Presented by : Syed Jaffer Hussain

Slide # 1

Know your presenter


Syed Jaffer Hussain Database Support Manager 20 years IT experience 11+ years as an Oracle DBA Oracle ACE Director Oracle 10g Certified Master(OCM) Oracle 10g RAC Certified Expert Oracle Certified Professional(OCP) v8i,9i,10g & 11g ITIL v3 Foundation Certified Authored Oracle 11g R1/R2 Real Application Clusters Essentials Twitter: @sjaffarhussain http://jaffardba.blogspot.com

Presented by : Syed Jaffer Hussain

Slide # 2

Managing backup and recovery operations in RMAN for RAC and non-RAC databases are nearly identical .

Presented by : Syed Jaffer Hussain

Slide # 3

What will be covered


RAC Vs RMAN why and when. RMAN overview. Multi-channel configuration Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 4

RAC Vs RMAN why and when


Real Application Clusters (RAC)
High Availability(HA) Failover.

Recovery Manager (RMAN)


A command-line and EM tool.

Scalability Load balancing. It doesnt safeguard your data from hardware failures or from any disasters.

Best used for all sort of database backup & recovery operations.

It doesnt provide high availability

Presented by : Syed Jaffer Hussain

Slide # 5

What will be covered


RAC Vs RMAN why and when. RMAN overview. Multi-channel configuration. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery using Enterprise Manager(EM).

Presented by : Syed Jaffer Hussain

Slide # 6

RMAN overview
Recovery Manager
Was first commercially introduced with Oracle v8. A command-line and EM based tool. Comes for absolutely free of cost, installed and configured by default. Intended for: o Online/Offline backup and restore procedures. o Can back up Database, Tablespace, Datafile, and Archived logs. Supports incremental, fast incremental, compressed & encrypted backups. Detects [ALSO can repair ] data block corruptions. Must required to backup datafiles configured on Automatic Storage Management (ASM). Can validate (test) backup without actually restoring.

Courtesy from Oracle docs.

Presented by : Syed Jaffer Hussain

Slide # 7

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 8

Configure multiple channels


Multiple channel configuration for RAC db instances
Scale up the back up load on to multiple instances of RAC database by configuring multiple channels.
RACDB1

Channel 1 RACDB

RMAN>

Channel 2
RACDB2

Presented by : Syed Jaffer Hussain

Slide # 9

Configure multiple channels


Working examples
One time configuration in RMAN RMAN> CONFIGURE DEVICE TYPE disk/tape PARALLELISM 2; RMAN> CONFIGURE CHANNEL ch1 CONNECT sys/password@tns_inst1; RMAN> CONFIGURE CHANNEL ch2 CONNECT sys/password@tns_inst2; One time configuration with service name RMAN> CONFIGURE DEVICE TYPE disk/tape PARALLELISM 2; RMAN> CONFIGURE CHANNEL ch1 CONNECT sys/password@service_name; Run time configuration RUN { ALLOCATE CHANNEL ch1 CONNECT sys/password@tns_inst1; ALLOCATE CHANNEL ch2 CONNECT sys/password@tns_inst2; backup database ; RELEASE CHANNEL ch1; RELEASE CHANNEL ch2; }
Ensue LOAD_BALANCE turned on no TO TAF (failover)

Presented by : Syed Jaffer Hussain

Slide # 10

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 11

Parallel recovery in RAC


Apply parallelism to faster restore/recovery operations
Parallelism can be applied for instance, crash and media recovery operations to faster the process.

During instance/crash recovery, Oracle database automatically applies the optimum degree of parallelism. Based on the CPU count, Oracle sets an optimum number of parallelism while applying archive logs. Setting RECOVERY_PARALLELISM initialization parameter value to 0 or 1 disables instance/crash parallelism.

Presented by : Syed Jaffer Hussain

Slide # 12

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 13

Instance Vs Crash recovery in RAC


o When an instance goes down abruptly for a various reasons, the subsequent instance startup requires the instance recovery. o No manual intervention is required for instance/crash recovery. Oracle (SMON background process) automatically manages the process by applying online redo information. o The mechanism of an instance recovery is to ensure the database consistency post instance failure.

Presented by : Syed Jaffer Hussain

Slide # 14

Instance Vs Crash recovery in RAC

Instance recovery = one or more [not ALL] instance(s) failure of a RAC database. Crash recovery = failure of ALL instances of a RAC database.

Presented by : Syed Jaffer Hussain

Slide # 15

Instance Vs Crash recovery in RAC

Instance or Crash recovery done in TWO phases for a RAC database.


- Global Enqueue Service (LMS) background process - System Monitor (SMON) background process

Presented by : Syed Jaffer Hussain

Slide # 16

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

Instance 1

Instance 2

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 17

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

Instance 1

Instance B down

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 18

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

Instance 1

Instance B up

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 19

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

LMS

GRD recovery

Instance 1

Instance B up

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 20

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

LMS

GRD recovery

Instance A

Instance B

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 21

Instance Vs Crash recovery in RAC


Instance recovery of RAC database

LMS

GRD recovery

Instance A

Instance B

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 22

Instance Vs Crash recovery in RAC


Crash recovery in a RAC database

Failure of all instances>>

Instance 1

Instance 2

Instance 2

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 23

Instance Vs Crash recovery in RAC


Crash recovery in a RAC database

Instance 1

Instance 2

Instance 3

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 24

Instance Vs Crash recovery in RAC


Crash recovery in a RAC database

Instance 1

Instance 2

Instance 3

RAC DB The instance that comes up first performs the instance recovery for all instances of a RAC database

Presented by : Syed Jaffer Hussain

Slide # 25

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 26

Fast Recovery Area(FRA) for RAC


Instance 1 Instance 2

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Redo Logs Archive logs

Redo Logs Archive logs

Location destination RAC DB

Location destination

Presented by : Syed Jaffer Hussain

Slide # 27

Flash Recovery Area(FRA) for RAC


Instance 1 Instance 2

SMON

PMON

LGWR

CKPT

ARCn

SMON

PMON

LGWR

CKPT

ARCn

Read permission

Redo Logs Archive logs

Redo Logs Archive logs

Location destination RAC DB

Location destination

Presented by : Syed Jaffer Hussain

Slide # 28

Flash Recovery Area(FRA) for RAC


Instance 1 Instance 2

Fast Recovery Area (FRA)

2 1 2 1 Redo Logs

1 1

2 2

Identified by the thread number

Archive logs

FRA =
ASM CFS Shared Location (NFS)

RAC DB

Presented by : Syed Jaffer Hussain

Slide # 29

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 30

Snapshot Controlfile backup in 11gR2


Must reside on a shared device in 11gR2 or later. All instances must have access to the snapshot controlfile. Same snapshot controlfile will be shared by all nodes of RAC db.

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO <shared_location>;


This must be done on EACH instance.

ORA-00245: control file backup operation failed

Presented by : Syed Jaffer Hussain

Slide # 31

What will be covered


RAC Vs RMAN why and when. RMAN overview. Configure multiple channels. Parallel recovery in RAC database. Instance Vs Crash recovery in RAC. Fast Recovery Area (FRA) for RAC database. Snapshot Controlfile backup for RAC db in 11gR2. Manage backup & recovery with Oracle Grid Control /EM.

Presented by : Syed Jaffer Hussain

Slide # 32

Manage B&R using Enterprise Manager

Presented by : Syed Jaffer Hussain

Slide # 33

Manage B&R using Enterprise Manager

Presented by : Syed Jaffer Hussain

Slide # 34

A big thank you to all for listening ...


You can write me at sjaffarhussain@gmail.com

Presented by : Syed Jaffer Hussain

Slide # 35

You might also like