This procedure will work
for all file systems including raw or ASM.
Through this example we will be using datafile 12.
1) On standby database, copy datafile from ASM to a file system:
RMAN> backup as copy datafile 12 format '/tmp/df12.dbf';
2) transfer the datafile copy from the standby to the primary host using scp.
On primary database
3) Place the datafile to recover offline.
SQL> alter database datafile 12 offline;
4) catalog this datafile copy:
RMAN> catalog datafilecopy '/tmp/df12.dbf';
5) Confirm that datafile exists:
RMAN> list copy of datafile 12;
6) Restore the datafile:
RMAN> restore datafile 12;
7) Recover the datafile:
RMAN> recover datafile 12;
8) Place the datafile online:
SQL> alter database datafile 12 online;
Steps to recover the standby database's datafile using a copy of a primary database's datafile.
1) Backup the primary database's datafile.
RMAN> backup as copy datafile 12 format '/tmp/df12.dbf';
2) transfer the file to the standby site using an operating system utility such as scp.
3) catalog the datafile copy on the standby site.
RMAN> catalog datafilecopy '/tmp/df12.dbf';
4) stop redo apply on the physical standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
5) on the standby site restore the datafile copy.
RMAN> restore datafile 12;
6) restart redo apply on the physical standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Through this example we will be using datafile 12.
1) On standby database, copy datafile from ASM to a file system:
RMAN> backup as copy datafile 12 format '/tmp/df12.dbf';
2) transfer the datafile copy from the standby to the primary host using scp.
On primary database
3) Place the datafile to recover offline.
SQL> alter database datafile 12 offline;
4) catalog this datafile copy:
RMAN> catalog datafilecopy '/tmp/df12.dbf';
5) Confirm that datafile exists:
RMAN> list copy of datafile 12;
6) Restore the datafile:
RMAN> restore datafile 12;
7) Recover the datafile:
RMAN> recover datafile 12;
8) Place the datafile online:
SQL> alter database datafile 12 online;
Steps to recover the standby database's datafile using a copy of a primary database's datafile.
1) Backup the primary database's datafile.
RMAN> backup as copy datafile 12 format '/tmp/df12.dbf';
2) transfer the file to the standby site using an operating system utility such as scp.
3) catalog the datafile copy on the standby site.
RMAN> catalog datafilecopy '/tmp/df12.dbf';
4) stop redo apply on the physical standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
5) on the standby site restore the datafile copy.
RMAN> restore datafile 12;
6) restart redo apply on the physical standby database.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Do you like this post? Please share this article.
HTML Link Code:
Post a Comment