Für ein schnelles Backup der Oracle Datenbank hat man, wenn man Glück hat, eine schnelle Backup Infrastruktur. Aber auch die schnellste Infrastruktur ist einfach immer zu langsam wenn es – warum auch immer – einfach mal schneller gehen muss 🙂 Wenn dann auch noch Oracle Flashback nicht genutzt werden kann weil es den Anforderungen nicht genügt oder schlichtweg nicht konfiguriert ist kann man i.d.R. schnell und einfach auf rman als Backuplösung zurück greifen.
Ich werde hier kurz erläutern wie man rman (Recovery Manager) für ein Backup in ein Filesystem, also ein rman backup to disk (rman backup2disk) konfiguriert und im Notfall einen Restore aus dem Backup anfertigt.
Für die Nutzung von RMAN müssen zunächst die Parameter überprüft werden. Hierzu ist ein rman connect notwendig.
Zunächst verbindet man sich per rman gegen die Datenbank:
server:oraA01 4> rman Recovery Manager: Release 11.2.0.1.0 - Production on Thu Apr 3 10:50:11 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: A01 (DBID=54469256) RMAN>
Hier ist es wichtig sich die DBID zu merken, da RMAN diese im Rahmen des Restores anfordern wird!
Als nächstes werden die aktuellen rman Parameter ausgelesen. Die Werte der aktuell gesetzten Parameter sollte man sich wegsichern um sie nach dem das Backup nicht mehr benötigt wird auch wieder zurücksetzen zu können. Damit die Werte gespeichert werden können muss die Datenbank gestartet sein, ansonsten kann rman keine Konfigurationsänderungen vornehmen, da diese in der DB gesichert werden.
Für das Backupszenario werden folgende Parameter gesetzt:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE DEVICE TYPE disk PARALLELISM 2;
Durch die Parallelität kann die Backup Geschwindigkeit gesteigert werden. Je nach Filesystemsetup / SAN-Leistung kann es sinnvoll sein den Wert auf 4 zu erhöhen und dazu 4 Channel zu definieren. In der Regel erzielt man mit 2 jedoch bereits einen ordentlichen Durchsatz.
RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name A01 are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/A01/112_64/dbs/snapcf_A01.f'; # default RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored RMAN> CONFIGURE DEVICE TYPE disk PARALLELISM 2; new RMAN configuration parameters: CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET; new RMAN configuration parameters are successfully stored RMAN>
Nachdem die Parameter gesetzt sind kann das Backup gestartet werden. Das Backup wird mit 2 Channeln gestartet. Hierfür wurde vorher die Parallelität auf 2 erhöht. Dies erhöht den Durchsatz. Es werden die Datenfiles sowie die Archivelogs gesichert. Das Zielverzeichnis für die Backupfiles ist das Filesystem unter /oracle/A01/backup und sollte entsprechend groß genug sein um das Backup aufnehmen zu können.
Die zu sichernden Files werden den verfügbaren Channeln wie eine Queue zur Abarbeitung zugeteilt:
RMAN>run { ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; BACKUP DATABASE PLUS ARCHIVELOG; release channel disk1; release channel disk2; } Starting backup at 27-MAR-14 current log archived channel disk1: starting archived log backup set channel disk1: specifying archived log(s) in backup set input archived log thread=1 sequence=110 RECID=87 STAMP=843315295 channel disk1: starting piece 1 at 27-MAR-14 channel disk2: starting archived log backup set channel disk2: specifying archived log(s) in backup set input archived log thread=1 sequence=111 RECID=88 STAMP=843315317 input archived log thread=1 sequence=112 RECID=89 STAMP=843315321 input archived log thread=1 sequence=113 RECID=90 STAMP=843315338 input archived log thread=1 sequence=114 RECID=91 STAMP=843315341 input archived log thread=1 sequence=115 RECID=92 STAMP=843315342 channel disk2: starting piece 1 at 27-MAR-14 channel disk1: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/1up48442_1_1 tag=TAG20140327T155754 comment=NONE channel disk1: backup set complete, elapsed time: 00:00:01 channel disk1: starting archived log backup set channel disk1: specifying archived log(s) in backup set input archived log thread=1 sequence=116 RECID=93 STAMP=843315810 input archived log thread=1 sequence=117 RECID=94 STAMP=843320476 input archived log thread=1 sequence=118 RECID=95 STAMP=843321474 channel disk1: starting piece 1 at 27-MAR-14 channel disk2: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/1vp48442_1_1 tag=TAG20140327T155754 comment=NONE channel disk2: backup set complete, elapsed time: 00:00:01 channel disk1: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/20p48443_1_1 tag=TAG20140327T155754 comment=NONE channel disk1: backup set complete, elapsed time: 00:00:01 Finished backup at 27-MAR-14 Starting backup at 27-MAR-14 channel disk1: starting full datafile backup set channel disk1: specifying datafile(s) in backup set input datafile file number=00056 name=/oracle/A01/sapdata1/crm_45/crm.data45 input datafile file number=00058 name=/oracle/A01/sapdata1/crm_47/crm.data47 input datafile file number=00006 name=/oracle/A01/sapdata1/crm_3/crm.data3 input datafile file number=00008 name=/oracle/A01/sapdata1/crm_5/crm.data5 input datafile file number=00010 name=/oracle/A01/sapdata1/crm_7/crm.data7 input datafile file number=00012 name=/oracle/A01/sapdata1/crm_9/crm.data9 input datafile file number=00014 name=/oracle/A01/sapdata1/crm_11/crm.data11 input datafile file number=00016 name=/oracle/A01/sapdata1/crm_13/crm.data13 input datafile file number=00018 name=/oracle/A01/sapdata1/crm_15/crm.data15 input datafile file number=00020 name=/oracle/A01/sapdata1/crm_17/crm.data17 input datafile file number=00022 name=/oracle/A01/sapdata1/crm_19/crm.data19 input datafile file number=00024 name=/oracle/A01/sapdata1/crm_21/crm.data21 input datafile file number=00026 name=/oracle/A01/sapdata1/crm_23/crm.data23 input datafile file number=00032 name=/oracle/A01/sapdata1/crm701_6/crm701.data6 input datafile file number=00035 name=/oracle/A01/sapdata1/crm_24/crm.data24 input datafile file number=00037 name=/oracle/A01/sapdata1/crm_26/crm.data26 input datafile file number=00039 name=/oracle/A01/sapdata1/crm_28/crm.data28 input datafile file number=00041 name=/oracle/A01/sapdata1/crm_30/crm.data30 input datafile file number=00043 name=/oracle/A01/sapdata1/crm_32/crm.data32 input datafile file number=00045 name=/oracle/A01/sapdata1/crm_34/crm.data34 input datafile file number=00047 name=/oracle/A01/sapdata1/crm_36/crm.data36 input datafile file number=00049 name=/oracle/A01/sapdata1/crm_38/crm.data38 input datafile file number=00051 name=/oracle/A01/sapdata1/crm_40/crm.data40 input datafile file number=00053 name=/oracle/A01/sapdata1/crm_42/crm.data42 input datafile file number=00055 name=/oracle/A01/sapdata1/crm_44/crm.data44 input datafile file number=00028 name=/oracle/A01/sapdata1/crm701_2/crm701.data2 input datafile file number=00029 name=/oracle/A01/sapdata1/crm701_3/crm701.data3 input datafile file number=00034 name=/oracle/A01/sapdata1/crmusr_1/crmusr.data1 input datafile file number=00001 name=/oracle/A01/sapdata1/system_1/system.data1 channel disk1: starting piece 1 at 27-MAR-14 channel disk2: starting full datafile backup set channel disk2: specifying datafile(s) in backup set input datafile file number=00057 name=/oracle/A01/sapdata1/crm_46/crm.data46 input datafile file number=00002 name=/oracle/A01/sapdata1/undo_1/undo.data1 input datafile file number=00004 name=/oracle/A01/sapdata1/crm_1/crm.data1 input datafile file number=00005 name=/oracle/A01/sapdata1/crm_2/crm.data2 input datafile file number=00007 name=/oracle/A01/sapdata1/crm_4/crm.data4 input datafile file number=00009 name=/oracle/A01/sapdata1/crm_6/crm.data6 input datafile file number=00011 name=/oracle/A01/sapdata1/crm_8/crm.data8 input datafile file number=00013 name=/oracle/A01/sapdata1/crm_10/crm.data10 input datafile file number=00015 name=/oracle/A01/sapdata1/crm_12/crm.data12 input datafile file number=00017 name=/oracle/A01/sapdata1/crm_14/crm.data14 input datafile file number=00019 name=/oracle/A01/sapdata1/crm_16/crm.data16 input datafile file number=00021 name=/oracle/A01/sapdata1/crm_18/crm.data18 input datafile file number=00023 name=/oracle/A01/sapdata1/crm_20/crm.data20 input datafile file number=00025 name=/oracle/A01/sapdata1/crm_22/crm.data22 input datafile file number=00031 name=/oracle/A01/sapdata1/crm701_5/crm701.data5 input datafile file number=00033 name=/oracle/A01/sapdata1/crm701_7/crm701.data7 input datafile file number=00036 name=/oracle/A01/sapdata1/crm_25/crm.data25 input datafile file number=00038 name=/oracle/A01/sapdata1/crm_27/crm.data27 input datafile file number=00040 name=/oracle/A01/sapdata1/crm_29/crm.data29 input datafile file number=00042 name=/oracle/A01/sapdata1/crm_31/crm.data31 input datafile file number=00044 name=/oracle/A01/sapdata1/crm_33/crm.data33 input datafile file number=00046 name=/oracle/A01/sapdata1/crm_35/crm.data35 input datafile file number=00048 name=/oracle/A01/sapdata1/crm_37/crm.data37 input datafile file number=00050 name=/oracle/A01/sapdata1/crm_39/crm.data39 input datafile file number=00052 name=/oracle/A01/sapdata1/crm_41/crm.data41 input datafile file number=00054 name=/oracle/A01/sapdata1/crm_43/crm.data43 input datafile file number=00030 name=/oracle/A01/sapdata1/crm701_4/crm701.data4 input datafile file number=00027 name=/oracle/A01/sapdata1/crm701_1/crm701.data1 input datafile file number=00003 name=/oracle/A01/sapdata1/sysaux_1/sysaux.data1 channel disk2: starting piece 1 at 27-MAR-14 channel disk2: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/22p48446_1_1 tag=TAG20140327T155756 comment=NONE channel disk2: backup set complete, elapsed time: 00:30:12 channel disk1: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/21p48446_1_1 tag=TAG20140327T155756 comment=NONE channel disk1: backup set complete, elapsed time: 00:30:22 Finished backup at 27-MAR-14 Starting backup at 27-MAR-14 current log archived channel disk1: starting archived log backup set channel disk1: specifying archived log(s) in backup set input archived log thread=1 sequence=119 RECID=96 STAMP=843323300 channel disk1: starting piece 1 at 27-MAR-14 channel disk1: finished piece 1 at 27-MAR-14 piece handle=/oracle/A01/backup/23p485t4_1_1 tag=TAG20140327T162820 comment=NONE channel disk1: backup set complete, elapsed time: 00:00:01 Finished backup at 27-MAR-14 Starting Control File and SPFILE Autobackup at 27-MAR-14 piece handle=/oracle/A01/112_64/dbs/c-54469256-20140327-00 comment=NONE Finished Control File and SPFILE Autobackup at 27-MAR-14 released channel: disk1 released channel: disk2
Sollte es bei der Sicherung zu Problemen mit den Archivelogs kommen hilft ein Crosscheck i.d.R. weiter, wenn z.B. ein gestartetes Backup mit der Meldung abbricht, dass ein erwartetes Archivelog nicht verfügbar ist:
RMAN> run 2> { 3> ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/dev/null/'; 4> BACKUP DATABASE PLUS ARCHIVELOG; 5> release channel disk1; 6> } allocated channel: disk1 channel disk1: SID=39 device type=DISK Starting backup at 04-APR-14 ORACLE error from target database: ORA-00258: manual archiving in NOARCHIVELOG mode must identify log released channel: disk1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup plus archivelog command at 04/04/2014 16:07:03 RMAN-06059: expected archived log not found, loss of archived log compromises recoverability ORA-19625: error identifying file /oracle/A01/oraarch/A01arch1_1_821223336.dbf ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or directory Additional information: 3
Rman räumt mit einem corsscheck archivelog all entsprechend auf:
RMAN> crosscheck archivelog all; allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=39 device type=DISK allocated channel: ORA_DISK_2 channel ORA_DISK_2: SID=70 device type=DISK validation failed for archived log archived log file name=/oracle/A01/oraarch/A01arch1_1_821223336.dbf RECID=1 STAMP=821412030 validation failed for archived log archived log file name=/oracle/A01/oraarch/A01arch1_2_821223336.dbf RECID=2 STAMP=821628786 […] validation failed for archived log archived log file name=/oracle/A01/oraarch/A01arch1_85_821223336.dbf RECID=85 STAMP=826509655 validation failed for archived log archived log file name=/oracle/A01/oraarch/A01arch1_86_821223336.dbf RECID=86 STAMP=826548893 Crosschecked 86 objects
Die mit rman angefertigten Backups kann man sich mit list backup anzeigen lassen:
RMAN> LIST BACKUP; List of Backup Sets =================== BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 1 44.50K DISK 00:00:00 27-MAR-14 BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155754 Piece Name: /oracle/A01/backup/1vp48442_1_1 List of Archived Logs in backup set 1 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 111 8076014695 27-MAR-14 8076014735 27-MAR-14 1 112 8076014735 27-MAR-14 8076014738 27-MAR-14 1 113 8076014738 27-MAR-14 8076014748 27-MAR-14 1 114 8076014748 27-MAR-14 8076014752 27-MAR-14 1 115 8076014752 27-MAR-14 8076014755 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 2 182.32M DISK 00:00:01 27-MAR-14 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155754 Piece Name: /oracle/A01/backup/1up48442_1_1 List of Archived Logs in backup set 2 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 110 8075852809 27-MAR-14 8076014695 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 3 22.40M DISK 00:00:00 27-MAR-14 BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155754 Piece Name: /oracle/A01/backup/20p48443_1_1 List of Archived Logs in backup set 3 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 116 8076014755 27-MAR-14 8076017024 27-MAR-14 1 117 8076017024 27-MAR-14 8076031879 27-MAR-14 1 118 8076031879 27-MAR-14 8076034908 27-MAR-14 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 4 Full 241.23G DISK 00:30:11 27-MAR-14 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155756 Piece Name: /oracle/A01/backup/22p48446_1_1 List of Datafiles in backup set 4 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 2 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/undo_1/undo.data1 3 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/sysaux_1/sysaux.data1 4 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_1/crm.data1 5 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_2/crm.data2 7 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_4/crm.data4 9 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_6/crm.data6 11 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_8/crm.data8 13 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_10/crm.data10 15 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_12/crm.data12 17 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_14/crm.data14 19 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_16/crm.data16 21 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_18/crm.data18 23 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_20/crm.data20 25 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_22/crm.data22 27 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_1/crm701.data1 30 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_4/crm701.data4 31 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_5/crm701.data5 33 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_7/crm701.data7 36 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_25/crm.data25 38 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_27/crm.data27 40 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_29/crm.data29 42 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_31/crm.data31 44 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_33/crm.data33 46 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_35/crm.data35 48 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_37/crm.data37 50 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_39/crm.data39 52 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_41/crm.data41 54 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_43/crm.data43 57 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_46/crm.data46 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 5 Full 242.58G DISK 00:30:18 27-MAR-14 BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155756 Piece Name: /oracle/A01/backup/21p48446_1_1 List of Datafiles in backup set 5 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/system_1/system.data1 6 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_3/crm.data3 8 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_5/crm.data5 10 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_7/crm.data7 12 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_9/crm.data9 14 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_11/crm.data11 16 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_13/crm.data13 18 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_15/crm.data15 20 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_17/crm.data17 22 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_19/crm.data19 24 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_21/crm.data21 26 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_23/crm.data23 28 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_2/crm701.data2 29 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_3/crm701.data3 32 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_6/crm701.data6 34 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crmusr_1/crmusr.data1 35 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_24/crm.data24 37 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_26/crm.data26 39 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_28/crm.data28 41 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_30/crm.data30 43 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_32/crm.data32 45 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_34/crm.data34 47 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_36/crm.data36 49 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_38/crm.data38 51 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_40/crm.data40 53 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_42/crm.data42 55 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_44/crm.data44 56 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_45/crm.data45 58 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_47/crm.data47 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 6 6.04M DISK 00:00:00 27-MAR-14 BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20140327T162820 Piece Name: /oracle/A01/backup/23p485t4_1_1 List of Archived Logs in backup set 6 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 119 8076034908 27-MAR-14 8076040522 27-MAR-14 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 7 Full 17.80M DISK 00:00:00 27-MAR-14 BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20140327T162821 Piece Name: /oracle/A01/112_64/dbs/c-54469256-20140327-00 SPFILE Included: Modification time: 25-JUL-13 SPFILE db_unique_name: A01 Control File Included: Ckp SCN: 8076040531 Ckp time: 27-MAR-14 RMAN>
Der Restore mit rman läuft wie folgt beschrieben ab:
Zunächst wird die Datenbank gestoppt.
server:oraA01 48> sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 28 09:19:40 2014 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Bevor das Backup zurück gespielt werden kann müssen die Data-Files im sapdata* gelöscht werden. Somit wird verhindert, dass Files, die nach dem Backup erzeugt wurden im Filesystem liegen bleiben und dort verweisen bzw. es beim erneuten Anlegen zu Fehlern kommt. Achtung, es sollten nur die data-Files und nicht die Ordner gelöscht werden, denn im Gegensatz zu den brtools erstellt rman die benötigten Zielordner für die data-Files nicht selbstständig. Wer also eine größere mkdir-Schleife verhindern will sollte hier Vorsicht walten lassen. Sofern die Zielverzeichnisse nicht vorhanden sind kann das Datenfile nicht restored werden und der Restore schlägt fehl!
find /oracle/A01/sapdata* -type file -exec ls -al {} \;
Wenn die Ausgabe OK ist und nur Datafiles enthält kann per find gelöscht werden:
find /oracle/A01/sapdata* -type file –exec rm {} \;
Die Datenbank wird zunächst in den nomount-Status gebracht. Anschließend wird das crontrolfile aus der Sicherung restored.
server:oraA01 56> sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.1.0 Production on Fri Mar 28 09:28:28 2014 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount; ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORACLE instance started. Total System Global Area 2388422656 bytes Fixed Size 2209096 bytes Variable Size 1207962296 bytes Database Buffers 1174405120 bytes Redo Buffers 3846144 bytes SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Als nächstes wird rman gestartet. Beim Start von rman gibt dieser nach dem connect target zwar die SID aus, nicht mehr jedoch die DBID!
server:oraA01 57> rman Recovery Manager: Release 11.2.0.1.0 - Production on Fri Mar 28 09:28:44 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target / connected to target database: A01 (not mounted)
Um die DBID, die man sich aus dem ersten connect während des Backuplaufs geholt hat zu setzen gibt man rman die DBID per set Befehl vor:
rman> SET DBID 54469256;
Sollte man die ID nicht haben, so findet man diese zum Beispiel im Oracle Alertlog:
server:oraA01 28> grep -i dbid /oracle/A01/saptrace/diag/rdbms/a01/A01/trace/alert_A01.log DBID will be changed from 3773767397 to new DBID of 35226790 for database A01 DBID will be changed from 3773767397 to new DBID of 54469256 for database A01 server:oraA01 29>
Nachdem die DBID bekannt ist kann das Controlfile als Basis für weitere Aktivitäten restored werden:
RMAN> run 2> { 3> ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; 4> RESTORE CONTROLFILE FROM AUTOBACKUP; 5> release channel disk1; 6> } allocated channel: disk1 channel disk1: SID=96 device type=DISK Starting restore at 28-MAR-14 channel disk1: looking for AUTOBACKUP on day: 20140328 channel disk1: AUTOBACKUP found: c-54469256-20140327-01 channel disk1: restoring control file from AUTOBACKUP c-54469256-20140327-01 channel disk1: control file restore from AUTOBACKUP complete output file name=/oracle/A01/origlogA/cntrl/cntrlA01.dbf output file name=/oracle/A01/origlogB/cntrl/cntrlA01.dbf output file name=/oracle/A01/sapdata1/cntrl/cntrlA01.dbf Finished restore at 28-MAR-14 released channel: disk1 RMAN>
Nachdem das Controlfile wieder verfügbar ist kann die DB gemounted werden.
SQL> alter database mount; Database altered. SQL>
Der Restore wird gestartet:
a) rman restore mit recover starten
rman> run { ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; set until time "to_date('2014-03-28 12:30:00', 'YYYY-MM-DD HH24:MI:SS')"; --> Zeitstempel kurz vor dem letzten Archivelog (Completion Time). RESTORE DATABASE; RECOVER DATABASE; release channel disk1; release channel disk2; }
b) rman restore mit manuellem recover starten
Wird der rman ohne recover gestartet müssen hinterher die Archivelogs per sql recover nachgezogen werden.
RMAN> run { ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; ALLOCATE CHANNEL disk2 DEVICE TYPE DISK FORMAT '/oracle/A01/backup/%U'; RESTORE DATABASE; release channel disk1; release channel disk2; } allocated channel: disk1 channel disk1: SID=127 device type=DISK Starting restore at 28-MAR-14 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00001 to /oracle/A01/sapdata1/system_1/system.data1 channel disk1: restoring datafile 00007 to /oracle/A01/sapdata1/crm_4/crm.data4 channel disk1: restoring datafile 00011 to /oracle/A01/sapdata1/crm_8/crm.data8 channel disk1: restoring datafile 00015 to /oracle/A01/sapdata1/crm_12/crm.data12 channel disk1: restoring datafile 00019 to /oracle/A01/sapdata1/crm_16/crm.data16 channel disk1: restoring datafile 00023 to /oracle/A01/sapdata1/crm_20/crm.data20 channel disk1: restoring datafile 00030 to /oracle/A01/sapdata1/crm701_4/crm701.data4 channel disk1: restoring datafile 00031 to /oracle/A01/sapdata1/crm701_5/crm701.data5 channel disk1: restoring datafile 00036 to /oracle/A01/sapdata1/crm_25/crm.data25 channel disk1: restoring datafile 00040 to /oracle/A01/sapdata1/crm_29/crm.data29 channel disk1: restoring datafile 00044 to /oracle/A01/sapdata1/crm_33/crm.data33 channel disk1: restoring datafile 00048 to /oracle/A01/sapdata1/crm_37/crm.data37 channel disk1: restoring datafile 00052 to /oracle/A01/sapdata1/crm_41/crm.data41 channel disk1: restoring datafile 00057 to /oracle/A01/sapdata1/crm_46/crm.data46 channel disk1: reading from backup piece /oracle/A01/backup/2cp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2cp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:23:15 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00002 to /oracle/A01/sapdata1/undo_1/undo.data1 channel disk1: restoring datafile 00003 to /oracle/A01/sapdata1/sysaux_1/sysaux.data1 channel disk1: restoring datafile 00004 to /oracle/A01/sapdata1/crm_1/crm.data1 channel disk1: restoring datafile 00005 to /oracle/A01/sapdata1/crm_2/crm.data2 channel disk1: restoring datafile 00009 to /oracle/A01/sapdata1/crm_6/crm.data6 channel disk1: restoring datafile 00013 to /oracle/A01/sapdata1/crm_10/crm.data10 channel disk1: restoring datafile 00017 to /oracle/A01/sapdata1/crm_14/crm.data14 channel disk1: restoring datafile 00021 to /oracle/A01/sapdata1/crm_18/crm.data18 channel disk1: restoring datafile 00025 to /oracle/A01/sapdata1/crm_22/crm.data22 channel disk1: restoring datafile 00033 to /oracle/A01/sapdata1/crm701_7/crm701.data7 channel disk1: restoring datafile 00038 to /oracle/A01/sapdata1/crm_27/crm.data27 channel disk1: restoring datafile 00042 to /oracle/A01/sapdata1/crm_31/crm.data31 channel disk1: restoring datafile 00046 to /oracle/A01/sapdata1/crm_35/crm.data35 channel disk1: restoring datafile 00050 to /oracle/A01/sapdata1/crm_39/crm.data39 channel disk1: restoring datafile 00054 to /oracle/A01/sapdata1/crm_43/crm.data43 channel disk1: reading from backup piece /oracle/A01/backup/2dp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2dp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:20:55 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00008 to /oracle/A01/sapdata1/crm_5/crm.data5 channel disk1: restoring datafile 00012 to /oracle/A01/sapdata1/crm_9/crm.data9 channel disk1: restoring datafile 00016 to /oracle/A01/sapdata1/crm_13/crm.data13 channel disk1: restoring datafile 00020 to /oracle/A01/sapdata1/crm_17/crm.data17 channel disk1: restoring datafile 00024 to /oracle/A01/sapdata1/crm_21/crm.data21 channel disk1: restoring datafile 00028 to /oracle/A01/sapdata1/crm701_2/crm701.data2 channel disk1: restoring datafile 00029 to /oracle/A01/sapdata1/crm701_3/crm701.data3 channel disk1: restoring datafile 00032 to /oracle/A01/sapdata1/crm701_6/crm701.data6 channel disk1: restoring datafile 00034 to /oracle/A01/sapdata1/crmusr_1/crmusr.data1 channel disk1: restoring datafile 00037 to /oracle/A01/sapdata1/crm_26/crm.data26 channel disk1: restoring datafile 00041 to /oracle/A01/sapdata1/crm_30/crm.data30 channel disk1: restoring datafile 00045 to /oracle/A01/sapdata1/crm_34/crm.data34 channel disk1: restoring datafile 00049 to /oracle/A01/sapdata1/crm_38/crm.data38 channel disk1: restoring datafile 00053 to /oracle/A01/sapdata1/crm_42/crm.data42 channel disk1: restoring datafile 00058 to /oracle/A01/sapdata1/crm_47/crm.data47 channel disk1: reading from backup piece /oracle/A01/backup/2bp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2bp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:22:06 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00006 to /oracle/A01/sapdata1/crm_3/crm.data3 channel disk1: restoring datafile 00010 to /oracle/A01/sapdata1/crm_7/crm.data7 channel disk1: restoring datafile 00014 to /oracle/A01/sapdata1/crm_11/crm.data11 channel disk1: restoring datafile 00018 to /oracle/A01/sapdata1/crm_15/crm.data15 channel disk1: restoring datafile 00022 to /oracle/A01/sapdata1/crm_19/crm.data19 channel disk1: restoring datafile 00026 to /oracle/A01/sapdata1/crm_23/crm.data23 channel disk1: restoring datafile 00027 to /oracle/A01/sapdata1/crm701_1/crm701.data1 channel disk1: restoring datafile 00035 to /oracle/A01/sapdata1/crm_24/crm.data24 channel disk1: restoring datafile 00031 to /oracle/A01/sapdata1/crm701_5/crm701.data5 channel disk1: restoring datafile 00036 to /oracle/A01/sapdata1/crm_25/crm.data25 channel disk1: restoring datafile 00040 to /oracle/A01/sapdata1/crm_29/crm.data29 channel disk1: restoring datafile 00044 to /oracle/A01/sapdata1/crm_33/crm.data33 channel disk1: restoring datafile 00048 to /oracle/A01/sapdata1/crm_37/crm.data37 channel disk1: restoring datafile 00052 to /oracle/A01/sapdata1/crm_41/crm.data41 channel disk1: restoring datafile 00057 to /oracle/A01/sapdata1/crm_46/crm.data46 channel disk1: reading from backup piece /oracle/A01/backup/2cp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2cp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:23:15 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00002 to /oracle/A01/sapdata1/undo_1/undo.data1 channel disk1: restoring datafile 00003 to /oracle/A01/sapdata1/sysaux_1/sysaux.data1 channel disk1: restoring datafile 00004 to /oracle/A01/sapdata1/crm_1/crm.data1 channel disk1: restoring datafile 00005 to /oracle/A01/sapdata1/crm_2/crm.data2 channel disk1: restoring datafile 00009 to /oracle/A01/sapdata1/crm_6/crm.data6 channel disk1: restoring datafile 00013 to /oracle/A01/sapdata1/crm_10/crm.data10 channel disk1: restoring datafile 00017 to /oracle/A01/sapdata1/crm_14/crm.data14 channel disk1: restoring datafile 00021 to /oracle/A01/sapdata1/crm_18/crm.data18 channel disk1: restoring datafile 00025 to /oracle/A01/sapdata1/crm_22/crm.data22 channel disk1: restoring datafile 00033 to /oracle/A01/sapdata1/crm701_7/crm701.data7 channel disk1: restoring datafile 00038 to /oracle/A01/sapdata1/crm_27/crm.data27 channel disk1: restoring datafile 00042 to /oracle/A01/sapdata1/crm_31/crm.data31 channel disk1: restoring datafile 00046 to /oracle/A01/sapdata1/crm_35/crm.data35 channel disk1: restoring datafile 00050 to /oracle/A01/sapdata1/crm_39/crm.data39 channel disk1: restoring datafile 00054 to /oracle/A01/sapdata1/crm_43/crm.data43 channel disk1: reading from backup piece /oracle/A01/backup/2dp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2dp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:20:55 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00008 to /oracle/A01/sapdata1/crm_5/crm.data5 channel disk1: restoring datafile 00012 to /oracle/A01/sapdata1/crm_9/crm.data9 channel disk1: restoring datafile 00016 to /oracle/A01/sapdata1/crm_13/crm.data13 channel disk1: restoring datafile 00020 to /oracle/A01/sapdata1/crm_17/crm.data17 channel disk1: restoring datafile 00024 to /oracle/A01/sapdata1/crm_21/crm.data21 channel disk1: restoring datafile 00028 to /oracle/A01/sapdata1/crm701_2/crm701.data2 channel disk1: restoring datafile 00029 to /oracle/A01/sapdata1/crm701_3/crm701.data3 channel disk1: restoring datafile 00032 to /oracle/A01/sapdata1/crm701_6/crm701.data6 channel disk1: restoring datafile 00034 to /oracle/A01/sapdata1/crmusr_1/crmusr.data1 channel disk1: restoring datafile 00037 to /oracle/A01/sapdata1/crm_26/crm.data26 channel disk1: restoring datafile 00041 to /oracle/A01/sapdata1/crm_30/crm.data30 channel disk1: restoring datafile 00045 to /oracle/A01/sapdata1/crm_34/crm.data34 channel disk1: restoring datafile 00049 to /oracle/A01/sapdata1/crm_38/crm.data38 channel disk1: restoring datafile 00053 to /oracle/A01/sapdata1/crm_42/crm.data42 channel disk1: restoring datafile 00058 to /oracle/A01/sapdata1/crm_47/crm.data47 channel disk1: reading from backup piece /oracle/A01/backup/2bp486a5_1_1 channel disk1: piece handle=/oracle/A01/backup/2bp486a5_1_1 tag=TAG20140327T163515 channel disk1: restored backup piece 1 channel disk1: restore complete, elapsed time: 00:22:06 channel disk1: starting datafile backup set restore channel disk1: specifying datafile(s) to restore from backup set channel disk1: restoring datafile 00006 to /oracle/A01/sapdata1/crm_3/crm.data3 channel disk1: restoring datafile 00010 to /oracle/A01/sapdata1/crm_7/crm.data7 channel disk1: restoring datafile 00014 to /oracle/A01/sapdata1/crm_11/crm.data11 channel disk1: restoring datafile 00018 to /oracle/A01/sapdata1/crm_15/crm.data15 channel disk1: restoring datafile 00022 to /oracle/A01/sapdata1/crm_19/crm.data19 channel disk1: restoring datafile 00026 to /oracle/A01/sapdata1/crm_23/crm.data23 channel disk1: restoring datafile 00027 to /oracle/A01/sapdata1/crm701_1/crm701.data1 channel disk1: restoring datafile 00035 to /oracle/A01/sapdata1/crm_24/crm.data24 4 Full 241.23G DISK 00:30:11 27-MAR-14 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155756 Piece Name: /oracle/A01/backup/22p48446_1_1 List of Datafiles in backup set 4 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 2 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/undo_1/undo.data1 3 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/sysaux_1/sysaux.data1 4 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_1/crm.data1 5 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_2/crm.data2 7 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_4/crm.data4 9 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_6/crm.data6 11 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_8/crm.data8 13 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_10/crm.data10 15 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_12/crm.data12 17 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_14/crm.data14 19 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_16/crm.data16 21 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_18/crm.data18 23 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_20/crm.data20 25 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_22/crm.data22 27 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_1/crm701.data1 30 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_4/crm701.data4 31 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_5/crm701.data5 33 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm701_7/crm701.data7 36 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_25/crm.data25 38 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_27/crm.data27 40 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_29/crm.data29 42 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_31/crm.data31 44 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_33/crm.data33 46 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_35/crm.data35 48 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_37/crm.data37 50 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_39/crm.data39 52 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_41/crm.data41 54 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_43/crm.data43 57 Full 8076034916 27-MAR-14 /oracle/A01/sapdata1/crm_46/crm.data46 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 5 Full 242.58G DISK 00:30:18 27-MAR-14 BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20140327T155756 Piece Name: /oracle/A01/backup/21p48446_1_1 List of Datafiles in backup set 5 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/system_1/system.data1 6 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_3/crm.data3 8 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_5/crm.data5 10 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_7/crm.data7 12 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_9/crm.data9 14 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_11/crm.data11 16 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_13/crm.data13 18 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_15/crm.data15 20 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_17/crm.data17 22 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_19/crm.data19 24 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_21/crm.data21 26 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_23/crm.data23 28 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_2/crm701.data2 29 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_3/crm701.data3 32 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm701_6/crm701.data6 34 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crmusr_1/crmusr.data1 35 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_24/crm.data24 37 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_26/crm.data26 39 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_28/crm.data28 41 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_30/crm.data30 43 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_32/crm.data32 45 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_34/crm.data34 47 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_36/crm.data36 49 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_38/crm.data38 51 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_40/crm.data40 53 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_42/crm.data42 55 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_44/crm.data44 56 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_45/crm.data45 58 Full 8076034914 27-MAR-14 /oracle/A01/sapdata1/crm_47/crm.data47 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 6 6.04M DISK 00:00:00 27-MAR-14 BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20140327T162820 Piece Name: /oracle/A01/backup/23p485t4_1_1 List of Archived Logs in backup set 6 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 119 8076034908 27-MAR-14 8076040522 27-MAR-14 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 7 Full 17.80M DISK 00:00:00 27-MAR-14 BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20140327T162821 Piece Name: /oracle/A01/112_64/dbs/c-54469256-20140327-00 SPFILE Included: Modification time: 25-JUL-13 SPFILE db_unique_name: A01 Control File Included: Ckp SCN: 8076040531 Ckp time: 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 8 16.00K DISK 00:00:00 27-MAR-14 BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163512 Piece Name: /oracle/A01/backup/27p486a1_1_1 List of Archived Logs in backup set 8 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 121 8076041662 27-MAR-14 8076041666 27-MAR-14 1 122 8076041666 27-MAR-14 8076041669 27-MAR-14 1 123 8076041669 27-MAR-14 8076041673 27-MAR-14 1 124 8076041673 27-MAR-14 8076041676 27-MAR-14 1 125 8076041676 27-MAR-14 8076041679 27-MAR-14 1 126 8076041679 27-MAR-14 8076041682 27-MAR-14 1 127 8076041682 27-MAR-14 8076041685 27-MAR-14 1 128 8076041685 27-MAR-14 8076041692 27-MAR-14 1 129 8076041692 27-MAR-14 8076041695 27-MAR-14 1 130 8076041695 27-MAR-14 8076041702 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 9 29.27M DISK 00:00:01 27-MAR-14 BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163512 Piece Name: /oracle/A01/backup/26p486a0_1_1 List of Archived Logs in backup set 9 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 111 8076014695 27-MAR-14 8076014735 27-MAR-14 1 112 8076014735 27-MAR-14 8076014738 27-MAR-14 1 113 8076014738 27-MAR-14 8076014748 27-MAR-14 1 114 8076014748 27-MAR-14 8076014752 27-MAR-14 1 115 8076014752 27-MAR-14 8076014755 27-MAR-14 1 116 8076014755 27-MAR-14 8076017024 27-MAR-14 1 117 8076017024 27-MAR-14 8076031879 27-MAR-14 1 118 8076031879 27-MAR-14 8076034908 27-MAR-14 1 119 8076034908 27-MAR-14 8076040522 27-MAR-14 1 120 8076040522 27-MAR-14 8076041662 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 10 7.50K DISK 00:00:00 27-MAR-14 BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163512 Piece Name: /oracle/A01/backup/28p486a1_1_1 List of Archived Logs in backup set 10 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 131 8076041702 27-MAR-14 8076041705 27-MAR-14 1 132 8076041705 27-MAR-14 8076041709 27-MAR-14 1 133 8076041709 27-MAR-14 8076041712 27-MAR-14 1 134 8076041712 27-MAR-14 8076041715 27-MAR-14 1 135 8076041715 27-MAR-14 8076041718 27-MAR-14 1 136 8076041718 27-MAR-14 8076041721 27-MAR-14 1 137 8076041721 27-MAR-14 8076041724 27-MAR-14 1 138 8076041724 27-MAR-14 8076041727 27-MAR-14 1 139 8076041727 27-MAR-14 8076041730 27-MAR-14 1 140 8076041730 27-MAR-14 8076041733 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 11 182.32M DISK 00:00:01 27-MAR-14 BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163512 Piece Name: /oracle/A01/backup/25p486a0_1_1 List of Archived Logs in backup set 11 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 110 8075852809 27-MAR-14 8076014695 27-MAR-14 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 12 6.50K DISK 00:00:00 27-MAR-14 BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163512 Piece Name: /oracle/A01/backup/29p486a2_1_1 List of Archived Logs in backup set 12 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 141 8076041733 27-MAR-14 8076041736 27-MAR-14 1 142 8076041736 27-MAR-14 8076041739 27-MAR-14 1 143 8076041739 27-MAR-14 8076041742 27-MAR-14 1 144 8076041742 27-MAR-14 8076041745 27-MAR-14 1 145 8076041745 27-MAR-14 8076041748 27-MAR-14 1 146 8076041748 27-MAR-14 8076041786 27-MAR-14 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 13 Full 116.45G DISK 00:30:02 27-MAR-14 BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163515 Piece Name: /oracle/A01/backup/2cp486a5_1_1 List of Datafiles in backup set 13 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/system_1/system.data1 7 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_4/crm.data4 11 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_8/crm.data8 15 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_12/crm.data12 19 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_16/crm.data16 23 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_20/crm.data20 30 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm701_4/crm701.data4 31 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm701_5/crm701.data5 36 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_25/crm.data25 40 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_29/crm.data29 44 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_33/crm.data33 48 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_37/crm.data37 52 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_41/crm.data41 57 Full 8076041823 27-MAR-14 /oracle/A01/sapdata1/crm_46/crm.data46 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 14 Full 117.67G DISK 00:30:15 27-MAR-14 BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163515 Piece Name: /oracle/A01/backup/2dp486a5_1_1 List of Datafiles in backup set 14 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 2 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/undo_1/undo.data1 3 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/sysaux_1/sysaux.data1 4 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_1/crm.data1 5 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_2/crm.data2 9 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_6/crm.data6 13 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_10/crm.data10 17 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_14/crm.data14 21 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_18/crm.data18 25 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_22/crm.data22 33 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm701_7/crm701.data7 38 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_27/crm.data27 42 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_31/crm.data31 46 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_35/crm.data35 50 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_39/crm.data39 54 Full 8076041824 27-MAR-14 /oracle/A01/sapdata1/crm_43/crm.data43 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 15 Full 124.49G DISK 00:31:02 27-MAR-14 BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163515 Piece Name: /oracle/A01/backup/2bp486a5_1_1 List of Datafiles in backup set 15 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 8 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_5/crm.data5 12 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_9/crm.data9 16 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_13/crm.data13 20 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_17/crm.data17 24 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_21/crm.data21 28 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm701_2/crm701.data2 29 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm701_3/crm701.data3 32 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm701_6/crm701.data6 34 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crmusr_1/crmusr.data1 37 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_26/crm.data26 41 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_30/crm.data30 45 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_34/crm.data34 49 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_38/crm.data38 53 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_42/crm.data42 58 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_47/crm.data47 BS Key Type LV Size Device Type Elapsed Time Completion Time 58 Full 8076041822 27-MAR-14 /oracle/A01/sapdata1/crm_47/crm.data47 BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 16 Full 125.20G DISK 00:31:06 27-MAR-14 BP Key: 16 Status: AVAILABLE Compressed: NO Tag: TAG20140327T163515 Piece Name: /oracle/A01/backup/2ap486a5_1_1 List of Datafiles in backup set 16 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 6 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_3/crm.data3 10 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_7/crm.data7 14 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_11/crm.data11 18 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_15/crm.data15 22 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_19/crm.data19 26 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_23/crm.data23 27 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm701_1/crm701.data1 35 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_24/crm.data24 39 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_28/crm.data28 43 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_32/crm.data32 47 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_36/crm.data36 51 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_40/crm.data40 55 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_44/crm.data44 56 Full 8076041821 27-MAR-14 /oracle/A01/sapdata1/crm_45/crm.data45 BS Key Size Device Type Elapsed Time Completion Time ------- ---------- ----------- ------------ --------------- 17 5.75M DISK 00:00:00 27-MAR-14 BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20140327T170633 Piece Name: /oracle/A01/backup/2ep4884p_1_1 List of Archived Logs in backup set 17 Thrd Seq Low SCN Low Time Next SCN Next Time ---- ------- ---------- --------- ---------- --------- 1 147 8076041786 27-MAR-14 8076047031 27-MAR-14 RMAN>
Das manuelle Recover wird innerhalb von sqlplus ausgeführt. Anschließend wird ein alter database open restlogs abgesetzt und unbedingt eine neue Fullsicherung der Datenbank gezogen!
sql>recover database until time '2014-03-28:12:30:00' sql>alter database open resetlogs;
Die im Rahmen des Backup2Disk Szenarios gesetzten Parameter sollten wieder auf ihren Standard zurückgestellt werden (default).
Hierzu kann man rman anweisen die Parameter per clear wieder auf Standard zurück zu setzen.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP clear;
RMAN> CONFIGURE DEVICE TYPE DISK clear;