oracle 备份记录二

RMAN> list backup of archivelog all;


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
23      61.50M     SBT_TAPE    00:00:31     07-MAY-14     
        BP Key: 23   Status: AVAILABLE  Compressed: NO  Tag: TAG20140507T105106
        Handle: al_23_1_846931866   Media: W976L5

  List of Archived Logs in backup set 23
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    234     1732488    07-MAY-14 1754896    07-MAY-14
  1    235     1754896    07-MAY-14 1756704    07-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
24      7.00M      SBT_TAPE    00:00:54     07-MAY-14     
        BP Key: 24   Status: AVAILABLE  Compressed: NO  Tag: TAG20140507T105106
        Handle: al_24_1_846931866   Media: W976L5

  List of Archived Logs in backup set 24
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    236     1756704    07-MAY-14 1763275    07-MAY-14
  1    237     1763275    07-MAY-14 1763308    07-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
30      256.00K    SBT_TAPE    00:00:30     07-MAY-14     
        BP Key: 30   Status: AVAILABLE  Compressed: NO  Tag: TAG20140507T110747
        Handle: al_31_1_846932868   Media: W975L5

  List of Archived Logs in backup set 30
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    239     1764105    07-MAY-14 1764138    07-MAY-14

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
31      1.50M      SBT_TAPE    00:00:52     07-MAY-14     
        BP Key: 31   Status: AVAILABLE  Compressed: NO  Tag: TAG20140507T110747
        Handle: al_30_1_846932868   Media: W975L5

  List of Archived Logs in backup set 31
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    238     1763308    07-MAY-14 1764105    07-MAY-14


 
 
TAG20140507T110747 

SCN:  1764138

 

run{
set until scn 1764138;
allocate channel ch00 type 'sbt_tape';
allocate channel ch01 type 'sbt_tape';
restore database;
release channel ch00;
release channel ch01;}

 

run{
allocate channel t1 type 'sbt_tape' ;
RESTORE CONTROLFILE FROM 'cntrl_32_1_846932923' ;
release channel t1;
}

run{
allocate channel ch00 type 'sbt_tape';
allocate channel ch01 type 'sbt_tape';
restore database;
release channel ch00;
release channel ch01;}


run{
set until scn 1764138;
allocate channel ch00 type 'sbt_tape';
restore database;
release channel ch00;}

executing command: SET until clause

allocated channel: ch00
channel ch00: SID=189 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.5 (2013061020)

Starting restore at 07-MAY-14

skipping datafile 1; already restored to file /11g/oracle/oradata/ney/system01.dbf
skipping datafile 2; already restored to file /11g/oracle/oradata/ney/sysaux01.dbf
skipping datafile 3; already restored to file /11g/oracle/oradata/ney/undotbs01.dbf
skipping datafile 4; already restored to file /11g/oracle/oradata/ney/users01.dbf
skipping datafile 5; already restored to file /11g/oracle/oradata/ney/platform_data.DBF
Finished restore at 07-MAY-14

released channel: ch00

rman>list incarnation;
reset database to incarnation 2;

run{
allocate channel ch00 type 'sbt_tape';
restore archivelog from logseq 238 until logseq 239;
release channel ch00;}

allocated channel: ch00
channel ch00: SID=189 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.5 (2013061020)

Starting restore at 07-MAY-14

archived log for thread 1 with sequence 238 is already on disk as file /11g/oracle/flash_recovery_area/NEY/archivelog/2014_05_07/o1_mf_1_238_9pmhc18p_.arc
archived log for thread 1 with sequence 239 is already on disk as file /11g/oracle/flash_recovery_area/NEY/archivelog/2014_05_07/o1_mf_1_239_9pmhc1jc_.arc
restore not done; all files read only, offline, or already restored
Finished restore at 07-MAY-14

released channel: ch00

SQL> alter database mount;

Database altered.

SQL> alter session set NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss';

Session altered.

SQL> recover database until time '2014-05-07:11:07:47' using backup controlfile;
ORA-00279: change 1763541 generated at 05/07/2014 10:58:00 needed for thread 1
ORA-00289: suggestion :
/11g/oracle/flash_recovery_area/NEY/archivelog/2014_05_07/o1_mf_1_238_9pmhc18p_.
arc
ORA-00280: change 1763541 for thread 1 is in sequence #238

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
AUTO

SQL> ALTER DATABASE OPEN RESETLOGS;

Database altered.

发布了20 篇原创文章 · 获赞 6 · 访问量 2万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览