Recovering the Primary's Datafile

ORACLE_DATAGUARD_Recovering the Primary's Datafile

On the standby database:

1、Backup the standby’s datafile

$ rman target /

RMAN> backupas copy datafile 5 format '/dg10g/backup/df05.cpy';

2、Copy to the primary database

On the primary database(mount)

1、offlinesome datafiles

SQL>alterdatabase datafile 5 offline;

2、catalogdatafilecopy

RMAN> catalog datafile copy '/dg10g/backup/df05.cpy';

3、restoredatafile

RMAN> list copy of datafile 5;

RMAN> restore datafile 5;

4、recoverdatafile

RMAN> recover datafile 5;

Starting recoverat 25-SEP-08

using channelORA_DISK_1

starting mediarecovery

media recovery complete, elapsed time: 00:00:04

Finished recoverat 25-SEP-08

5、onlinedatafile

SQL>alterd atabase datafile 5 online;

你可能感兴趣的:(Recovering the Primary's Datafile)