Click here to load reader
View
220
Download
0
Embed Size (px)
RMAN 10g New Features
DOAG-Regionalgruppe Mnchen / Sdbayern
17.01.2005
Peter Hulm
RMAN 10g New Features 2 2004
Zitate zum Thema:
> Die Festplatte crasht immer eine Stunde vordem nchsten Backup (Murphy)
> Heute ist Backup-Tag. Mein Lieblingtag! Ichlinke das tape device nach /dev/null - vielkonomischer. Zumindest, was meineArbeitszeit angeht, weil ich nicht alle 5 MinutenBnder wechseln mu. Auerdem dauert dasBackup nur noch etwa 12 Minuten, also kann esnicht ganz schlecht sein! (Auszug: "Bastard Administrator from Hell")
> Wer braucht schon einen Backup, Hauptsachedie Recovery funktioniert (Hulm)
RMAN 10g New Features 3 2004
> RMAN aber bitte mit GUI
> Der neue Trend Disk-Backups
> Automatische Recovery ber Resetlogs
> Backup Compression
> Fast Incremental Backup
> Incrementally Updated Backups
> Automatische TSPITR Instantiation
> Bounded Backup Window
>
> Fazit
RMAN 10g New Features
Agenda
Denkanstssedie Bewegen
RMAN 10g New Features 4 2004
GUI: Anforderungen
> Einfaches GUI fr das Backup Management Was wurde wann gesichert? Welche Backups kann man lschen? Einfache Mglichkeit alte Backups zu lschen
> Untersttzung bei Media Recoveries
Nicht nur bei der Ausfhrung ... ... sondern bei der Problemanalyse
- Welche Art von Recovery ist notwendig?
SQL> SELECT * FROM scott.emp;*
ERROR at line 1:ORA-00376: file 5 cannot be read at this timeORA-01110: data file 5: '/u01/oradata/DB920B/users01.dbf'
RMAN 10g New Features 5 2004
GUI: Anforderungen
> Vor Oracle10g ...
> Welche Art von Recovery?
> Wie vorgehen?
SQL> SELECT file#, online_status, error FROM v$recover_file;
FILE# ONLINE_STATUS ERROR---------- -------------- --------------------
5 OFFLINE FILE NOT FOUND
RMAN 10g New Features 6 2004
RMAN 10g GUI
> Stark erweiterte Funktionen gegenber frheren OEM Versionen
> Nicht nur ein simpler Wizard, sondern eine echte Applikation
RMAN 10g New Features 7 2004
RMAN 10g GUI: Recovery
> EM 10g weiss was defekt ist und recovered selbstndig ...
Database needs media recovery, datafile 5 is corruptDo you want to start recovery now?
is possible, all archivelogs and redologs are available
RMAN 10g New Features 8 2004
RMAN 10g GUI: Backup Set Management
> Backup Sets und Image Copies knnen nun administriert werden
RMAN 10g New Features 9 2004
RMAN 10g GUI: Backup Konfiguration
> Konfiguration fr Disk und Tape Devices sind komplett mglich
> Neue Features sind bereits implementiert
RMAN 10g New Features 10 2004
RMAN 10g GUI: Backup Support
> Vorgegebene Backup Strategien von Oracle sind vorhanden
> Eigene Strategien (auch komplexere) knnen umgesetzt werden
> Neue 10g Features sind auch hier bereits implementiert
RMAN 10g New Features 11 2004
Automatisiertes, disk-basiertes Backup und Recovery
> Automatisch organisierte Verzeichnis-Struktur
TVD1010B
/u02/flash_recovery_areaTVD1010A
archivelog
backupset
autobackup
controlfile
datafile
o1_mf_1_5862_00qy0ydq_.arco1_mf_1_5863_00r1kb4g_.arc....
2004-03-24
2004-03-25
o1_mf_1_5839_00q8o099_.arco1_mf_1_5840_00qbojfg_.arc....
2004-03-24
2004-03-25
o1_mf_s_515845766_00q8vspj_.bkpo1_mf_s_515855778_00qlnpn9_.bkp
o1_mf_s_515864372_00qxygh9_.bkp
o1_mf_TAG20040324T095756_00q72lc2_.ctl
2004-03-24o1_mf_annnn_TAG20040324T100512_00q7zc9j_.bkpo1_mf_ncnnf_TAG20040324T102920_00q8vmff_.bkp....
o1_mf_sysaux_00q70otw_.dbfo1_mf_system_00q72yyp_.dbfo1_mf_undotbs_00q71o05_.dbf....
....
RMAN 10g New Features 12 2004
Automatisiertes, disk-basiertes Backup und Recovery
> Einheitlicher Storage Bereich fr alle Recovery-bezogenen Files
> Kann definiert werden als ein Verzeichnis, Filesystem oder eineDisk-Gruppe im Automatischen Storage Management (ASM)
> Datenbanken knnen sich eine Flash Recovery Area teilen
> Neue dynamische Initialisierungs-Parameter
DB_RECOVERY_FILE_DEST_SIZE = 50G
DB_RECOVERY_FILE_DEST = '/u02/flash_recovery_area'
DB_RECOVERY_FILE_DEST = "+DG1" # ASM Diskgroup
RMAN 10g New Features 13 2004
Automatisiertes, disk-basiertes Backup und Recovery
> Backup der Flash Recovery Area Muss auf Device Type SBT gesichert werden Backup Optimierung ist immer an Sichert Backupsets, Image Copies, Archivelogs, Controlfile
Autobackups nur von der Flash Recovery Area
> Sichern aller Recovery Files von Disk Muss auf Device Type SBT gesichert werden Backup Optimierung ist immer an Beinhaltet Backupsets, Image Copies, Archivelogs, Controlfile
Autobackups in der Flash Recovery Area und anderenVerzeichnissen
RMAN> BACKUP RECOVERY AREA;
RMAN> BACKUP RECOVERY FILES;
RMAN 10g New Features 14 2004
Verbesserte Backups auf Disk
> Backup Kommando ist fr Image Copies erweitert worden
> "Failover" auf die Backup-Kopie der Datenbank
RMAN> BACKUP AS COPY DATABASE;
RMAN> BACKUP AS COPY TABLESPACE users;
RMAN> BACKUP AS COPY TABLESPACE users, toolsFORMAT '/u02/orabackup/%U';
RMAN> SWITCH DATABASE TO COPY;
RMAN 10g New Features 15 2004
Vereinfachte Recovery ber Resetlogs hinweg
> In Oracle9i war ein neues Backup der gesamtenDatenbank nach einem Point-in-Time Recovery frzuknftige Recoveries essentiell
t0 t1 t2Point-in-Time
recoveryLog341
Log562
Log567
Log1
Datenfile8
t3ResetlogsSCN = 347243
DatenbankBackup
RMAN 10g New Features 16 2004
Vereinfachte Recovery ber Resetlogs hinweg
> Ein gesamtes Datenbank Backup nach OPEN RESETLOGS ist in Oracle 10g nicht mehr notwendig
> Dieses Feature ist in RMAN und User-managed Recovery verfgbar
> Spezifizieren eines neue Archivelog-Formats ist notwendig
> und wie sieht es mit Recovery ber zwei und mehrIncarnationen aus?
JA, es geht ebenfalls!!
LOG_ARCHIVE_FORMAT = TVD1010A_%t_%s_%r.arc
RMAN 10g New Features 17 2004
Backup compression
> RMAN kann komprimierte Backup Pieces schreiben
Backup Compression
1
10
100
1000
10000
50MB 600MB 1GB 3GB
Database Size
Bac
kups
et S
ize
(MB
)
Backupset MB(nocompress)Backupset MB(compress)Compression Factor
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;
RMAN> BACKUP AS COMPRESSED BACKUPSET ARCHIVELOG ALL;
Backup duration
00:00
01:12
02:24
03:36
04:48
06:00
07:12
50MB 628MB 1GB 3GB
Backupset Size
Dura
tion
in m
inut
esDuration (nocompress)Duration (compress)
RMAN 10g New Features 18 2004
Fast Incremental Backup
> Inkrementelle Backups scannen nicht mehr die ganze Datenbank
> Inkrementelle Backups werden wesentlich schneller
> Knnen Online enabled und disabled werden Disable lscht das Datenfile
> Default Filesize 10M
> Filesize kann mit dem Parameter SIZE spezifiziert werden
> Neuer Hintergrund-Prozess CTWR wird gestartet
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKINGUSING FILE '/u01/oradata/TVD1010A/bct01TVD1010A.dbf';
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
RMAN 10g New Features 19 2004
Fast Incremental Backups
> Die neue View V$BLOCK_CHANGE_TRACKING enthltinformationen ber Filename und FilegrsseSQL> SELECT * FROM v$block_change_tracking;
STATUS FILENAME BYTES--------- ----------------------------------------- ---------ENABLED /u01/oradata/TVD1010A/bct01TVD1010A.dbf 11599872
RMAN 10g New Features 20 2004
Fast incremental Backup
Block Change Tracking
00:0000:2800:5701:2601:5502:2402:5203:2103:5004:1904:48
17% 45% 85%
Database Block changes in %
Dur
atio
n in
min
utes Inc Level 1 block change
tracking
Inc Level 1 w ithout blockchange tracking
Inc Level 0
RMAN 10g New Features 21 2004
Incrementally Updated Backups
> Voraussetzungen: Initiales Full Datenbank Backup Image Copy auf Disk, typischerweise in die Flash Recovery Area
> Der Image Copy Backup wird mittels inkrementeller Backups fortgeschrieben die inkrementellen Backups (kumulativ) werden appliziert
> RMAN kann die aktualisierten Image-Copy Backups beiRecoveries verwendenRUN {
RECOVER COPY OF DATABASE WITH TAG 'daily_inc1';BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY
WITH TAG 'daily_inc1' DATABASE;}
RMAN 10g New Features 22 2004
Automated TSPITR Instantiation
> Einfacheres Tablespace Point-in-Time Recovery als in Oracle9i
> Drei Stufen der Automatisierung Vollautomatisiertes TSPITR Angepasstes TSPITR mit automatischer Auxiliary Instanz TSPITR mit eigener Auxiliary Instanz
RMAN> RECOVER TABLESPACE users2> UNTIL SEQUENCE 31 THREAD 13> AUXILIARY DESTINATION '/u01/oradata/AUX';
RMAN 10g New Features 23 2004