Oracle RMAN 11g Backup and Recovery (4 page)

7 Enhancing RMAN with VERITAS NetBackupTM
for Oracle
. . . . . . . . . . . . . . . . . . 153

8 Configuring HP Data Protector for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

9 RMAN and Tivoli Storage Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

10 Using the Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

11 RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

12 RMAN Restore and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

PART III

Using RMAN Effectively

13 Using Oracle Enterprise Manager for Backup and Recovery . . . . . . . . . . . . . . . . 307

14 RMAN Advanced Recovery Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345

15 Surviving User Errors: Flashback Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

16 Maintaining RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

vii

viii
Oracle RMAN 11
g
Backup and Recovery

17 Monitoring and Reporting on RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

423

18 Performance Tuning RMAN Backup and Recovery Operations . . . . . . . . . . . . . .

445

PART IV

RMAN in the Oracle Ecosystem

19 Duplication: Cloning the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

465

20 RMAN and Data Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

491

21 RMAN and Real Application Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

501

22 RMAN in Sync and Split Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

517

23 RMAN in the Workplace: Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

531

PART V

Appendixes

A RMAN Syntax Reference Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

559

B RMAN Scripting Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

621

C Setting Up an RMAN Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

625

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

633

Contents

Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

PART I

Getting Started with RMAN in Oracle Database 11
g

1

Oracle Database 11
g
Backup and Recovery Architecture Tour . . . . . . . . . . . . . . . . . .

3

Backup and Recovery Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

High Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

A Few Oracle Terms to Know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

Controlling the Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Oracle Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

The Oracle Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Oracle Memory and RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

The Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

More About the Oracle Redo Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

ARCHIVELOG Mode vs. NOARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . . 20

Oracle Logical Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

The Combined Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Startup and Shutdown of the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Using the Database and Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Oracle Backup and Recovery Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Logical Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Oracle Physical Backup and Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Backing Up Other Oracle Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

2

Introduction to the RMAN Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Server-Managed Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

The RMAN Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

RMAN and Database Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

The Network Topology of RMAN Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Running RMAN Remotely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Running RMAN Locally from the Target Database’s ORACLE_HOME . . . . . . . . 37

The Database Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Record Reuse in the Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

ix

x
Oracle RMAN 11
g
Backup and Recovery

The Snapshot Control File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

The RMAN Server Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

RMAN Channel Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

The SYS Packages Used by RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

SYS.DBMS_RCVMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

SYS.DBMS_BACKUP_RESTORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Backing Up the Data Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

The Data Block Backup Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

The Benefits of Block-Level Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

RMAN in Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Input Memory Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

RMAN Memory Utilization: PGA vs. SGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

The Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

The Auxiliary Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Compatibility Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

The Target and the RMAN Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

The Catalog Database and Catalog Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

The Auxiliary Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

The RMAN Process: From Start to Finish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

The Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

PART II

Setup Principles and Practices

3

RMAN Setup and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Configuring Your Database to Run in ARCHIVELOG Mode . . . . . . . . . . . . . . . . . . . . . 62

ARCHIVELOG Destination Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

The Flash Recovery Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Should You Use the FRA? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Switching Between ARCHIVELOG Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

If You Created Your Database with the Oracle Database

Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

RMAN Workshop:
Put the Database in ARCHIVELOG Mode
. . . . . . . . . . . . . . 72

The Oracle Database 11
g
Fault Diagnosability Infrastructure . . . . . . . . . . . . . . . . . . . . 73

The RMAN Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Connecting via the RMAN Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

RMAN Client Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Using the RMAN connect Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Exiting the RMAN Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Configuring the Database for RMAN Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Setting Up the Database User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

RMAN Workshop:
Create the Target Database RMAN Backup Account
. . . . . . 80

Setting Up Database Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Setting the CONTROL_FILE_RECORD_KEEP_TIME Parameter . . . . . . . . . . . . . 82

Configuring RMAN Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Introducing the configure Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Configuring Various RMAN Default Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Examples of Using the configure Command . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

If You Are Using Shared Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Contents
xi

Summary of RMAN Configuration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Other books

Cuna de gato by Kurt Vonnegut
Tierra del Fuego by Francisco Coloane
Angel's Kiss by Melanie Tomlin
Dick Tracy by Max Allan Collins
Silent Girl by Tricia Dower
Pack Challenge by Shelly Laurenston
Be My Bride by Regina Scott