不完全恢复测试纪录

1.Executed full back database and arch
  TAG20090211T091422 data
  TAG20090211T091523 crtl
  TAG20090211T091526 arch
  TAG20090211T091703 crtl

2. Create one test table ajang_test:
   create table ajang_test as select * from dba_objects;
   alter system switch logfile:
   alter system switch logfile
   alter system switch logfile

   Time='09:23:07 EAT 2009'

3. Executed full back database and arch

   TAG20090211T092932 data
   TAG20090211T093035 crtl
   TAG20090211T093038 arch
   TAG20090211T093051 crtl

    Time='09:31:07 EAT 2009'

4. drop table  ajang_test;
   alter system switch logfile:
   alter system switch logfile
   alter system switch logfile

5. Execute a full backup again (database and arch)

#################################################################################################

 Now, I would like to use the backup which is done at step 3 to resotre full database
      and recover the database to '09:31:07 EAT 2009'.
#################################################################################################

  szx032:oracle> rman target / nocatalog
                 rman> shutdown immeidate;
                 rman> startup mount;
                 rman> restore database from tag='TAG20090211T092932';
                 rman> sql 'alter session set NLS_LANGUAGE=AMERICAN';
                 rman> sql 'alter session set nls_date_format="YYYY-MM-DD:HH24:MI:SS"';
                 rman> recover database until time '2009-02-11 09:31:30';
                       #### Recover will read the arch file info from arch back file" ####

Starting recover at 2009-02-11 10:26:43
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=28
channel ORA_DISK_1: reading from backup piece /home/oracle/rman/RPTTRN_DB_arch_7
4:678533443:1.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/rman/RPTTRN_DB_arch_74:678533443:1.dbf tag=TAG20090211
T093038
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/oradb/oradata/RPTTRN/arch/RPTTRN_28_1_675453958.arc thread
=1 sequence=28
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=29
channel ORA_DISK_1: reading from backup piece /home/oracle/rman/RPTTRN_DB_arch_7
7:678533449:1.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/rman/RPTTRN_DB_arch_77:678533449:1.dbf tag=TAG20090211
T093038
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/oradb/oradata/RPTTRN/arch/RPTTRN_29_1_675453958.arc thread
=1 sequence=29
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=30
channel ORA_DISK_1: reading from backup piece /home/oracle/rman/RPTTRN_DB_arch_9
6:678533794:1.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/home/oracle/rman/RPTTRN_DB_arch_96:678533794:1.dbf tag=TAG20090211
T093634
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/oradb/oradata/RPTTRN/arch/RPTTRN_30_1_675453958.arc thread
=1 sequence=30
media recovery complete, elapsed time: 00:0
0:01
Finished recover at 2009-02-11 10:26:52


[szx032]oracle:> sqlplus /nolog
SQL> connect /as sysdba
Connected.
SQL> alter database open resetlogs;
SQL> desc fwstm2.ajang_test;

  The table ajang_test was recovered back from rman backup.

 

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

转载于:http://blog.itpub.net/69934/viewspace-566744/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值