欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

RMAN如何實(shí)現(xiàn)完全恢復(fù)錯(cuò)誤

這篇文章主要為大家展示了“RMAN如何實(shí)現(xiàn)完全恢復(fù)錯(cuò)誤”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“RMAN如何實(shí)現(xiàn)完全恢復(fù)錯(cuò)誤”這篇文章吧。

專注于為中小企業(yè)提供網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站設(shè)計(jì)服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)正寧免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了上1000家企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。

RMAN恢復(fù)案例:

用戶在做rman的恢復(fù)時(shí)遇到以下錯(cuò)誤:

RMAN> restore database from tag='TAG20140923T160003';

Starting restore at 24-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=147 devtype=DISK
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/prod/system01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lv0_PROD_111_859046404.bak
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/app/oracle/oradata/prod/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/prod/sysaux01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lv0_PROD_112_859046404.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_112_859046404.bak tag=TAG20140923T160003
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_111_859046404.bak tag=TAG20140923T160003
channel ORA_DISK_2: restore complete, elapsed time: 00:00:35
Finished restore at 24-SEP-14

RMAN> recover database;

Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_118_859047306.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_119_859047306.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_118_859047306.bak tag=TAG20140923T161506
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_125_859048203.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_125_859048203.bak tag=TAG20140923T163003
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_119_859047306.bak tag=TAG20140923T161506
channel ORA_DISK_2: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_132_859049103.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_126_859048203.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_132_859049103.bak tag=TAG20140923T164503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_126_859048203.bak tag=TAG20140923T163003
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_133_859049103.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_133_859049103.bak tag=TAG20140923T164503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
starting media recovery
archive log thread 1 sequence 90 is already on disk as file /arch/1_90_858969934.dbf
archive log thread 1 sequence 91 is already on disk as file /arch/1_91_858969934.dbf
archive log thread 1 sequence 92 is already on disk as file /disk1/prod/redo01.log
archive log thread 1 sequence 93 is already on disk as file /disk1/prod/redo02.log
Oracle Error: 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 2 was not restored from a sufficiently old backup 
ORA-01110: data file 2: '/u01/app/oracle/oradata/prod/undotbs01.dbf'
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/24/2014 17:34:18
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 89 lowscn 647354 found to restore
RMAN-06025: no backup of log thread 1 seq 88 lowscn 647258 found to restore
RMAN-06025: no backup of log thread 1 seq 87 lowscn 647242 found to restore
RMAN-06025: no backup of log thread 1 seq 86 lowscn 646972 found to restore
RMAN-06025: no backup of log thread 1 seq 85 lowscn 646637 found to restore
RMAN-06025: no backup of log thread 1 seq 84 lowscn 646623 found to restore
RMAN-06025: no backup of log thread 1 seq 83 lowscn 646593 found to restore
RMAN-06025: no backup of log thread 1 seq 82 lowscn 645884 found to restore
RMAN-06025: no backup of log thread 1 seq 81 lowscn 645864 found to restore
RMAN-06025: no backup of log thread 1 seq 80 lowscn 645835 found to restore
RMAN-06025: no backup of log thread 1 seq 79 lowscn 645431 found to restore
RMAN-06025: no backup of log thread 1 seq 78 lowscn 645415 found to restore

恢復(fù)失敗,提示undo tablespace  recover failure!

查看告警日志:

The input backup piece /backup/rman_bak/lv0_PROD_111_859046404.bak is in compressed format.
Wed Sep 24 17:32:41 2014
The input backup piece /backup/rman_bak/lv0_PROD_112_859046404.bak is in compressed format.
Wed Sep 24 17:32:42 2014
Full restore complete of datafile 4 /u01/app/oracle/oradata/prod/users01.dbf.  Elapsed time: 0:00:01 
  checkpoint is 642397
Wed Sep 24 17:32:48 2014
Full restore complete of datafile 2 /u01/app/oracle/oradata/prod/undotbs01.dbf.  Elapsed time: 0:00:07 
  checkpoint is 642399
Wed Sep 24 17:33:02 2014
Full restore complete of datafile 5 /u01/app/oracle/oradata/prod/example01.dbf.  Elapsed time: 0:00:20 
  checkpoint is 642399
Full restore complete of datafile 3 /u01/app/oracle/oradata/prod/sysaux01.dbf.  Elapsed time: 0:00:25 
  checkpoint is 642399
Wed Sep 24 17:33:14 2014
Full restore complete of datafile 1 /u01/app/oracle/oradata/prod/system01.dbf.  Elapsed time: 0:00:33 
  checkpoint is 642397
Wed Sep 24 17:34:12 2014
The input backup piece /backup/rman_bak/lvl1_PROD_118_859047306.bak is in compressed format.
Wed Sep 24 17:34:12 2014
The input backup piece /backup/rman_bak/lvl1_PROD_119_859047306.bak is in compressed format.
Wed Sep 24 17:34:13 2014
Incremental restore complete of datafile 4 /u01/app/oracle/oradata/prod/users01.dbf
  checkpoint is 642881
Wed Sep 24 17:34:13 2014
Incremental restore complete of datafile 5 /u01/app/oracle/oradata/prod/example01.dbf
  checkpoint is 642883
Wed Sep 24 17:34:13 2014
Incremental restore complete of datafile 1 /u01/app/oracle/oradata/prod/system01.dbf
  checkpoint is 642881
Wed Sep 24 17:34:13 2014
Incremental restore complete of datafile 2 /u01/app/oracle/oradata/prod/undotbs01.dbf
  checkpoint is 642883
Wed Sep 24 17:34:14 2014
The input backup piece /backup/rman_bak/lvl1_PROD_125_859048203.bak is in compressed format.
Incremental restore complete of datafile 4 /u01/app/oracle/oradata/prod/users01.dbf
  checkpoint is 643340
Wed Sep 24 17:34:14 2014
Incremental restore complete of datafile 3 /u01/app/oracle/oradata/prod/sysaux01.dbf
  checkpoint is 642883
Wed Sep 24 17:34:14 2014
Incremental restore complete of datafile 1 /u01/app/oracle/oradata/prod/system01.dbf
  checkpoint is 643340
The input backup piece /backup/rman_bak/lvl1_PROD_132_859049103.bak is in compressed format.
Wed Sep 24 17:34:15 2014
The input backup piece /backup/rman_bak/lvl1_PROD_126_859048203.bak is in compressed format.
Wed Sep 24 17:34:15 2014
Incremental restore complete of datafile 4 /u01/app/oracle/oradata/prod/users01.dbf
  checkpoint is 643737
Wed Sep 24 17:34:15 2014
Incremental restore complete of datafile 5 /u01/app/oracle/oradata/prod/example01.dbf
  checkpoint is 643342
Wed Sep 24 17:34:15 2014
Incremental restore complete of datafile 1 /u01/app/oracle/oradata/prod/system01.dbf
  checkpoint is 643737
Wed Sep 24 17:34:15 2014
Incremental restore complete of datafile 3 /u01/app/oracle/oradata/prod/sysaux01.dbf
  checkpoint is 643342
Incremental restore complete of datafile 2 /u01/app/oracle/oradata/prod/undotbs01.dbf
  checkpoint is 643342
Wed Sep 24 17:34:16 2014
The input backup piece /backup/rman_bak/lvl1_PROD_133_859049103.bak is in compressed format.
Incremental restore complete of datafile 5 /u01/app/oracle/oradata/prod/example01.dbf
  checkpoint is 643739
Incremental restore complete of datafile 3 /u01/app/oracle/oradata/prod/sysaux01.dbf
  checkpoint is 643739
Incremental restore complete of datafile 2 /u01/app/oracle/oradata/prod/undotbs01.dbf
  checkpoint is 643739
Wed Sep 24 17:34:17 2014
alter database recover datafile list clear
Wed Sep 24 17:34:17 2014
Completed: alter database recover datafile list clear
Wed Sep 24 17:34:17 2014
alter database recover datafile list
 1 , 2 , 3 , 4 , 5
Completed: alter database recover datafile list
 1 , 2 , 3 , 4 , 5
Wed Sep 24 17:34:17 2014
alter database recover if needed
 start until cancel using backup controlfile
Media Recovery Start
 parallel recovery started with 3 processes
ORA-279 signalled during: alter database recover if needed
 start until cancel using backup controlfile
...
Wed Sep 24 17:34:18 2014
alter database recover cancel
Signalling error 1152 for datafile 2!
ORA-1547 signalled during: alter database recover cancel...
Wed Sep 24 17:34:56 2014
control file header validation failure for file /backup/rman_bak/ctl1_166.bak
Wed Sep 24 17:35:53 2014
The input backup piece /backup/rman_bak/ctl1_166.bak is in compressed format.

解決方法:

通過備份的controlfile進(jìn)行恢復(fù)

RMAN> list backup of controlfile;

但是通過rman查看備份的controlfile信息時(shí),卻沒有!

還好,在磁盤上找到一個(gè)控制文件的backup piece!

加載到rman metadata中:

RMAN> catalog backuppiece '/backup/rman_bak/ctl1_166.bak';

cataloged backuppiece
backup piece handle=/backup/rman_bak/ctl1_166.bak recid=191 stamp=859138553

RMAN> list backup of controlfile;

List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
162     Full    1.06M      DISK        00:00:01     23-SEP-14      
        BP Key: 191   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T174510
        Piece Name: /backup/rman_bak/ctl1_166.bak
  Control File Included: Ckp SCN: 645423       Ckp time: 23-SEP-14

查看備份信息:

RMAN> list backup of database ;

List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
107     Incr 0  36.22M     DISK        00:06:19     23-SEP-14      
        BP Key: 107   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T160003
        Piece Name: /backup/rman_bak/lv0_PROD_112_859046404.bak
  List of Datafiles in backup set 107
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    0  Incr 642399     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    0  Incr 642399     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    0  Incr 642399     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
108     Incr 0  81.68M     DISK        00:06:30     23-SEP-14      
        BP Key: 108   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T160003
        Piece Name: /backup/rman_bak/lv0_PROD_111_859046404.bak
  List of Datafiles in backup set 108
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 642397     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    0  Incr 642397     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
114     Incr 1  216.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 114   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T161506
        Piece Name: /backup/rman_bak/lvl1_PROD_118_859047306.bak
  List of Datafiles in backup set 114
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 642881     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 642881     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
115     Incr 1  1.09M      DISK        00:00:05     23-SEP-14      
        BP Key: 115   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T161506
        Piece Name: /backup/rman_bak/lvl1_PROD_119_859047306.bak
  List of Datafiles in backup set 115
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 642883     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 642883     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 642883     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
121     Incr 1  168.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 121   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T163003
        Piece Name: /backup/rman_bak/lvl1_PROD_125_859048203.bak
  List of Datafiles in backup set 121
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 643340     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 643340     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
122     Incr 1  240.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 122   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T163003
        Piece Name: /backup/rman_bak/lvl1_PROD_126_859048203.bak
  List of Datafiles in backup set 122
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 643342     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 643342     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 643342     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
128     Incr 1  192.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 128   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T164503
        Piece Name: /backup/rman_bak/lvl1_PROD_132_859049103.bak
  List of Datafiles in backup set 128
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 643737     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 643737     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
129     Incr 1  240.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 129   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T164503
        Piece Name: /backup/rman_bak/lvl1_PROD_133_859049103.bak
  List of Datafiles in backup set 129
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 643739     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 643739     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 643739     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
135     Incr 0  36.26M     DISK        00:01:40     23-SEP-14      
        BP Key: 135   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T170004
        Piece Name: /backup/rman_bak/lv0_PROD_140_859050004.bak
  List of Datafiles in backup set 135
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    0  Incr 644121     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    0  Incr 644121     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    0  Incr 644121     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
138     Incr 0  81.69M     DISK        00:02:18     23-SEP-14      
        BP Key: 138   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T170004
        Piece Name: /backup/rman_bak/lv0_PROD_139_859050004.bak
  List of Datafiles in backup set 138
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    0  Incr 644119     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    0  Incr 644119     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
142     Incr 1  112.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 142   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T171504
        Piece Name: /backup/rman_bak/lvl1_PROD_146_859050904.bak
  List of Datafiles in backup set 142
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 644562     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 644562     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
143     Incr 1  1.09M      DISK        00:00:02     23-SEP-14      
        BP Key: 143   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T171504
        Piece Name: /backup/rman_bak/lvl1_PROD_147_859050904.bak
  List of Datafiles in backup set 143
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 644564     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 644564     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 644564     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
149     Incr 1  152.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 149   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T173003
        Piece Name: /backup/rman_bak/lvl1_PROD_153_859051804.bak
  List of Datafiles in backup set 149
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 645007     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 645007     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
150     Incr 1  240.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 150   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T173003
        Piece Name: /backup/rman_bak/lvl1_PROD_154_859051804.bak
  List of Datafiles in backup set 150
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 645009     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 645009     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 645009     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
156     Incr 1  232.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 156   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T174503
        Piece Name: /backup/rman_bak/lvl1_PROD_161_859052703.bak
  List of Datafiles in backup set 156
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  2    1  Incr 645407     23-SEP-14 /u01/app/oracle/oradata/prod/undotbs01.dbf
  3    1  Incr 645407     23-SEP-14 /u01/app/oracle/oradata/prod/sysaux01.dbf
  5    1  Incr 645407     23-SEP-14 /u01/app/oracle/oradata/prod/example01.dbf
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
157     Incr 1  128.00K    DISK        00:00:01     23-SEP-14      
        BP Key: 157   Status: AVAILABLE  Compressed: YES  Tag: TAG20140923T174503
        Piece Name: /backup/rman_bak/lvl1_PROD_160_859052703.bak
  List of Datafiles in backup set 157
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1    1  Incr 645405     23-SEP-14 /u01/app/oracle/oradata/prod/system01.dbf
  4    1  Incr 645405     23-SEP-14 /u01/app/oracle/oradata/prod/users01.dbf

控制文件的備份是在9月23日,17:45分,選擇9月23日17:00的0級(jí)數(shù)據(jù)文件備份進(jìn)行數(shù)據(jù)文件的轉(zhuǎn)儲(chǔ)!

轉(zhuǎn)儲(chǔ)控制文件:

 RMAN> shutdown abort;
Oracle instance shut down
RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area     570425344 bytes
Fixed Size                     2022480 bytes
Variable Size                184550320 bytes
Database Buffers             377487360 bytes
Redo Buffers                   6365184 bytes
RMAN> restore controlfile from '/backup/rman_bak/ctl1_166.bak';
Starting restore at 24-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=155 devtype=DISK
channel ORA_DISK_2: skipped, autobackup already found
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:11
output filename=/u01/app/oracle/oradata/prod/control01.ctl
output filename=/disk1/prod/control02.ctl
output filename=/disk2/prod/control03.ctl
Finished restore at 24-SEP-14

轉(zhuǎn)儲(chǔ)數(shù)據(jù)文件:

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1
released channel: ORA_DISK_2

RMAN> restore database from tag='TAG20140923T170004';

Starting restore at 24-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=156 devtype=DISK
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/prod/system01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lv0_PROD_139_859050004.bak
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/app/oracle/oradata/prod/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/prod/sysaux01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lv0_PROD_140_859050004.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_140_859050004.bak tag=TAG20140923T170004
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_139_859050004.bak tag=TAG20140923T170004
channel ORA_DISK_2: restore complete, elapsed time: 00:00:35
Finished restore at 24-SEP-14

查看轉(zhuǎn)儲(chǔ)后的數(shù)據(jù)文件和控制文件的checkpoint:

SQL> col name for a50
SQL> r
  1* select name ,checkpoint_change# from v$datafile
NAME                                               CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf                      645405
/u01/app/oracle/oradata/prod/undotbs01.dbf                     645407
/u01/app/oracle/oradata/prod/sysaux01.dbf                      645407
/u01/app/oracle/oradata/prod/users01.dbf                       645405
/u01/app/oracle/oradata/prod/example01.dbf                     645407
SQL> select name ,checkpoint_change# from v$datafile_header;
NAME                                               CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf                      644119
/u01/app/oracle/oradata/prod/undotbs01.dbf                     644121
/u01/app/oracle/oradata/prod/sysaux01.dbf                      644121
/u01/app/oracle/oradata/prod/users01.dbf                       644119
/u01/app/oracle/oradata/prod/example01.dbf                     644121

對(duì)database做recover:

RMAN> recover database;

Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_146_859050904.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_147_859050904.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_146_859050904.bak tag=TAG20140923T171504
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_153_859051804.bak
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_147_859050904.bak tag=TAG20140923T171504
channel ORA_DISK_2: restore complete, elapsed time: 00:00:02
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_154_859051804.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_153_859051804.bak tag=TAG20140923T173003
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_154_859051804.bak tag=TAG20140923T173003
channel ORA_DISK_2: restore complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_160_859052703.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_161_859052703.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_160_859052703.bak tag=TAG20140923T174503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_161_859052703.bak tag=TAG20140923T174503
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
starting media recovery
archive log thread 1 sequence 92 is already on disk as file /disk1/prod/redo01.log
archive log thread 1 sequence 93 is already on disk as file /disk1/prod/redo02.log
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=77
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/arch2_165.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/arch2_165.bak tag=TAG20140923T174507
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/arch/1_77_858969934.dbf thread=1 sequence=77
unable to find archive log
archive log thread=1 sequence=78
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/24/2014 17:44:48
RMAN-06054: media recovery requesting unknown log: thread 1 seq 78 lowscn 645415

recover failure,提示缺少archivelog ,做不完全恢復(fù)!

RMAN> run {
2> set until sequence 78;
3> recover database;
4> }
executing command: SET until clause
Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 24-SEP-14

recover完成!

查看恢復(fù)后的database checkpoint:

SQL> select name ,checkpoint_change# from v$datafile;
NAME                                               CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf                      645415
/u01/app/oracle/oradata/prod/undotbs01.dbf                     645415
/u01/app/oracle/oradata/prod/sysaux01.dbf                      645415
/u01/app/oracle/oradata/prod/users01.dbf                       645415
/u01/app/oracle/oradata/prod/example01.dbf                     645415
SQL> select name ,checkpoint_change# from v$datafile_header;
NAME                                               CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf                      645415
/u01/app/oracle/oradata/prod/undotbs01.dbf                     645415
/u01/app/oracle/oradata/prod/sysaux01.dbf                      645415
/u01/app/oracle/oradata/prod/users01.dbf                       645415
/u01/app/oracle/oradata/prod/example01.dbf                     645415

打開數(shù)據(jù)庫:

RMAN> alter database open resetlogs;

database opened

@數(shù)據(jù)庫open成功,至此,數(shù)據(jù)庫恢復(fù)完成!

以上是“RMAN如何實(shí)現(xiàn)完全恢復(fù)錯(cuò)誤”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

當(dāng)前標(biāo)題:RMAN如何實(shí)現(xiàn)完全恢復(fù)錯(cuò)誤
當(dāng)前URL:http://aaarwkj.com/article6/gpidog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站自適應(yīng)網(wǎng)站、移動(dòng)網(wǎng)站建設(shè)網(wǎng)站營(yíng)銷、云服務(wù)器、微信小程序

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)頁設(shè)計(jì)公司
午夜激情视频免费国产| 這裏隻有无码人妻久久| 中文色婷婷国产精品视频| 亚洲av成人永久网站一区| 在线观看青青草原免费| 黄色av网站在线免费| 精品日韩av一区二区三区| 国产精品自拍午夜福利| 国产在线一区二区三区蜜桃| 日本啪啪啪一区二区三区| 亚洲一区二区三区小蜜桃| 国产成人福利视频在线观看| 国产精品亚洲伦理在线| 深夜福利视频一区二区| 91九色国产老熟女乱子| 久久久久久这里都是精品| 国产一区二区三区日本精品| 欧美制服丝袜亚洲自拍偷拍| 日韩一级精品电影网| 久久午夜福利欧美视频| 亚洲国产精品激情在线| 粉嫩一区二区三区在线| 国产又黄又爽不卡的视频| av影片在线观看亚洲天堂| 久久精品一区二区东京热| 青青草原一区在线观看| 国产自拍免费在线观看视频| 漂亮人妻少妇中文字幕| 久久亚洲精品中文字幕一 | 男同午夜视频在线观看| 亚洲综合欧美自偷自拍| 国产三级全黄在线播放| 国产激情久久久久久影院| 日韩精品在线播放观看| 日本一区二区三区日本| 日韩精品在线观看不卡| 桃色av一区二区三区| 国产l精品国产亚洲区久久| 亚洲成人久久久av一区| 清纯唯美校园春色亚洲激情| 国产一区日本二区欧美三区|