ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 测试恢复6==测试RMAN恢复的时候选 用那一个备份集

测试恢复6==测试RMAN恢复的时候选 用那一个备份集

原创 Linux操作系统 作者:oracle_db 时间:2012-04-27 14:31:00 0 删除 编辑
测试RMAN恢复是采用那一个备份集
========================准备工作===============================
会话1:用RAMN做合为中备份[oracle@oraclelinux ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Apr 27 14:10:30 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

connected to target database: DBTEST (DBID=1170856661)

RMAN> list backup;

using target database control file instead of recovery catalog

RMAN> list backup;


RMAN> backup database format '/backup/rmanbackup/rman1_%U';

Starting backup at 27-APR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=153 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oradata/dbtest/system01.dbf
input datafile fno=00003 name=/u01/oradata/dbtest/sysaux01.dbf
input datafile fno=00002 name=/u01/oradata/dbtest/undotbs01.dbf
input datafile fno=00005 name=/u01/oradata/dbtest/example01.dbf
input datafile fno=00009 name=/u01/oradata/dbtest/qq01.dbf
input datafile fno=00006 name=/u01/oradata/dbtest/paul01.dbf
input datafile fno=00007 name=/u01/oradata/dbtest/wenchuan01.dbf
input datafile fno=00008 name=/u01/oradata/dbtest/wenchuan2.dbf
input datafile fno=00010 name=/u01/oradata/dbtest/qq02.dbf
input datafile fno=00004 name=/u01/oradata/dbtest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-APR-12
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/27/2012 14:12:22
ORA-19504: failed to create file "/backup/rmanbackup/rman1_02n9fui5_1_1"
ORA-27040: file create error, unable to create file
Linux Error: 13: Permission denied

RMAN> backup database format '/backup/rmanbackup/rman1_%U';

Starting backup at 27-APR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oradata/dbtest/system01.dbf
input datafile fno=00003 name=/u01/oradata/dbtest/sysaux01.dbf
input datafile fno=00002 name=/u01/oradata/dbtest/undotbs01.dbf
input datafile fno=00005 name=/u01/oradata/dbtest/example01.dbf
input datafile fno=00009 name=/u01/oradata/dbtest/qq01.dbf
input datafile fno=00006 name=/u01/oradata/dbtest/paul01.dbf
input datafile fno=00007 name=/u01/oradata/dbtest/wenchuan01.dbf
input datafile fno=00008 name=/u01/oradata/dbtest/wenchuan2.dbf
input datafile fno=00010 name=/u01/oradata/dbtest/qq02.dbf
input datafile fno=00004 name=/u01/oradata/dbtest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/rman1_03n9fun5_1_1 tag=TAG20120427T141501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:02
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/rman1_04n9fusr_1_1 tag=TAG20120427T141501 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
Finished backup at 27-APR-12

RMAN> sql 'alter system archive log current';

sql statement: alter system archive log current

RMAN> list backup;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    799.63M    DISK        00:02:59     27-APR-12      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20120427T141501
        Piece Name: /backup/rmanbackup/rman1_03n9fun5_1_1
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1700270    27-APR-12 /u01/oradata/dbtest/system01.dbf
  2       Full 1700270    27-APR-12 /u01/oradata/dbtest/undotbs01.dbf
  3       Full 1700270    27-APR-12 /u01/oradata/dbtest/sysaux01.dbf
  4       Full 1700270    27-APR-12 /u01/oradata/dbtest/users01.dbf
  5       Full 1700270    27-APR-12 /u01/oradata/dbtest/example01.dbf
  6       Full 1700270    27-APR-12 /u01/oradata/dbtest/paul01.dbf
  7       Full 1700270    27-APR-12 /u01/oradata/dbtest/wenchuan01.dbf
  8       Full 1700270    27-APR-12 /u01/oradata/dbtest/wenchuan2.dbf
  9       Full 1700270    27-APR-12 /u01/oradata/dbtest/qq01.dbf
  10      Full 1700270    27-APR-12 /u01/oradata/dbtest/qq02.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    7.08M      DISK        00:00:02     27-APR-12      
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20120427T141501
        Piece Name: /backup/rmanbackup/rman1_04n9fusr_1_1
  Control File Included: Ckp SCN: 1700368      Ckp time: 27-APR-12
会话1:RMAN做0级别增量备份RMAN> backup incremental level 0 database plus archivelog delete all input format '/backup/rmanbackup/incrent0_%U';


Starting backup at 27-APR-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=58 recid=1 stamp=781633854
input archive log thread=1 sequence=59 recid=2 stamp=781633864
input archive log thread=1 sequence=60 recid=3 stamp=781633864
input archive log thread=1 sequence=61 recid=9 stamp=781658544
input archive log thread=1 sequence=62 recid=10 stamp=781658544
input archive log thread=1 sequence=63 recid=7 stamp=781658543
input archive log thread=1 sequence=64 recid=8 stamp=781658544
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/incrent0_05n9fv38_1_1 tag=TAG20120427T142127 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_58_7sl1xww5_.arc recid=1 stamp=781633854
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_59_7sl1xz1f_.arc recid=2 stamp=781633864
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_60_7sl1y0f9_.arc recid=3 stamp=781633864
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_61_7slt1jcv_.arc recid=9 stamp=781658544
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_61_7sl1y8y0_.arc recid=4 stamp=781633865
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_62_7slt1jf2_.arc recid=10 stamp=781658544
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_62_7slnz8lt_.arc recid=5 stamp=781653352
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_63_7slt1hld_.arc recid=7 stamp=781658543
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_63_7slo0hrf_.arc recid=6 stamp=781653392
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_26/o1_mf_1_64_7slt1hmp_.arc recid=8 stamp=781658544
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=1 recid=11 stamp=781699323
input archive log thread=1 sequence=2 recid=12 stamp=781712320
input archive log thread=1 sequence=3 recid=13 stamp=781712486
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/incrent0_06n9fv3a_1_1 tag=TAG20120427T142127 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_1_7sn1vvjl_.arc recid=11 stamp=781699323
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_2_7sngl0f3_.arc recid=12 stamp=781712320
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_3_7sngq6wf_.arc recid=13 stamp=781712486
Finished backup at 27-APR-12

Starting backup at 27-APR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oradata/dbtest/system01.dbf
input datafile fno=00003 name=/u01/oradata/dbtest/sysaux01.dbf
input datafile fno=00002 name=/u01/oradata/dbtest/undotbs01.dbf
input datafile fno=00005 name=/u01/oradata/dbtest/example01.dbf
input datafile fno=00009 name=/u01/oradata/dbtest/qq01.dbf
input datafile fno=00006 name=/u01/oradata/dbtest/paul01.dbf
input datafile fno=00007 name=/u01/oradata/dbtest/wenchuan01.dbf
input datafile fno=00008 name=/u01/oradata/dbtest/wenchuan2.dbf
input datafile fno=00010 name=/u01/oradata/dbtest/qq02.dbf
input datafile fno=00004 name=/u01/oradata/dbtest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd0_TAG20120427T142132_7sngqf3d_.bkp tag=TAG20120427T142132 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:47
channel ORA_DISK_1: starting incremental level 0 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_ncnn0_TAG20120427T142132_7sngyr1k_.bkp tag=TAG20120427T142132 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:09
Finished backup at 27-APR-12

Starting backup at 27-APR-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=4 recid=14 stamp=781712729
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/incrent0_09n9fvap_1_1 tag=TAG20120427T142529 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_4_7sngysbw_.arc recid=14 stamp=781712729
Finished backup at 27-APR-12

RMAN> 
会话2:在备份后新加测试数据,并让它写到数据文件,并发生归档。
QL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 27 14:26:29 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from t4;

        ID NAME
---------- ----------
         0 abc

SQL> insert into t4 values(1,'def');

1 row created.

SQL> commit;             

Commit complete.

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@oraclelinux ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 27 14:28:03 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> conn /as sysdba
Connected.
SQL> alter system checkpoint;

System altered.

SQL> alter system switch logfile;

System altered.

SQL> 
会话1:在测试数据变化以后,对数据库做1级备份。刚变化的测试数据应该在1级备份中。
RMAN> backup incremental level 1 database plus archivelog delete all input format '/backup/rmanbackup/incrent1_%U';  


Starting backup at 27-APR-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=5 recid=15 stamp=781712921
input archive log thread=1 sequence=6 recid=16 stamp=781713443
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/incrent1_0an9g013_1_1 tag=TAG20120427T143723 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_5_7snh4s17_.arc recid=15 stamp=781712921
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_6_7snho3k9_.arc recid=16 stamp=781713443
Finished backup at 27-APR-12

Starting backup at 27-APR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oradata/dbtest/system01.dbf
input datafile fno=00003 name=/u01/oradata/dbtest/sysaux01.dbf
input datafile fno=00002 name=/u01/oradata/dbtest/undotbs01.dbf
input datafile fno=00005 name=/u01/oradata/dbtest/example01.dbf
input datafile fno=00009 name=/u01/oradata/dbtest/qq01.dbf
input datafile fno=00006 name=/u01/oradata/dbtest/paul01.dbf
input datafile fno=00007 name=/u01/oradata/dbtest/wenchuan01.dbf
input datafile fno=00008 name=/u01/oradata/dbtest/wenchuan2.dbf
input datafile fno=00010 name=/u01/oradata/dbtest/qq02.dbf
input datafile fno=00004 name=/u01/oradata/dbtest/users01.dbf
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd1_TAG20120427T143725_7snho6s1_.bkp tag=TAG20120427T143725 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:45
channel ORA_DISK_1: starting incremental level 1 datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_ncnn1_TAG20120427T143725_7snhwk13_.bkp tag=TAG20120427T143725 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:12
Finished backup at 27-APR-12

Starting backup at 27-APR-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=7 recid=17 stamp=781713684
channel ORA_DISK_1: starting piece 1 at 27-APR-12
channel ORA_DISK_1: finished piece 1 at 27-APR-12
piece handle=/backup/rmanbackup/incrent1_0dn9g08k_1_1 tag=TAG20120427T144124 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/u01/flash_recovery_area/DBTEST/archivelog/2012_04_27/o1_mf_1_7_7snhwnd1_.arc recid=17 stamp=781713684
Finished backup at 27-APR-12

RMAN> 

  会话2:查看一下刚备份文件的大小,发现1级备份比0级小得多
[oracle@oraclelinux backup]$ cd rmanbackup
[oracle@oraclelinux rmanbackup]$ ll
total 863408
-rw-r-----  1 oracle oinstall  30473216 Apr 27 14:21 incrent0_05n9fv38_1_1
-rw-r-----  1 oracle oinstall   6582784 Apr 27 14:21 incrent0_06n9fv3a_1_1
-rw-r-----  1 oracle oinstall     14336 Apr 27 14:25 incrent0_09n9fvap_1_1
-rw-r-----  1 oracle oinstall    151552 Apr 27 14:37 incrent1_0an9g013_1_1
-rw-r-----  1 oracle oinstall     61952 Apr 27 14:41 incrent1_0dn9g08k_1_1
-rw-r-----  1 oracle oinstall 838475776 Apr 27 14:18 rman1_03n9fun5_1_1
-rw-r-----  1 oracle oinstall   7438336 Apr 27 14:18 rman1_04n9fusr_1_1
=====================准备工作结束============================

=====================灾难发生,所有数据文件丢失================
先干净关闭数据库,人为删除数据文件[root@oraclelinux dbtest]# rm -f *.dbf
[root@oraclelinux dbtest]# ll
total 278024
-rw-r-----  1 oracle oinstall  7389184 Apr 27 14:45 control01.ctl
-rw-r-----  1 oracle oinstall  7389184 Apr 27 14:45 control02.ctl
-rw-r-----  1 oracle oinstall  7389184 Apr 27 14:45 control03.ctl
-rw-r--r--  1 oracle oinstall     1228 Mar 22 21:09 ctl
-rw-r-----  1 oracle oinstall 52429312 Apr 27 14:37 redo01.log
-rw-r-----  1 oracle oinstall 52429312 Apr 27 14:28 redo02.log
-rw-r-----  1 oracle oinstall 52429312 Apr 27 14:41 redo03.log
-rw-r-----  1 oracle oinstall 52429312 Mar 23 14:50 redo04a.log
-rw-r-----  1 oracle oinstall 52429312 Apr 27 14:45 redo04.log
[root@oraclelinux dbtest]# 
会话1:数据库到MOUNT状态。SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  444596224 bytes
Fixed Size                  1219904 bytes
Variable Size             130024128 bytes
Database Buffers          310378496 bytes
Redo Buffers                2973696 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/oradata/dbtest/system01.dbf'


SQL> 
下面就要用RMAN恢复:主要过程【RESTORE,RECOVER,OPEN DB】RMAN会自动选择备份集
RMAN> restore database;

Starting restore at 27-APR-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/dbtest/system01.dbf
restoring datafile 00002 to /u01/oradata/dbtest/undotbs01.dbf
restoring datafile 00003 to /u01/oradata/dbtest/sysaux01.dbf
restoring datafile 00004 to /u01/oradata/dbtest/users01.dbf
restoring datafile 00005 to /u01/oradata/dbtest/example01.dbf
restoring datafile 00006 to /u01/oradata/dbtest/paul01.dbf
restoring datafile 00007 to /u01/oradata/dbtest/wenchuan01.dbf
restoring datafile 00008 to /u01/oradata/dbtest/wenchuan2.dbf
restoring datafile 00009 to /u01/oradata/dbtest/qq01.dbf
restoring datafile 00010 to /u01/oradata/dbtest/qq02.dbf
channel ORA_DISK_1: reading from backup piece /u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd0_TAG20120427T142132_7sngqf3d_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd0_TAG20120427T142132_7sngqf3d_.bkp tag=TAG20120427T142132
channel ORA_DISK_1: restore complete, elapsed time: 00:04:58
Finished restore at 27-APR-12

RMAN> 

RMAN> 
RECOVER DATABASE;RMAN> recover database;

Starting recover at 27-APR-12
using channel ORA_DISK_1
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/oradata/dbtest/system01.dbf
destination for restore of datafile 00002: /u01/oradata/dbtest/undotbs01.dbf
destination for restore of datafile 00003: /u01/oradata/dbtest/sysaux01.dbf
destination for restore of datafile 00004: /u01/oradata/dbtest/users01.dbf
destination for restore of datafile 00005: /u01/oradata/dbtest/example01.dbf
destination for restore of datafile 00006: /u01/oradata/dbtest/paul01.dbf
destination for restore of datafile 00007: /u01/oradata/dbtest/wenchuan01.dbf
destination for restore of datafile 00008: /u01/oradata/dbtest/wenchuan2.dbf
destination for restore of datafile 00009: /u01/oradata/dbtest/qq01.dbf
destination for restore of datafile 00010: /u01/oradata/dbtest/qq02.dbf
channel ORA_DISK_1: reading from backup piece /u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd1_TAG20120427T143725_7snho6s1_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/flash_recovery_area/DBTEST/backupset/2012_04_27/o1_mf_nnnd1_TAG20120427T143725_7snho6s1_.bkp tag=TAG20120427T143725
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02

starting media recovery
media recovery complete, elapsed time: 00:00:04

Finished recover at 27-APR-12

RMAN> 
打开数据库
RMAN> alter database open;

database opened

RMAN> 
查表检测 
[oracle@oraclelinux rmanbackup]$ sqlplus qq1/qq1

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 27 15:07:54 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from t4;

        ID NAME
---------- ----------
         0 abc
         1 def

SQL> 


总结==RMAN在归档模式下的基本恢复步骤1.把数据库MOUNT2.还原数据库3恢复数据库4.打开数据库。。。。。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15720542/viewspace-722367/,如需转载,请注明出处,否则将追究法律责任。

上一篇: resetlog理解
请登录后发表评论 登录
全部评论

注册时间:2008-11-13

  • 博文量
    158
  • 访问量
    306802