ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Recover On Primary Using Flashback On A Standby Database

Recover On Primary Using Flashback On A Standby Database

Linux操作系统 作者:yuanqc 时间:2013-11-08 10:15:26 0 删除 编辑
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=169781064884617&id=958557.1&_afrWindowMode=0&_adf.ctrl-state=mnmggr81a_4


How To Recover From A Drop/Truncate/Delete Table Done On Primary Using Flashback On A Standby Database (Doc ID 958557.1)

Applies to:

Oracle Server - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Information  in this document applies to any platform.
***Checked for relevance on 22-Jun-2012***

Goal

In this article we will be discussing the steps needed to recover from a drop/truncate/delete table done on primary using flashback on a standby database. Recovering the table using flashback on standby will eliminate downtime being caused on primary database.

Fix

Prerequisites:

- Standby Database Must be in Flashback database mode.
- Time at which Drop/Truncate/Delete Table happened should be within the db_flashback_retention_target and all the flashback and archive logs should be available


Steps:

1) Stop the managed recovery process.

SQL > recover managed standby database cancel;


2) In order to recover lost data, use the flashback database feature to a time approximately before the Drop/Truncate/Delete Table happened.

Example
-------
SQL > shutdown immediate;
SQL > startup mount;
SQL > flashback database to timestamp to_date('29-MAY-2009 14:30:00','DD-MON-YYYY HH24:MI:SS');


3) Open the standby database in Read Only mode.

SQL> alter database open read only;


4) Check for the required data availability.

5) Take an export of the required table.

6) Import the table on the primary database.

7) Shutdown the standby database, mount and then roll forward the standby database to current time using the recover command.

SQL > shutdown immediate
SQL > startup mount
SQL > recover standby database;


7) Once all the archives are applied manually, you can start the MRP process to apply the archives automatically as and when they are shipped.

SQL > recover managed standby database disconnect from session;

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

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

注册时间:2010-11-23

  • 博文量
    47
  • 访问量
    102349