ITPub博客

首页 > 数据库 > Oracle > RMAN 恢复之控制文件篇(4/5)

RMAN 恢复之控制文件篇(4/5)

原创 Oracle 作者:djb1008 时间:2011-06-07 11:29:54 0 删除 编辑

1.4 场景三:使用全备份后产生的控制文件进行备份恢复

1.4.1 模拟灾难发生

SQL> shutdown abort;

[oracle@restoretest gcwz_web]$ rm *

[@more@]

1.4.2 恢复控制文件

[oracle@restoretest gcwz_web]$ sqlplus / as sysdba

SQL> startup nomount

[oracle@restoretest gcwz_web]$ rman target /

RMAN> restore controlfile from '/rman/control_73';

output filename=/oradata/gcwz_web/control01.ctl

output filename=/oradata/gcwz_web/control02.ctl

output filename=/oradata/gcwz_web/control03.ctl

Finished restore at 02-FEB-10

1.4.3 登记最新的rman备份信息

RMAN> sql 'alter database mount';

RMAN> catalog start with '/rman/';

searching for all files that match the pattern /rman/

List of Files Unknown to the Database

=====================================

File Name: /rman/cntrl_69_1_709899322

File Name: /rman/control_73

Do you really want to catalog the above files (enter YES or NO)? yes

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: /rman/cntrl_69_1_709899322

File Name: /rman/control_73

RMAN> catalog start with '/archivelog/';

searching for all files that match the pattern /archivelog/

no files found to be unknown to the database

RMAN> list archivelog all;

List of Archived Log Copies

Key Thrd Seq S Low Time Name

------- ---- ------- - --------- ----

40 1 58 A 01-FEB-10 /archivelog/1_58_690800133.dbf

41 1 59 A 01-FEB-10 /archivelog/1_59_690800133.dbf

42 1 60 A 02-FEB-10 /archivelog/1_60_690800133.dbf

1.4.4 数据库resotre和recover

RMAN> restore database;

restoring datafile 00001 to /oradata/gcwz_web/system01.dbf

restoring datafile 00002 to /oradata/gcwz_web/undotbs01.dbf

restoring datafile 00003 to /oradata/gcwz_web/sysaux01.dbf

restoring datafile 00004 to /oradata/gcwz_web/users01.dbf

restoring datafile 00005 to /oradata/gcwz_web/test01.dbf

channel ORA_DISK_1: reading from backup piece /rman/full_71_709900579_1

channel ORA_DISK_1: restored backup piece 1

piece handle=/rman/full_71_709900579_1 tag=TAG20100202T103618

channel ORA_DISK_1: restore complete, elapsed time: 00:00:16

Finished restore at 02-FEB-10

RMAN> recover database;

archive log thread 1 sequence 60 is already on disk as file /archivelog/1_60_690800133.dbf

archive log filename=/archivelog/1_60_690800133.dbf thread=1 sequence=60

unable to find archive log

archive log thread=1 sequence=61

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 02/02/2010 17:35:25

RMAN-06054: media recovery requesting unknown log: thread 1 seq 61 lowscn 1130034

RMAN> sql 'alter database open resetlogs';

sql statement: alter database open resetlogs

SQL> select open_mode,name from v$database;

OPEN_MODE NAME

---------- ---------

READ WRITE GCWZ_WEB

上一篇: RMAN 恢复之控制文件篇(3/5)

下一篇: RMAN 恢复之控制文件篇(5/5)

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

请登录后发表评论 登录
全部评论

注册时间:2010-07-27

  • 博文量
    175
  • 访问量
    778869