rmanリカバリundoテーブル空間

5033 ワード

説明:
アナログリカバリundoテーブルスペースの損失とリカバリのプロセス
実験プロセス:
注意:テスト前にデータベースをフルバックアップまたはレベル0バックアップする
完全な準備:
backup database format 'g:\rmanbak\db_%d_%T_%s.bak' plus archivelog format 'g:\rmanbak\arch_%d_%T_%s.bak';
レベル0のバックアップ:
backup incremental level 0  database format 'g:\rmanbak\db_%d_%T_%s.bak' plus archivelog format 'g:\rmanbak\arch_%d_%T_%s.bak';
(1)undoを削除し、sqlplusにログインしてエラーを報告する
C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on   6  14 10:24:38 2017

Copyright (c) 1982, 2010, 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> conn scott/tiger
ERROR:
ORA-02002:  
ORA-00604:   SQL   1  
ORA-01116:   3  
ORA-01110:   3: 'F:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF'
ORA-27041:  
OSD-04002: unable to open file
O/S-Error: (OS 2)  。

Warning: You are no longer connected to ORACLE.
SQL>

(2)rmanにログインして復旧する
C:\Users\Administrator>rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on   6  14 10:26:24 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1468451227)

RMAN> run{
2> shutdown abort
3> startup mount
4> restore datafile 3;
5> recover datafile 3;
6> sql 'alter database open';
7> }

using target database control file instead of recovery catalog
Oracle instance shut down

connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     430075904 bytes

Fixed Size                     2176448 bytes
Variable Size                322964032 bytes
Database Buffers              96468992 bytes
Redo Buffers                   8466432 bytes

Starting restore at 14-6  -17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00003 to F:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF
channel ORA_DISK_1: reading from backup piece G:\RMANBP\FDB_ORCL_20170613_14.BAK
channel ORA_DISK_1: piece handle=G:\RMANBP\FDB_ORCL_20170613_14.BAK tag=TAG20170613T123834
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
Finished restore at 14-6  -17

Starting recover at 14-6  -17
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 74 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_74_D
MYVCR6Q_.ARC
archived log for thread 1 with sequence 75 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_75_D
MYVTGMD_.ARC
archived log for thread 1 with sequence 76 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_76_D
MZ8PWJ1_.ARC
archived log for thread 1 with sequence 77 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_14\O1_MF_1_77_D
N155JPS_.ARC
archived log for thread 1 with sequence 78 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_14\O1_MF_1_78_D
N16YS6W_.ARC
archived log for thread 1 with sequence 79 is already on disk as file F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_14\O1_MF_1_79_D
N17JN2C_.ARC
archived log file name=F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_74_DMYVCR6Q_.ARC thread=1 sequence=74
archived log file name=F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_75_DMYVTGMD_.ARC thread=1 sequence=75
archived log file name=F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_13\O1_MF_1_76_DMZ8PWJ1_.ARC thread=1 sequence=76
archived log file name=F:\APP\ADMINISTRATOR\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2017_06_14\O1_MF_1_77_DN155JPS_.ARC thread=1 sequence=77
media recovery complete, elapsed time: 00:00:03
Finished recover at 14-6  -17

sql statement: alter database open

RMAN>

(3)Scottユーザー登録成功
C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on   6  14 10:24:38 2017

Copyright (c) 1982, 2010, 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> conn scott/tiger
ERROR:
ORA-02002:  
ORA-00604:   SQL   1  
ORA-01116:   3  
ORA-01110:   3: 'F:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBF'
ORA-27041:  
OSD-04002: unable to open file
O/S-Error: (OS 2)  。


Warning: You are no longer connected to ORACLE.
SQL> conn scott/tiger
Connected.
SQL>

リカバリ成功!