丟失活動或當前日誌組的恢復
我們知道current狀態的日誌組是oracle正在使用的日誌組,也就是LGWR在寫的日誌組,如果這種狀態的日誌組丟失了,那麼我們如何來恢復呢?
這裡要分成兩種情況,一種是資料庫正常關閉,一種是資料庫異常關閉。
如果資料庫是正常關閉的,由於此時資料庫已經完成了檢查點,所有提交的事務都已經被寫入到資料檔案中,所以不存在資料丟失,當前日誌在例項恢復中不再需要,那麼我們可以直接使用clear來對丟失的日誌檔案進行重建。
如果資料庫是異常關閉的,那麼oracle在進行例項恢復時必然要用到當前的日誌檔案,否則oracle無法保證提交的資料不丟失。在這種情況下,oracle將無法啟動。
在這種情況下,我們需要使用備份的資料檔案,從備份中恢復資料檔案,再利用歸檔日誌檔案向前推演,知道最後一個完好的日誌檔案,然後透過resetlogs開啟資料庫。此時還是會丟失資料,丟失的資料就是丟失的當前的日誌檔案中的資料。下面我們演示一下這種情況:
檢視當前日誌組:
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 INACTIVE
3 1 CURRENT
在hh使用者下建立表h2,並且在其中插入1000000條記錄:
SQL> create table h2(id int);
Table created.
SQL> begin
2 for i in 1..1000000
3 loop
4 insert into h2 values(i);
5 end loop;
6 end;
7 /
PL/SQL procedure successfully completed.
切換到sys使用者並且模擬資料庫異常關閉:
SQL> shutdown abort;
ORACLE instance shut down.
接著,把current的日誌組3---redo03.log移到其他目錄:
[oracle@localhost orcl]$ ls
control01.ctl hh01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
example01.dbf redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@localhost orcl]$ mv ./redo03.log /test
再次開啟資料庫:
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 520097360 bytes
Database Buffers 322961408 bytes
Redo Buffers 5132288 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
檢視警報日誌檔案:
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_28519.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
下面我們啟動資料庫到mount,檢視各日誌組的狀態:
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 ACTIVE
3 1 ACTIVE
2 1 CURRENT
嘗試使用clear命令:
SQL> alter database clear logfile group 3;
alter database clear logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance orcl (thread 1)
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
下面使用rman進行還原恢復:
RMAN> restore database;
Starting restore at 22-AUG-14
using channel ORA_DISK_1
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 /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_07pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_07pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
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 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_06pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_06pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
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 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_05pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_05pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
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 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
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 00007 to /u01/app/oracle/oradata/orcl/hh01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0fpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0fpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 22-AUG-14
RMAN> recover database;
Starting recover at 22-AUG-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00005: /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/orcl/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_09pghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_09pghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0apghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0apghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: /u01/app/oracle/oradata/orcl/undotbs01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/orcl/example01.dbf
destination for restore of datafile 00006: /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0gpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0gpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0epghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0epghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0fpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0fpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
starting media recovery
archived log for thread 1 with sequence 11 is already on disk as file /u01/app/archivelog/dest1/1_11_856205535.dbf
archived log for thread 1 with sequence 13 is already on disk as file /u01/app/archivelog/dest1/1_13_856205535.dbf
archived log for thread 1 with sequence 14 is already on disk as file /u01/app/archivelog/dest1/1_14_856205535.dbf
archived log for thread 1 with sequence 15 is already on disk as file /u01/app/archivelog/dest1/1_15_856205535.dbf
archived log for thread 1 with sequence 16 is already on disk as file /u01/app/archivelog/dest1/1_16_856205535.dbf
archived log for thread 1 with sequence 17 is already on disk as file /u01/app/archivelog/dest1/1_17_856205535.dbf
archived log for thread 1 with sequence 18 is already on disk as file /u01/app/archivelog/dest1/1_18_856205535.dbf
archived log for thread 1 with sequence 19 is already on disk as file /u01/app/archivelog/dest1/1_19_856205535.dbf
archived log for thread 1 with sequence 20 is already on disk as file /u01/app/archivelog/dest1/1_20_856205535.dbf
archived log for thread 1 with sequence 21 is already on disk as file /u01/app/archivelog/dest1/1_21_856205535.dbf
archived log for thread 1 with sequence 22 is already on disk as file /u01/app/archivelog/dest1/1_22_856205535.dbf
archived log for thread 1 with sequence 23 is already on disk as file /u01/app/archivelog/dest1/1_23_856205535.dbf
archived log file name=/u01/app/archivelog/dest1/1_11_856205535.dbf thread=1 sequence=11
unable to find archived log
archived log thread=1 sequence=12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/22/2014 22:15:46
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 12 and starting SCN of 835057
RMAN> recover database until scn 835057;
Starting recover at 22-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 22-AUG-14
使用resetlogs開啟資料庫:
SQL> alter database open resetlogs;
Database altered.
但記錄在丟失的當前日誌組中的記錄已經丟失了:
SQL> select * from h2;
select * from h2
*
ERROR at line 1:
ORA-00942: table or view does not exist
這裡要分成兩種情況,一種是資料庫正常關閉,一種是資料庫異常關閉。
如果資料庫是正常關閉的,由於此時資料庫已經完成了檢查點,所有提交的事務都已經被寫入到資料檔案中,所以不存在資料丟失,當前日誌在例項恢復中不再需要,那麼我們可以直接使用clear來對丟失的日誌檔案進行重建。
如果資料庫是異常關閉的,那麼oracle在進行例項恢復時必然要用到當前的日誌檔案,否則oracle無法保證提交的資料不丟失。在這種情況下,oracle將無法啟動。
在這種情況下,我們需要使用備份的資料檔案,從備份中恢復資料檔案,再利用歸檔日誌檔案向前推演,知道最後一個完好的日誌檔案,然後透過resetlogs開啟資料庫。此時還是會丟失資料,丟失的資料就是丟失的當前的日誌檔案中的資料。下面我們演示一下這種情況:
檢視當前日誌組:
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 UNUSED
2 1 INACTIVE
3 1 CURRENT
SQL> create table h2(id int);
Table created.
SQL> begin
2 for i in 1..1000000
3 loop
4 insert into h2 values(i);
5 end loop;
6 end;
7 /
PL/SQL procedure successfully completed.
切換到sys使用者並且模擬資料庫異常關閉:
SQL> shutdown abort;
ORACLE instance shut down.
[oracle@localhost orcl]$ ls
control01.ctl hh01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
example01.dbf redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@localhost orcl]$ mv ./redo03.log /test
SQL> startup
ORACLE instance started.
Total System Global Area 849530880 bytes
Fixed Size 1339824 bytes
Variable Size 520097360 bytes
Database Buffers 322961408 bytes
Redo Buffers 5132288 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
檢視警報日誌檔案:
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_28519.trc:
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
SQL> select group#,members,status from v$log;
GROUP# MEMBERS STATUS
---------- ---------- ----------------
1 1 ACTIVE
3 1 ACTIVE
2 1 CURRENT
SQL> alter database clear logfile group 3;
alter database clear logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance orcl (thread 1)
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/orcl/redo03.log'
RMAN> restore database;
Starting restore at 22-AUG-14
using channel ORA_DISK_1
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 /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_07pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_07pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
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 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_06pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_06pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
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 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb0_05pghdqd_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb0_05pghdqd_1_1 tag=INDB0
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
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 00006 to /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
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 00007 to /u01/app/oracle/oradata/orcl/hh01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0fpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0fpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 22-AUG-14
RMAN> recover database;
Starting recover at 22-AUG-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00005: /u01/app/oracle/oradata/orcl/example01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0bpghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0bpghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/orcl/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_09pghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_09pghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/orcl/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0apghe88_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0apghe88_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00003: /u01/app/oracle/oradata/orcl/undotbs01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/orcl/example01.dbf
destination for restore of datafile 00006: /u01/app/datafile/test01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0gpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0gpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0epghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0epghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/orcl/sysaux01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/backup/indb1_0fpghqfm_1_1
channel ORA_DISK_1: piece handle=/u01/app/backup/indb1_0fpghqfm_1_1 tag=INDB1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
starting media recovery
archived log for thread 1 with sequence 11 is already on disk as file /u01/app/archivelog/dest1/1_11_856205535.dbf
archived log for thread 1 with sequence 13 is already on disk as file /u01/app/archivelog/dest1/1_13_856205535.dbf
archived log for thread 1 with sequence 14 is already on disk as file /u01/app/archivelog/dest1/1_14_856205535.dbf
archived log for thread 1 with sequence 15 is already on disk as file /u01/app/archivelog/dest1/1_15_856205535.dbf
archived log for thread 1 with sequence 16 is already on disk as file /u01/app/archivelog/dest1/1_16_856205535.dbf
archived log for thread 1 with sequence 17 is already on disk as file /u01/app/archivelog/dest1/1_17_856205535.dbf
archived log for thread 1 with sequence 18 is already on disk as file /u01/app/archivelog/dest1/1_18_856205535.dbf
archived log for thread 1 with sequence 19 is already on disk as file /u01/app/archivelog/dest1/1_19_856205535.dbf
archived log for thread 1 with sequence 20 is already on disk as file /u01/app/archivelog/dest1/1_20_856205535.dbf
archived log for thread 1 with sequence 21 is already on disk as file /u01/app/archivelog/dest1/1_21_856205535.dbf
archived log for thread 1 with sequence 22 is already on disk as file /u01/app/archivelog/dest1/1_22_856205535.dbf
archived log for thread 1 with sequence 23 is already on disk as file /u01/app/archivelog/dest1/1_23_856205535.dbf
archived log file name=/u01/app/archivelog/dest1/1_11_856205535.dbf thread=1 sequence=11
unable to find archived log
archived log thread=1 sequence=12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/22/2014 22:15:46
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 12 and starting SCN of 835057
RMAN> recover database until scn 835057;
Starting recover at 22-AUG-14
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:00
Finished recover at 22-AUG-14
SQL> alter database open resetlogs;
Database altered.
但記錄在丟失的當前日誌組中的記錄已經丟失了:
SQL> select * from h2;
select * from h2
*
ERROR at line 1:
ORA-00942: table or view does not exist
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1256447/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Redo丟失恢復方案Oracle
- oracle控制檔案的損壞或完全丟失的恢復辦法Oracle
- 伺服器資料丟失了怎麼恢復/分割槽丟失恢復教程伺服器
- 當前日誌損壞的案例(轉)
- 硬碟資料丟失如何恢復?硬碟
- 分割槽丟失資料恢復資料恢復
- chkdsk 後資料丟失的恢復方法
- 2.7.10 恢復丟失或損壞的伺服器引數檔案(SPFILE)伺服器
- 丟失的隨身碟檔案如何恢復?
- oracle丟失的是所有的redo日誌組Oracle
- 剪下的檔案還能恢復嗎,恢復剪貼丟失的檔案
- 伺服器RAID資料丟失恢復伺服器AI
- OMV資料恢復NAS陣列丟失資料恢復陣列
- 電腦檔案丟失資料恢復資料恢復
- 如何恢復伺服器資料丟失伺服器
- 【BBED】丟失歸檔檔案情況下的恢復
- u盤資料丟失怎麼恢復?有效的恢復方法在這裡
- 【伺服器資料恢復】意外斷電導致RAID模組資訊丟失的資料恢復案例伺服器資料恢復AI
- 硬碟/行動硬碟分割槽合併失敗資料丟失瞭如何恢復?硬碟
- Oracle 目錄許可權丟失故障恢復Oracle
- Sql Server資料庫檔案丟失的恢復方法SQLServer資料庫
- Oracle閃回功能恢復偶然丟失的資料(轉)Oracle
- Omni Recover for Mac如何恢復所有丟失的iPhone資料MaciPhone
- NetApp資料恢復—NetApp儲存池中劃分的卷丟失的資料恢復案例APP資料恢復
- 【raid資料恢復案例】raid擴容導致的資料丟失的資料恢復AI資料恢復
- 資料庫資料恢復—MongoDB資料庫檔案丟失,啟動報錯的資料恢復案例資料庫資料恢復MongoDB
- 伺服器資料恢復案例之RAID資訊丟失資料恢復伺服器資料恢復AI
- 伺服器(RAID1)資料丟失恢復伺服器AI
- 伺服器(RAID)資料丟失瞭如何恢復?伺服器AI
- dg丟失歸檔,使用rman增量備份恢復
- 虛擬機器未知原因丟失的資料恢復案例虛擬機資料恢復
- DATA GUARD主庫丟失資料檔案的恢復(3)
- 如何使用Disk Drill 3為macOS恢復丟失的資料?Mac
- DATA GUARD主庫丟失資料檔案的恢復(1)
- DATA GUARD主庫丟失資料檔案的恢復(2)
- 【ASK_ORACLE】Oracle表決磁碟丟失後的恢復方法Oracle
- 測試在丟失歸檔日誌的情況下,跳過部分歸檔日誌進行資料恢復資料恢復
- Jquery對當前日期的操作(格式化當前日期)jQuery
- 電腦硬碟資料丟失後怎麼恢復?硬碟資料恢復技巧教程硬碟資料恢復