Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

STEPS FOR RECOVERY ON PRIMARY USING STANDBY FILE

JhilApr 18 2016 — edited Apr 19 2016

Dear Experts ,

kindly update steps for recovery datafile on primary using standby file.

Please do not consider as DUPE

[Recovery datafile #6 on Primary using RMAN backups](https://community.oracle.com/thread/3920078)

Manually renamed datafile on primary then trying to recover using standby database file .

As much as possible i have referred blogs and official docs - Those steps not workable for me

I do not clear. Why oracle behaves differently ?

1) Using backups of primary database i can recover directly. --- > WORKABLE

STEPS

$ rman target /

RMAN> sql ' alter database datafile #x offline';

RMAN> restore datafile #x;

RMAN> recover datafile #x

RMAN> sql ' alter database datafile #x online';

2) I tried to recover datafile using standby database file . ( but i am failing)

$ mv users01.dbf users01.dbf.old

$ ls -l users*

-rw-r----- 1 oracle oinstall 5251072 Apr 18 16:08 users01.dbf.old

SQL> select * from regions;

select * from regions

          \*

ERROR at line 1:

ORA-01116: error in opening database file 4

ORA-01110: data file 4: '/u01/app/oracle/oradata/crms/users01.dbf'

ORA-27041: unable to open file

Linux Error: 2: No such file or directory

Additional information: 3

RMAN> connect target sys/crms@STBY_CRMSDB

connected to target database: CRMS (DBID=1611053225)

RMAN> connect auxiliary sys/crms@CRMSDB

connected to auxiliary database: CRMS (DBID=1611053225)

RMAN> backup as copy datafile 4 auxiliary format '/u01/app/oracle/oradata/crms/users01.dbf';

Starting backup at 18-APR-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=/u01/app/oracle/oradata/stbycrms/users01.dbf

output file name=/u01/app/oracle/oradata/crms/users01.dbf tag=TAG20160418T161628

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

Finished backup at 18-APR-16

RMAN> exit

RMAN> connect target sys/crms@CRMSDB

connected to target database: CRMS (DBID=1611053225)

RMAN> connect catalog rmanuser/rmanuser@CATDB

connected to recovery catalog database

RMAN> CATALOG DATAFILECOPY '/u01/app/oracle/oradata/crms/users01.dbf'; --------------------> always failing steps

starting full resync of recovery catalog

full resync complete

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of catalog command on default channel at 04/18/2016 16:20:40

ORA-19657: cannot inspect current datafile /u01/app/oracle/oradata/crms/users01.dbf

REF_DOCs

http://docs.oracle.com/cd/E11882_01/server.112/e41134/rman.htm#SBYDB4869

ref_lins.png

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2016
Added on Apr 18 2016
16 comments
5,395 views