YOU ARE DOWNLOADING DOCUMENT

Please tick the box to continue:

Transcript
Page 1: RMAN best practices for RAC

RMAN best practices for

Real Application Clusters (RAC)

Presented by : Syed Jaffer Hussain Slide # 1

Page 2: RMAN best practices for RAC

Know your presenter

Syed Jaffer HussainDatabase Support Manager

20 years IT experience11+ years as an Oracle DBA

Oracle ACE DirectorOracle 10g Certified Master(OCM)

Oracle 10g RAC Certified ExpertOracle Certified Professional(OCP) v8i,9i,10g & 11g

ITIL v3 Foundation CertifiedAuthored Oracle 11g R1/R2 Real Application Clusters

EssentialsTwitter: @sjaffarhussain

http://jaffardba.blogspot.com

Presented by : Syed Jaffer Hussain Slide # 2

Page 3: RMAN best practices for RAC

Managing backup and recovery operations in RMAN for RAC and non-RAC databases

are nearly identical ….

Presented by : Syed Jaffer Hussain Slide # 3

Page 4: RMAN best practices for RAC

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

Page 5: RMAN best practices for RAC

RAC Vs RMAN – why and when

Real Application Clusters (RAC)

• High Availability(HA)• Failover.

• Scalability• Load balancing.

• It doesn’t safeguard your data from hardware failures or from any disasters.

Presented by : Syed Jaffer Hussain Slide # 5

Recovery Manager (RMAN)

• A command-line and EM tool.

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

• It doesn’t provide high availability

Page 6: RMAN best practices for RAC

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

Page 7: RMAN best practices for RAC

RMAN overviewRecovery 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.

Presented by : Syed Jaffer Hussain Slide # 7

Courtesy from Oracle docs.

Page 8: RMAN best practices for RAC

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

Page 9: RMAN best practices for RAC

Configure multiple channelsMultiple channel configuration for RAC db instances

• Scale up the back up load on to multiple instances of RAC database by configuring multiple channels.

Presented by : Syed Jaffer Hussain Slide # 9

RMAN>

Channel 1

Channel 2

RACDB

RACDB1

RACDB2

Page 10: RMAN best practices for RAC

Configure multiple channelsWorking 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;}

Presented by : Syed Jaffer Hussain Slide # 10

Ensue LOAD_BALANCEturned onno TOTAF (failover)

Page 11: RMAN best practices for RAC

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

Page 12: RMAN best practices for RAC

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 optimumdegree 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

Page 13: RMAN best practices for RAC

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

Page 14: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 14

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.

Page 15: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 15

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

Crash recovery = failure of ALL instances of a RAC database.

Page 16: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 16

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

- Global Enqueue Service (LMS) background process

- System Monitor (SMON) background process

Page 17: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 17

Instance 1

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance 2

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

Page 18: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 18

Instance 1

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance B

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

down

Page 19: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 19

Instance 1

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance B

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

up

Page 20: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 20

Instance 1

PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance B

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

up

LMS

SMON

GRD recovery

Page 21: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 21

Instance A

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance B

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

LMS GRD recovery

Page 22: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 22

Instance A

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance B

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Instance recovery of RAC database

GRD recovery

LMS

Page 23: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 23

RAC DB

Crash recovery in a RAC database

Instance 1 Instance 2 Instance 2

Failure of all instances>>

Page 24: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 24

RAC DB

Crash recovery in a RAC database

Instance 1 Instance 2 Instance 3

Page 25: RMAN best practices for RAC

Instance Vs Crash recovery in RAC

Presented by : Syed Jaffer Hussain Slide # 25

RAC DB

Crash recovery in a RAC database

Instance 1 Instance 2 Instance 3

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

Page 26: RMAN best practices for RAC

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

Page 27: RMAN best practices for RAC

Fast Recovery Area(FRA) for RAC

Presented by : Syed Jaffer Hussain Slide # 27

Instance 1

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance 2

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Location destination Location destination

Page 28: RMAN best practices for RAC

Flash Recovery Area(FRA) for RAC

Presented by : Syed Jaffer Hussain Slide # 28

Instance 1

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

Instance 2

SMON PMON LGWR CKPT ARCn

Redo LogsArchive logs

RAC DB

Read permission

Location destination Location destination

Page 29: RMAN best practices for RAC

Flash Recovery Area(FRA) for RAC

Presented by : Syed Jaffer Hussain Slide # 29

Instance 1

1

Redo Logs Archive logs

Instance 2

1 21 2

RAC DB

Fast Recovery Area (FRA)

FRA =ASMCFSShared Location (NFS)

Identified by the thread number

1 22

Page 30: RMAN best practices for RAC

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

Page 31: RMAN best practices for RAC

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

Page 32: RMAN best practices for RAC

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

Page 33: RMAN best practices for RAC

Manage B&R using Enterprise Manager

Presented by : Syed Jaffer Hussain Slide # 33

Page 34: RMAN best practices for RAC

Manage B&R using Enterprise Manager

Presented by : Syed Jaffer Hussain Slide # 34

Page 35: RMAN best practices for RAC

A big thank you to all

for

listening ...

Presented by : Syed Jaffer Hussain Slide # 35

You can write me at [email protected]


Related Documents