Oracle RMAN 11g Backup and Recovery (8 page)

Changing Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

Deleting Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

Using Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

Printing Stored Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

RMAN Workshop:
Using RMAN Stored Scripts
. . . . . . . . . . . . . . . . . . . . . . . . . 420

When You Just Can’t Take It Anymore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

17

Monitoring and Reporting on RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423

The RMAN list Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

Listing Incarnations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

Listing Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425

Listing Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

The RMAN report Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

Reporting on Datafiles That Have Not Been Backed Up Recently . . . . . . . . . . . 438

Reporting on Backup Redundancy or Recovery Window . . . . . . . . . . . . . . . . . 439

Reporting on Unrecoverable Operations on Datafiles . . . . . . . . . . . . . . . . . . . . 439

Reporting on the Database Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

Reporting on Obsolete Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440

Data Dictionary Views for Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

18

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

Before You Tune RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

RMAN Performance: What Can Be Achieved? . . . . . . . . . . . . . . . . . . . . . . . . . 446

Have the Right Hardware in Place . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

Tune the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448

Tuning RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Tuning RMAN Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Tune the MML Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Identifying Database–Related RMAN Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Tracing RMAN Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

PART IV

RMAN in the Oracle Ecosystem

19

Duplication: Cloning the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

RMAN Duplication: A Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

Why Use RMAN Duplication? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

Different Types of RMAN Duplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468

The Duplication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468

Duplication: Location Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

Duplication to the Same Server: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . 474

Duplication to the Same Server, Different ORACLE_HOME . . . . . . . . . . . . . . . 475

Contents
xix

Duplication to a Remote Server: An Overview . . . . . . . . . . . . . . . . . . . . . . . . . 475

Duplication and the Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

RMAN Workshop:
Build a Password File
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

Duplication to the Same Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

RMAN Workshop:
Duplication to the Same Server, Using Disk Backups
. . . . . 482

Using Tape Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

Duplication to a Remote Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

RMAN Workshop:
Duplication to a Remote Server, Using Disk Backups
. . . . . 485

Using Tape Backups for Remote Server Duplication . . . . . . . . . . . . . . . . . . . . . 487

Target-Less Duplication in 11
g

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487

Incomplete Duplication: Using the DBNEWID Utility . . . . . . . . . . . . . . . . . . . 488

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

20

RMAN and Data Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

RMAN and the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

Requirements for Using RMAN for Standby Database Creation . . . . . . . . . . . . 493

The duplicate…for standby Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494

RMAN Workshop:
Create a Standby Database Using RMAN
. . . . . . . . . . . . . . 495

Taking Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

Datafile Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . 499

Archive Log Backups from the Standby Database . . . . . . . . . . . . . . . . . . . . . . . 499

Using Flashback Database for Standby Database Reinstantiation . . . . . . . . . . . 500

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500

21

RMAN and Real Application Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501

Real Application Clusters: Unique Backup Challenges . . . . . . . . . . . . . . . . . . . . . . . . . 502

Datafile Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

Archive Log Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

RAC Recovery Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

Restore Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

Media Management Considerations During a Restore . . . . . . . . . . . . . . . . . . . . 508

Recovery Considerations After a Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508

Advanced RMAN/RAC Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

Duplication to a Single-Node System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

RMAN Workshop:
Duplicating a RAC Database to a Single-Node Database
. . 510

The Single-Node Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

RMAN Workshop:
Creating a Single-Node Standby Database from

a RAC Database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

Backing Up the Multinode RAC Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

22

RMAN in Sync and Split Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

Sync and Split: Broken Mirror Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518

Oracle Databases on Sync and Split Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520

Datafiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521

Control Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522

Redo Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522

Archive Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522

Benefits of the Split Mirror Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523

Fast Point-In-Time Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523

Speedy-Looking Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523

xx
Oracle RMAN 11
g
Backup and Recovery

Mounting a Split Mirror Volume on Another Server . . . . . . . . . . . . . . . . . . . . . 523

Taking Backups from the Split Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524

RMAN and Sync and Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524

Registering Split Mirror Copies with RMAN . . . . . . . . . . . . . . . . . . . . . . . . . . . 524

Taking RMAN Backups from the Split Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . 525

RMAN Workshop:
Configure RMAN to Back Up from the Split Mirror
. . . . . . . 526

Getting Sync and Split Functionality from Oracle Software . . . . . . . . . . . . . . . . 527

Using a Standby Database, Flashback Database, and Incremental

Apply for Sync and Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527

Benefits of the Oracle Sync and Split Solution . . . . . . . . . . . . . . . . . . . . . . . . . 528

Oracle-Integrated Shadow Copy Services for Windows . . . . . . . . . . . . . . . . . . . . . . . . 529

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

23

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

Before the Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

What Is the Exact Nature of the Failure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

What Recovery Options Are Available? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

Might Oracle Support Be Needed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

Who Can Act as a Second Pair of Eyes During Recovery? . . . . . . . . . . . . . . . . . 533

Recovery Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

Case #1: Recovering from Complete Database Loss (NOARCHIVELOG Mode)

with a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534

Case #2: Recovering from Complete Database Loss (NOARCHIVELOG Mode)

Without a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

Case #3: Recovering from Complete Database Loss (ARCHIVELOG Mode)

Without a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

Case #4: Recovering from Complete Database Loss (ARCHIVELOG Mode)

with a Recovery Catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

Other books

La casa de Bernarda Alba by Federico García Lorca
The Fallen Sequence by Lauren Kate
Sweet Justice by Vanessa Vale
Dark Duke by Sabrina York
Raw Deal by Les Standiford
Silent Voices by Gary McMahon
Treachery by S. J. Parris