Environment
Primary Database SID = TESTDB
Standby Database SID = UATDB
Primary Database TNS Name: TNS_TESTDB
Standby Database TNS Name = TNS_UATDB
Color Legend:
Primary: Black
Standby: Pink
1) Replicate the issue
Move/Rename a datafile on Primary database and start the database
ORA-01157: cannot identify/lock data file
ORA-01110: data file
2) Backup the datafile from Standby Database
rman
connect target sys/sys@TNS_UATDB #Connection to Standby Database as target
connect auxiliary sys/sys@TNS_TESTDB #Connection to Primary Database as auxiliary
Create backup directory in primary and standby: mkdir -p /u01/TESTDB/BACKUP/rman
backup as copy datafile 4 auxiliary format '/u01/TESTDB/BACKUP/rman/userdata01.dbf';
The above command create a datafile backup "/u01/TESTDB/BACKUP/rman/userdata01.dbf" in Primary Database
3) Register the backupfile on primary
rman
connect target /
catalog datafilecopy '/u01/TESTDB/BACKUP/rman/userdata01.dbf';
restore datafile 4; (OR switch datafile 4 to copy;)
4) Recover and Open Primary
recover database;
alter database open;
Check Alert Log
Best regards,
Charan