|
【上完1Z0-052的第16章】:恢复,并做完实验1a和实验3
【1Z0-051】:共10章(0 1 2 3 4 5 6 7 8 9)
【1Z0-052】:共12章(0 1 2 3 4 5 6 9 10 14 15 16)
【1Z0-053】:共5章(0 1 10 11 12)
- [root@station90 桌面]# su - oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 9 20:58:03 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> alter database datafile 4 offline ;
- Database altered.
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
- With the Partitioning, Automatic Storage Management, OLAP, Data Mining
- and Real Application Testing options
- [oracle@station90 ~]$ rman target /
- Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 9 20:58:51 2016
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367)
- RMAN> list backup of datafile 4 ;
- using target database control file instead of recovery catalog
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 88 Full 1.06M SBT_TAPE 00:00:15 09-JUN-16
- BP Key: 88 Status: AVAILABLE Compressed: NO Tag: TAG20160609T202130
- Handle: 33r7o2ma_1_1 Media: station90-000013
- List of Datafiles in backup set 88
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 Full 1577931 09-JUN-16 +DATA/orcl/datafile/users.259.914098875
- RMAN> crosscheck backupset 88;
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=143 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=199 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=76 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=142 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=195 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=14 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=81 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=130 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=194 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=13 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_3
- channel ORA_SBT_TAPE_3: SID=75 device type=SBT_TAPE
- channel ORA_SBT_TAPE_3: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_4
- channel ORA_SBT_TAPE_4: SID=139 device type=SBT_TAPE
- channel ORA_SBT_TAPE_4: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_5
- channel ORA_SBT_TAPE_5: SID=198 device type=SBT_TAPE
- channel ORA_SBT_TAPE_5: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_6
- channel ORA_SBT_TAPE_6: SID=137 device type=SBT_TAPE
- channel ORA_SBT_TAPE_6: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_7
- channel ORA_SBT_TAPE_7: SID=191 device type=SBT_TAPE
- channel ORA_SBT_TAPE_7: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_8
- channel ORA_SBT_TAPE_8: SID=12 device type=SBT_TAPE
- channel ORA_SBT_TAPE_8: Oracle Secure Backup
- crosschecked backup piece: found to be 'AVAILABLE'
- backup piece handle=33r7o2ma_1_1 RECID=88 STAMP=914098890
- Crosschecked 1 objects
- RMAN> list backup of datafile 4;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 88 Full 1.06M SBT_TAPE 00:00:15 09-JUN-16
- BP Key: 88 Status: AVAILABLE Compressed: NO Tag: TAG20160609T202130
- Handle: 33r7o2ma_1_1 Media: station90-000013
- List of Datafiles in backup set 88
- File LV Type Ckp SCN Ckp Time Name
- ---- -- ---- ---------- --------- ----
- 4 Full 1577931 09-JUN-16 +DATA/orcl/datafile/users.259.914098875
- RMAN> restore datafile 4;
- Starting restore at 09-JUN-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- using channel ORA_SBT_TAPE_3
- using channel ORA_SBT_TAPE_4
- using channel ORA_SBT_TAPE_5
- using channel ORA_SBT_TAPE_6
- using channel ORA_SBT_TAPE_7
- using channel ORA_SBT_TAPE_8
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_1: restoring datafile 00004 to +DATA/orcl/datafile/users.259.914098875
- channel ORA_SBT_TAPE_1: reading from backup piece 33r7o2ma_1_1
- channel ORA_SBT_TAPE_1: piece handle=33r7o2ma_1_1 tag=TAG20160609T202130
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- Finished restore at 09-JUN-16
- RMAN> recover datafile 4 ;
- Starting recover at 09-JUN-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- using channel ORA_SBT_TAPE_3
- using channel ORA_SBT_TAPE_4
- using channel ORA_SBT_TAPE_5
- using channel ORA_SBT_TAPE_6
- using channel ORA_SBT_TAPE_7
- using channel ORA_SBT_TAPE_8
- starting media recovery
- archived log for thread 1 with sequence 36 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_36.292.914100303
- archived log for thread 1 with sequence 37 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_37.289.914100303
- archived log for thread 1 with sequence 38 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_38.293.914100305
- archived log for thread 1 with sequence 39 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_39.290.914100305
- archived log for thread 1 with sequence 40 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_40.291.914100309
- archived log for thread 1 with sequence 41 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_41.295.914100311
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_36.292.914100303 thread=1 sequence=36
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_37.289.914100303 thread=1 sequence=37
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_38.293.914100305 thread=1 sequence=38
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_39.290.914100305 thread=1 sequence=39
- media recovery complete, elapsed time: 00:00:00
- Finished recover at 09-JUN-16
- RMAN> list failure ;
- RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row
- RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows
- ORACLE error from target database:
- ORA-03135: connection lost contact
- Process ID: 17539
- Session ID: 196 Serial number: 825
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target /
- Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 9 21:25:02 2016
- Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (DBID=1343950367, not open)
- RMAN> list failure ;
- using target database control file instead of recovery catalog
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2122 CRITICAL OPEN 09-JUN-16 System datafile 1: '+DATA/orcl/datafile/system.256.816169553' is missing
- 2008 HIGH OPEN 09-JUN-16 Tablespace 4: 'USERS' is offline
- RMAN> advise failure 2122;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 2122 CRITICAL OPEN 09-JUN-16 System datafile 1: '+DATA/orcl/datafile/system.256.816169553' is missing
- analyzing automatic repair options; this may take some time
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=135 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=195 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=11 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=71 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=134 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=194 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=10 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=69 device type=DISK
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=133 device type=SBT_TAPE
- channel ORA_SBT_TAPE_1: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_2
- channel ORA_SBT_TAPE_2: SID=8 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_3
- channel ORA_SBT_TAPE_3: SID=193 device type=SBT_TAPE
- channel ORA_SBT_TAPE_3: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_4
- channel ORA_SBT_TAPE_4: SID=68 device type=SBT_TAPE
- channel ORA_SBT_TAPE_4: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_5
- channel ORA_SBT_TAPE_5: SID=132 device type=SBT_TAPE
- channel ORA_SBT_TAPE_5: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_6
- channel ORA_SBT_TAPE_6: SID=192 device type=SBT_TAPE
- channel ORA_SBT_TAPE_6: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_7
- channel ORA_SBT_TAPE_7: SID=7 device type=SBT_TAPE
- channel ORA_SBT_TAPE_7: Oracle Secure Backup
- allocated channel: ORA_SBT_TAPE_8
- channel ORA_SBT_TAPE_8: SID=72 device type=SBT_TAPE
- channel ORA_SBT_TAPE_8: Oracle Secure Backup
- analyzing automatic repair options complete
- Mandatory Manual Actions
- ========================
- no manual actions available
- Optional Manual Actions
- =======================
- 1. If file +DATA/orcl/datafile/system.256.816169553 was unintentionally renamed or moved, restore it
- Automated Repair Options
- ========================
- Option Repair Description
- ------ ------------------
- 1 Restore and recover datafile 1
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_1742424864.hm
- RMAN> repair failure preview;
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_1742424864.hm
- contents of repair script:
- # restore and recover datafile
- restore datafile 1;
- recover datafile 1;
- RMAN> repair failure ;
- Strategy: The repair includes complete media recovery with no data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_1742424864.hm
- contents of repair script:
- # restore and recover datafile
- restore datafile 1;
- recover datafile 1;
- Do you really want to execute the above repair (enter YES or NO)? YES
- executing repair script
- Starting restore at 09-JUN-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- using channel ORA_SBT_TAPE_3
- using channel ORA_SBT_TAPE_4
- using channel ORA_SBT_TAPE_5
- using channel ORA_SBT_TAPE_6
- using channel ORA_SBT_TAPE_7
- using channel ORA_SBT_TAPE_8
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_1: restoring datafile 00001 to +DATA/orcl/datafile/system.256.816169553
- channel ORA_SBT_TAPE_1: reading from backup piece 31r7o2en_1_1
- channel ORA_SBT_TAPE_1: piece handle=31r7o2en_1_1 tag=TAG20160609T201727
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:45
- Finished restore at 09-JUN-16
- Starting recover at 09-JUN-16
- using channel ORA_DISK_1
- using channel ORA_DISK_2
- using channel ORA_DISK_3
- using channel ORA_DISK_4
- using channel ORA_DISK_5
- using channel ORA_DISK_6
- using channel ORA_DISK_7
- using channel ORA_DISK_8
- using channel ORA_SBT_TAPE_1
- using channel ORA_SBT_TAPE_2
- using channel ORA_SBT_TAPE_3
- using channel ORA_SBT_TAPE_4
- using channel ORA_SBT_TAPE_5
- using channel ORA_SBT_TAPE_6
- using channel ORA_SBT_TAPE_7
- using channel ORA_SBT_TAPE_8
- starting media recovery
- archived log for thread 1 with sequence 36 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_36.292.914100303
- archived log for thread 1 with sequence 37 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_37.289.914100303
- archived log for thread 1 with sequence 38 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_38.293.914100305
- archived log for thread 1 with sequence 39 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_39.290.914100305
- archived log for thread 1 with sequence 40 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_40.291.914100309
- archived log for thread 1 with sequence 41 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_41.295.914100311
- archived log for thread 1 with sequence 42 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_42.301.914102245
- archived log for thread 1 with sequence 43 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_43.300.914102245
- archived log for thread 1 with sequence 44 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_44.303.914102245
- archived log for thread 1 with sequence 45 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_45.305.914102249
- archived log for thread 1 with sequence 46 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_46.306.914102249
- archived log for thread 1 with sequence 47 is already on disk as file +FRA/orcl/archivelog/2016_06_09/thread_1_seq_47.316.914102253
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_36.292.914100303 thread=1 sequence=36
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_37.289.914100303 thread=1 sequence=37
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_38.293.914100305 thread=1 sequence=38
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_39.290.914100305 thread=1 sequence=39
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_40.291.914100309 thread=1 sequence=40
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_41.295.914100311 thread=1 sequence=41
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_42.301.914102245 thread=1 sequence=42
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_43.300.914102245 thread=1 sequence=43
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_44.303.914102245 thread=1 sequence=44
- archived log file name=+FRA/orcl/archivelog/2016_06_09/thread_1_seq_45.305.914102249 thread=1 sequence=45
- media recovery complete, elapsed time: 00:00:01
- Finished recover at 09-JUN-16
- repair failure complete
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 9 21:29:11 2016
- Copyright (c) 1982, 2009, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected.
- SQL> select open_mode from v$database;
- OPEN_MODE
- --------------------
- MOUNTED
- SQL> alter database open ;
- Database altered.
- SQL>
复制代码
|
|