37
© 2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Zero Downtime Backup solution for Oracle10g Storage Grid Seminar Oktober 2005 Frankfurt, München, Hamburg Jaime Blasco HP/Oracle CTC (Cooperative Technology Center) EMEA Competence Center

Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

© 2004 Hewlett-Packard Development Company, L.P.The information contained herein is subject to change without notice

Zero Downtime Backup solution for Oracle10g

Storage Grid Seminar Oktober 2005Frankfurt, München, Hamburg

Jaime BlascoHP/Oracle CTC (Cooperative Technology Center)EMEA Competence Center

Page 2: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Agenda

• Oracle Backup concepts

• Split/Mirror Backup

• Zero Downtime Backup / Instant Recovery for Oracle

• ZDB Live Demo

Page 3: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

HP achieves world recordbackup and restore

achieved with the following equipment:• Superdome with 32CPU's

• XP1024

• HP Tape library (ESL9595) with 16 Ultrium2 drives

• Oracle 9iR2 (9.2.0.2.0) for recovery catalog and target database

• OpenView Data Protector 5.0

• 4.3TB database on file system using the TPC-H standard setup: 8 tables partitioned over ~150 Tablespaces and ~ 260 datafiles.

3.16TB/hr Oracle online backup

1.23TB/hr Oracle restore

Page 4: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

The team

Page 5: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

• Based on the status of the Oracle Server, the Backup can be:

− Offline Backup− Online Backup

• Oracle distinguishes between:

− User Managed Backup: OS copy commands− Server Managed Backup: RMAN (Recovery MANager)

Oracle DB Backup and Recovery concepts

Page 6: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Oracle DB Backup and Recovery concepts

Page 7: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Backup Methods

Physical backup

Closed database

Noarchivelog mode

Closed or open database

Archivelog mode

Page 8: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Consistent Whole Database Backup(Closed Database Backup)

Datafiles Control files

Passwordfile

Online or offline storage

Parameterfile

Redo logfiles

Page 9: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Open Database Backup

DatafilesControl files

Parameter fileArchived redo

log filesPassword file

Online redolog files

Page 10: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Open Database Backup Options

Tablespace USERS

users02.dbfusers01.dbf users02.dbf

Tablespace USERS

users01.dbf

sql>alter tablespace users begin backup;

sql>alter system begin backup;

sql>alter tablespace users end backup;

sql>alter system end backup;

Page 11: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Tablespace in backup mode

When a tablespace is put into backup mode, the following three things happen:

2. Oracle checkpoints the tablespace, flushing all changes from shared memory to disk.

3. The SCN markers for each datafile in that tablespace are "frozen" at their current values. Even though further updates will be sent to the datafiles, the SCN markers will not be updated until the tablespace is taken out of backup mode.

4. Oracle switches to logging full images of changed database blocks to the redologs. Instead of recording how it changed a particular block (the change vector), it will log the entire image of the block after the change. This is why the redologs grow at a much faster rate while hot backups are going on.

Page 12: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Data Protector integration with Oracle

Data Protector

DPmedia agent

DPdatabase

DPcell manager

DPmedia agent

Oracle 9i/10g server

RMAN

tablespace 2

tablespace 1

control files

target database

channel C2

channel C1

channel Cn

recoverycatalog

API DPOracle agent

archiveredo log

datafiledatafiles

Page 13: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Agenda

• Basic Oracle Backup Concepts

• Zero Downtime Backup / Instant Recovery concepts

• ZDB and Oracle10g

• Oracle ZDB live demo

Page 14: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

tape backup no longer meets the need for high-speed recoveryhp is shifting focus from backup to recovery

recovery point

objective (how old is the

data to whichI recover?)

within the past

hour

within past 24 hours

minutesseveral hours

tape backup

INSTANT RECOVERY

recovery time objective (how long does it take?)

Page 14

Page 15: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Faster data recovery methods

management

low-cost storage

application server

low-cost disk recovery

backupserver

production data

t

application server

recovery images on disk

t0

tapelibrary

recovery images on tape

management

Instant Recovery

low-cost storage

application server

low-cost disk recoverymanagement

application server

copy

tproduction data

backup server

tape

zero-downtime backup

Advanced backup to diskmanagement

backup server

application server

tapelow-cost storage

Page 16: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

zero downtime backup processrunning environment

backup session start

snapshot/snapclone

backup session completion

1. The application writesdata to the array, using RAID to control distribution of the data across physical disks.

2. Backup session starts.

3. DB is put into backup mode/offline.

4. snapshots / snapclones are taken.

5. DB is taken out of Backup mode/put back on-line.

6. If a tape backup is specified,the snapshot of data is backed up to tape.

7. Backup session ends.

O O O O O O

R RR

O O O

R RR

O O O

Page 17: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Zero Downtime Backup Key features

• Perfectly integrated into Data Protector

• Easily implement backup jobs without custom script development

• Use of Snapshots or Snapclones on the EVA array,BC or CA on the XP.

• Application is not impacted during the backup process

• A dedicated backup server runs the backup from the Snapshot/Snapclone or BC

• Is the basis for Instant Recove

Page 18: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

OO

O - Original

RR

• Zero Downtime Backup

• Snapshots/snapclones can be created on the fly

• Backup host processes the data

• Snapshots/snapclones get removed at the end of the backup

R - ReplicaBackup host

Application host

EVA

Zero Downtime Backup snapshot backup concept for EVA

Page 19: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

instant recovery concept (general)

O

R

O

R

• all restores from tape

• restore to the application host (or backup host if disk array supports this)

• either host involved in data processing

• fast, automated restore directly from the replica

• minutes instead of hours

• no host involved in data processing

Tape restore approach

O

R

original

replica

Instant Recovery approach

Page 20: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Instant Recovery for EVAKey features

• Builds on the ZDB solution

• Keeps a defined number of shadow copies on the EVA for fast recovery

• Recover your data in minutes rather than hours from tape

• Snapclone only

• Rotating copies for restore

Page 21: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Builds on zero-downtime backup to retain multiple

images on disk for selective recovery to any point-in-time

image.

Data Protector fully automates the protection process, including creation and rotation of mirrors or snapshots.

for recovery, administrator selects a specific recovery image from the graphical user interface

management

production data

t

application server

mediaagent

tapelibrary

recovery images on tape

recovery images on disk

t0

t-2t-1

single scheduler,

single recovery interface

instant recovery – multiple version on disk

Page 22: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

replica storage – snapshot / snapclone rotation

replica storage:Snapshot, -clone in rotation

Production volume

recovery imageson tape

catalog database: - files, versions, hosts - media, drives, libraries

Applicationserver Backup

server

FC SAN

• replicas (snapshots or snapclones) are rotated

• the backup re-uses the oldest replica each time it runs

• only snapclones are used for Instant Recovery (recovers Tbytes of data in minutes from replica)

Page 23: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

instant recovery on EVA (example)

EVARU2

OU

RU3RU1

application host

Original Unit Replica Unit x (snapclone)

before IR during IR after IR

- RU2 is selected for instant recovery and becomes the original disk

- original disk is removed

application host

EVARU2

OU

RU3RU1

EVA

RU2

RU3RU1

OU RUx

Page 24: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Agenda

• Basic Oracle Backup Concepts

• Zero Downtime Backup / Instant Recovery concepts

• ZDB and Oracle10g

• Oracle ZDB live demo

Page 25: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Oracle ZDB integration steps• check Oracle requirements

− Oracle file layout− recovery catalog database required− Net8 installed and configured− whether Oracle is required on backup system depends on

RMAN backup method

• install Data Protector components (disk array, Oracle) on application and backup server

• install Data Protector licenses• configure the integration• create backup specification• perform backup / restore / instant recovery

Page 26: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Oracle setup

DMAon/offline

RMAN backup archive log

Data files

Archive logs

Redo logs Control filesoriginal units

replica units

XP / VA / EVA

RMAN online /offline thru application host (proxy copy)

Page 27: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Oracle RMAN:backup set – proxy copy

− up to Omniback 4.1: only backup set is supported

− data protector 5.0 & 5.1supports only “proxy copy” (except with Oracle 8.0.x)• whitepaper has introduced support

for backups set ZDB for DP 5.1 (HP-UX)

− data protector 5.5 supports both

Oracle backup

RMANuser - managed

proxy copy backup set

• RMAN offers two types of backup methods: backup set and proxy copy

• Data Protector 5.5 supports proxy copy and backup set for Oracle ZDB

Page 28: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

backup method: proxy copy

• what is proxy copy?− media management vendor software (data protector)

takes over data movement − Oracle introduced proxy copy with version 8i (8.1.5)

• what does this mean to the DP ZDB integration?− backup server doesn’t require Oracle installation− proxy copy returns a list of datafiles− list of datafiles are “copied” via replica to the backup

system− datafiles are backed up on the backup server− complete datafiles are backed up

• data protector 5.0 and 5.1 support only proxy copy for Oracle 8i/9i

Page 29: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

backup method: backup set

• what is backup set?− Oracle sends/receives (backup/restore) data streams

to/from the media management backup tool− RMAN specific format− also called stream backup

• what does this mean to the Data Protector ZDB integration?− backup server requires Oracle installation− data files are “copied” via replica to the backup system− Oracle instance is started on the backup server and

backup is performed− only used blocks are backed up

Page 30: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

configuration

• backup method is determined when configuring the integration

• for proxy copyutil_oracle8.exe –CONFIG_SMB_PROXY <ORACLE_SID> Oracle SID<ORACLE_HOME> Oracle home directory<TARGET_DATABASE_LOGIN> connection string target db<RECOVERY_CATALOG_LOGIN> connection string catalog db<CONTROL_FILE_LOCATION> location for backup control file

• for backup setutil_oracle8.exe –CONFIG_SMB_BACKUP_SET <ORACLE_SID> Oracle SID<ORACLE_HOME> Oracle home directory<TARGET_DATABASE_LOGIN> connection string to target db<RECOVERY_CATALOG_LOGIN> connection string to catalog db<CONTROL_FILE_LOCATION> location for backup control file[<INIT_FILE>] original location of

init<SID>.ora

Page 31: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

create backup specification

• combination of normal oracle integration and disk array parameters

1. select split mirror or snapshot backup

6. select disk array options7. select oracle backup options

Page 32: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

overall procedure of a IR/Roll Forward

1. Oracle database has to be manually shut down

2. IR/roll forward is started via DP GUI− all Oracle data files get “restored” caused by a re-

sync from the replica to the original unit− DP creates RMAN script according the user specified

options− RMAN script is started to recover the database

• missing archive logs and/or incremental backups are restored automatically by RMAN

• recovery is done until the specified time− most recent time (now), specified time, logseq/thread,

system change number (SCN)• opens the database (optionally)

Page 33: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Instant Recovery options

Page 34: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Agenda

• Basic Oracle Backup Concepts

• Zero Downtime Backup / Instant Recovery concepts

• ZDB and Oracle10g

• Oracle ZDB live demo

Page 35: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

LIVE DEMONSTRATION OF „ZERO DOWNTIME BACKUP“ AND „INSTANT RECOVERY“ !

Page 36: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced

Demo environment for ZDB/IR

OU

OU: original unit

RU: replica unit

RURU

Backup Host

Application Host

EV

AOU

oracle2

oracle1

oracle3

DP Cell ServerSAN

SAN

LANw2khp-ux

hp-ux

BACKUP

Page 37: Zero Downtime Backup solution for Oracle10g · backup set is supported −data protector 5.0 & 5.1 supports only “proxy copy” (except with Oracle 8.0.x) • whitepaper has introduced