|
在做11a实验之前:
1. 检查磁带机。2.准备catalog。3.连接catalog做一个
- RMAN> backup tag '100T_WHOLE_FULL' database plus archivelog delete all input;
复制代码- [root@station90 桌面]# su - oracle
- [oracle@station90 ~]$ sqlplus /nolog
- SQL*Plus: Release 11.2.0.3.0 Production on Tue Jul 17 20:14:56 2018
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
- SQL> conn / as sysdba
- Connected to an idle instance.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 6664212480 bytes
- Fixed Size 2240944 bytes
- Variable Size 3640659536 bytes
- Database Buffers 3003121664 bytes
- Redo Buffers 18190336 bytes
- ORA-00205: error in identifying control file, check alert log for more info
- SQL> exit
- Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- [oracle@station90 ~]$ rman target /
- Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jul 17 20:15:35 2018
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (not mounted)
- RMAN> list failure;
- using target database control file instead of recovery catalog
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 645 CRITICAL OPEN 17-JUL-18 Control file +FRA/orcl/controlfile/current.256.816169633 is missing
- 642 CRITICAL OPEN 17-JUL-18 Control file +DATA/orcl/controlfile/current.260.816169631 is missing
- RMAN> advise failure;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 645 CRITICAL OPEN 17-JUL-18 Control file +FRA/orcl/controlfile/current.256.816169633 is missing
- 642 CRITICAL OPEN 17-JUL-18 Control file +DATA/orcl/controlfile/current.260.816169631 is missing
- analyzing automatic repair options; this may take some time
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=131 device type=DISK
- analyzing automatic repair options complete
- Mandatory Manual Actions
- ========================
- 1. If file +FRA/orcl/controlfile/current.256.816169633 was unintentionally renamed or moved, restore it
- 2. If file +DATA/orcl/controlfile/current.260.816169631 was unintentionally renamed or moved, restore it
- 3. If this is a primary database and you have a CREATE CONTROLFILE script, use it to create a new control file
- 4. Contact Oracle Support Services if the preceding recommendations cannot be used, or if they do not fix the failures selected for repair
- Optional Manual Actions
- =======================
- 1. If this is a primary database and a standby database is available, then perform a Data Guard failover initiated from the standby
- Automated Repair Options
- ========================
- no automatic repair options available
- RMAN> exit
- Recovery Manager complete.
- [oracle@station90 ~]$ rman target / catalog u90/oracle_4U@rcat
- Recovery Manager: Release 11.2.0.3.0 - Production on Tue Jul 17 20:16:23 2018
- Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
- connected to target database: ORCL (not mounted)
- RMAN-04007: WARNING from recovery catalog database: ORA-28002: the password will expire within 7 days
- connected to recovery catalog database
- RMAN> list backup of controlfile;
- List of Backup Sets
- ===================
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 248 Full 9.50M SBT_TAPE 00:00:16 22-MAY-17
- BP Key: 259 Status: AVAILABLE Compressed: NO Tag: TAG20170522T204208
- Handle: c-1343950367-20170522-00 Media: station90-000001
- Control File Included: Ckp SCN: 2026879 Ckp time: 22-MAY-17
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 254 Full 9.50M SBT_TAPE 00:00:16 17-JUL-18
- BP Key: 265 Status: AVAILABLE Compressed: NO Tag: TAG20180717T200543
- Handle: c-1343950367-20180717-00 Media: station90-000001
- Control File Included: Ckp SCN: 3896211 Ckp time: 17-JUL-18
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 352 Full 9.50M SBT_TAPE 00:00:16 17-JUL-18
- BP Key: 356 Status: AVAILABLE Compressed: NO Tag: LABS-11A-CONTROLFILE
- Handle: 1ut88jno_1_1 Media: station90-000001
- Control File Included: Ckp SCN: 3896535 Ckp time: 17-JUL-18
- BS Key Type LV Size Device Type Elapsed Time Completion Time
- ------- ---- -- ---------- ----------- ------------ ---------------
- 353 Full 9.50M SBT_TAPE 00:00:16 17-JUL-18
- BP Key: 357 Status: AVAILABLE Compressed: NO Tag: TAG20180717T201202
- Handle: c-1343950367-20180717-01 Media: station90-000001
- Control File Included: Ckp SCN: 3896555 Ckp time: 17-JUL-18
- RMAN> restore controlfile;
- Starting restore at 17-JUL-18
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=131 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=192 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=8 device type=DISK
- allocated channel: ORA_DISK_4
- channel ORA_DISK_4: SID=69 device type=DISK
- allocated channel: ORA_DISK_5
- channel ORA_DISK_5: SID=132 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=193 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=9 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=70 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=10 device type=SBT_TAPE
- channel ORA_SBT_TAPE_2: Oracle Secure Backup
- channel ORA_SBT_TAPE_1: starting datafile backup set restore
- channel ORA_SBT_TAPE_1: restoring control file
- channel ORA_SBT_TAPE_1: reading from backup piece c-1343950367-20180717-01
- channel ORA_SBT_TAPE_1: piece handle=c-1343950367-20180717-01 tag=TAG20180717T201202
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- output file name=+DATA/orcl/controlfile/current.263.981749841
- output file name=+FRA/orcl/controlfile/current.259.981749847
- Finished restore at 17-JUL-18
- RMAN> alter database mount;
- database mounted
- released channel: ORA_DISK_1
- released channel: ORA_DISK_2
- released channel: ORA_DISK_3
- released channel: ORA_DISK_4
- released channel: ORA_DISK_5
- released channel: ORA_DISK_6
- released channel: ORA_DISK_7
- released channel: ORA_DISK_8
- released channel: ORA_SBT_TAPE_1
- released channel: ORA_SBT_TAPE_2
- RMAN> recover database;
- Starting recover at 17-JUL-18
- Starting implicit crosscheck backup at 17-JUL-18
- allocated channel: ORA_DISK_1
- channel ORA_DISK_1: SID=133 device type=DISK
- allocated channel: ORA_DISK_2
- channel ORA_DISK_2: SID=194 device type=DISK
- allocated channel: ORA_DISK_3
- channel ORA_DISK_3: SID=10 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=132 device type=DISK
- allocated channel: ORA_DISK_6
- channel ORA_DISK_6: SID=193 device type=DISK
- allocated channel: ORA_DISK_7
- channel ORA_DISK_7: SID=9 device type=DISK
- allocated channel: ORA_DISK_8
- channel ORA_DISK_8: SID=70 device type=DISK
- Finished implicit crosscheck backup at 17-JUL-18
- Starting implicit crosscheck copy at 17-JUL-18
- 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
- Finished implicit crosscheck copy at 17-JUL-18
- searching for all files in the recovery area
- cataloging files...
- no files cataloged
- 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
- allocated channel: ORA_SBT_TAPE_1
- channel ORA_SBT_TAPE_1: SID=131 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
- starting media recovery
- archived log for thread 1 with sequence 164 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_164.287.981749483
- archived log for thread 1 with sequence 165 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_165.288.981749485
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_164.287.981749483 thread=1 sequence=164
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_165.288.981749485 thread=1 sequence=165
- unable to find archived log
- archived log thread=1 sequence=166
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of recover command at 07/17/2018 20:18:20
- RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 166 and starting SCN of 3896514
- RMAN> list failure ;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 676 CRITICAL OPEN 17-JUL-18 System datafile 1: '+DATA/orcl/datafile/system.256.816169553' needs media recovery
- 673 CRITICAL OPEN 17-JUL-18 Control file needs media recovery
- 8 HIGH OPEN 17-JUL-18 One or more non-system datafiles need media recovery
- RMAN> advise failure;
- List of Database Failures
- =========================
- Failure ID Priority Status Time Detected Summary
- ---------- -------- --------- ------------- -------
- 676 CRITICAL OPEN 17-JUL-18 System datafile 1: '+DATA/orcl/datafile/system.256.816169553' needs media recovery
- 673 CRITICAL OPEN 17-JUL-18 Control file needs media recovery
- 8 HIGH OPEN 17-JUL-18 One or more non-system datafiles need media recovery
- analyzing automatic repair options; this may take some time
- 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
- analyzing automatic repair options complete
- Mandatory Manual Actions
- ========================
- no manual actions available
- Optional Manual Actions
- =======================
- 1. If you have the correct version of the control file, then shutdown the database and replace the old control file
- 2. If you restored the wrong version of data file +DATA/orcl/datafile/system.256.816169553, then replace it with the correct one
- 3. If you restored the wrong version of data file +DATA/orcl/datafile/sysaux.257.816169553, then replace it with the correct one
- 4. If you restored the wrong version of data file +DATA/orcl/datafile/undotbs1.258.816169553, then replace it with the correct one
- 5. If you restored the wrong version of data file +DATA/orcl/datafile/users.259.816169553, then replace it with the correct one
- 6. If you restored the wrong version of data file +DATA/orcl/datafile/example.265.816169651, then replace it with the correct one
- Automated Repair Options
- ========================
- Option Repair Description
- ------ ------------------
- 1 Perform incomplete database recovery
- Strategy: The repair includes point-in-time recovery with some data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2346318570.hm
- RMAN> repair failure preview;
- Strategy: The repair includes point-in-time recovery with some data loss
- Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_2346318570.hm
- contents of repair script:
- # database point-in-time recovery until a missing log
- restore database until scn 3896514;
- recover database until scn 3896514;
- alter database open resetlogs;
- RMAN> run {
- 2> set until sequence 166 thread 1;
- 3> restore database;
- 4> recover database;
- 5> }
- executing command: SET until clause
- Starting restore at 17-JUL-18
- 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
- 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: restoring datafile 00005 to +DATA/orcl/datafile/example.265.816169651
- channel ORA_SBT_TAPE_1: reading from backup piece 1rt88jb3_1_1
- channel ORA_SBT_TAPE_2: starting datafile backup set restore
- channel ORA_SBT_TAPE_2: specifying datafile(s) to restore from backup set
- channel ORA_SBT_TAPE_2: restoring datafile 00002 to +DATA/orcl/datafile/sysaux.257.816169553
- channel ORA_SBT_TAPE_2: restoring datafile 00003 to +DATA/orcl/datafile/undotbs1.258.816169553
- channel ORA_SBT_TAPE_2: restoring datafile 00004 to +DATA/orcl/datafile/users.259.816169553
- channel ORA_SBT_TAPE_2: reading from backup piece 1qt88jb3_1_1
- channel ORA_SBT_TAPE_1: piece handle=1rt88jb3_1_1 tag=100T_WHOLE_FULL
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:55
- channel ORA_SBT_TAPE_2: piece handle=1qt88jb3_1_1 tag=100T_WHOLE_FULL
- channel ORA_SBT_TAPE_2: restored backup piece 1
- channel ORA_SBT_TAPE_2: restore complete, elapsed time: 00:01:05
- Finished restore at 17-JUL-18
- Starting recover at 17-JUL-18
- 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
- starting media recovery
- archived log for thread 1 with sequence 160 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_160.283.981749477
- archived log for thread 1 with sequence 161 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_161.284.981749479
- archived log for thread 1 with sequence 162 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_162.285.981749481
- archived log for thread 1 with sequence 163 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_163.286.981749481
- archived log for thread 1 with sequence 164 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_164.287.981749483
- archived log for thread 1 with sequence 165 is already on disk as file +FRA/orcl/archivelog/2018_07_17/thread_1_seq_165.288.981749485
- channel ORA_SBT_TAPE_1: starting archived log restore to default destination
- channel ORA_SBT_TAPE_1: restoring archived log
- archived log thread=1 sequence=159
- channel ORA_SBT_TAPE_1: reading from backup piece 1st88jbu_1_1
- channel ORA_SBT_TAPE_1: piece handle=1st88jbu_1_1 tag=100T_WHOLE_FULL
- channel ORA_SBT_TAPE_1: restored backup piece 1
- channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:25
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_159.258.981750195 thread=1 sequence=159
- channel default: deleting archived log(s)
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_159.258.981750195 RECID=158 STAMP=981750194
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_160.283.981749477 thread=1 sequence=160
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_161.284.981749479 thread=1 sequence=161
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_162.285.981749481 thread=1 sequence=162
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_163.286.981749481 thread=1 sequence=163
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_164.287.981749483 thread=1 sequence=164
- archived log file name=+FRA/orcl/archivelog/2018_07_17/thread_1_seq_165.288.981749485 thread=1 sequence=165
- media recovery complete, elapsed time: 00:00:02
- Finished recover at 17-JUL-18
- RMAN> alter database open resetlogs;
- database opened
- new incarnation of database registered in recovery catalog
- starting full resync of recovery catalog
- full resync complete
- RMAN>
复制代码
|
|