ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Recovery from Loss of Datafiles on the Standby

Recovery from Loss of Datafiles on the Standby

原创 Linux操作系统 作者:wisdomone1 时间:2010-01-30 18:09:30 0 删除 编辑

Recovery from Loss of Datafiles on the Standby Database

To recover the standby database after the loss of one or more datafiles, you must restore the lost files to the standby database from the backup using the RMAN RESTORE DATAFILE command. If all the archived redo log files required for recovery of damaged files are accessible on disk by the standby database, restart Redo Apply.

If the archived redo log files required for recovery are not accessible on disk, use RMAN to recover the restored datafiles to an SCN/log sequence greater than the last log applied to the standby database, and then restart Redo Apply to continue the application of redo data, as follows:

  1. Stop Redo Apply.

  2. Determine the value of the UNTIL_SCN column, by issuing the following query:

    SQL> SELECT MAX(NEXT_CHANGE#)+1 UNTIL_SCN FROM V$LOG_HISTORY LH, V$DATABASE DB WHERE LH.RESETLOGS_CHANGE#=DB.RESETLOGS_CHANGE# AND LH.RESETLOGS_TIME = DB.RESETLOGS_TIME;
    UNTIL_SCN
    ------- ----------------
    967786
  3. Issue the following RMAN commands to restore and recover datafiles on the standby database. You must be connected to both the standby and recovery catalog databases (use the TARGET keyword to connect to standby instance):

    RESTORE DATAFILE <n,m,...>;
    RECOVER DATABASE UNTIL SCN 967786;

    To restore a tablespace, use the RMAN 'RESTORE TABLESPACE tbs_name1, tbs_name2, ...' command.

  4. Restart Redo Apply.

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

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12689917