Recovering the primary database's datafile using the physical standby, and vice versa (Doc ID 453153.1)

Last updated on NOVEMBER 22, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.5 and later
Information in this document applies to any platform.
***Checked for relevance on 16-July-2015***

Goal

How to recover the primary database's datafile using a copy of a standby database's datafile.

and

How to recover the standby database's datafile using a copy of a primary database's datafile.

Important

Before replacing a datafile with a copy from either production or standby, please confirm that all archivelogs are available for full recovery of this datafile. It is also important to ensure that the source is corruption-free. Run DBV or RMAN validate to check for corruption.

a) dbv must return with zero corrupted pages

$ dbv file=<full path filename> blocksize=<tablespace blocksize> logfile=<output log>

 If using ASM, you need to also supply the userid for dbv:

$ dbv userid=system/<password> file=<full path filename> blocksize=<tablespace blocksize> logfile=<output log>

b) rman validate:

RMAN> backup validate check logical datafile n;

 

Once RMAN is completed, this view must return zero rows:

SQL> select * from v$database_block_corruption;

 

If trying to resolve an ORA-600 [3020], please refer instead to the following content:
 
<Note 1265884.1> 'Resolving ORA-752 or ORA-600 [3020] During Standby Recovery'

Datafiles should not be copied to a physical standby until the primary has been cleared of any corruption.

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms