Problem:
Tue Dec 04 18:28:58 2018
Errors in file /d01/app/oracle/diag/rdbms/bacdbst/bacdb/trace/bacdb_pr00_18214.trc:
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
ORA-01157: cannot identify/lock data file 227 - see DBWR trace file
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
Managed Standby Recovery not using Real Time Apply
Tue Dec 04 18:28:58 2018
Recovery Slave PR00 previously exited with exception 1111
Tue Dec 04 18:28:58 2018
Errors in file /d01/app/oracle/diag/rdbms/bacdbst/bacdb/trace/bacdb_mrp0_18206.trc:
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
ORA-01157: cannot identify/lock data file 227 - see DBWR trace file
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
Tue Dec 04 18:28:58 2018
MRP0: Background Media Recovery process shutdown (bacdb)
Completed: alter database recover managed standby database disconnect
RFS[15]: Selected log 6 for thread 1 sequence 85731 dbid 3693154305 branch 923676036
Tue Dec 04 18:29:09 2018
Archived Log entry 72318 added for thread 1 sequence 85730 ID 0xffffffffdc211e01 dest 1:
Solution
in Primary:
backup as copy datafile 227 format='/export/home/oracle/%U.bak' tag='lost file backup';
copy the backup file to Primary server
scp data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak oracle@10.11.1.133:/export/home/oracle/
in Standby:
alter database recover managed standby database cancel;
RMAN> catalog datafilecopy '/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak';
RMAN> report schema;
227 0 STLBAS:ORBDT2 *** /d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227
RMAN> switch datafile 227 to copy;
datafile 227 switched to datafile copy "/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak"
RMAN>
RMAN> report schema;
227 5120 STLBAS:ORBDT2 *** /export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak
RMAN> copy datafile 227 to '+DATA/BACDB/STLBAS/orbdt206.dbf';
RMAN> copy datafile 227 to '+DATA/BACDB/STLBAS/orbdt206.dbf';
Starting backup at 04-DEC-18
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile copy
input datafile file number=00227 name=/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak
output file name=+DATA/BACDB/STLBAS/orbdt206.dbf tag=TAG20181204T193437 RECID=130 STAMP=994016080
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 04-DEC-18
RMAN>
RMAN> report schema;
227 500 STLBAS:ORBDT2 *** /export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 10240 TEMP 32767 +DATA/bacdb/temp01.dbf
2 244 PDB$SEED:TEMP 32767 +DATA/bacdb/fdb039e555681306e04400163e5bea5f/datafile/pdbseed_temp012016-09-27_04-41-20-pm.dbf
3 20 PDBTEST:TEMP 32767 +DATA/pdbtest_temp012016-09-27_04-41-20-pm.dbf
RMAN> switch datafile 227 to copy;
datafile 227 switched to datafile copy "+DATA/BACDB/STLBAS/orbdt206.dbf"
RMAN> report schema;
227 500 STLBAS:ORBDT2 *** +DATA/BACDB/STLBAS/orbdt206.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 10240 TEMP 32767 +DATA/bacdb/temp01.dbf
2 244 PDB$SEED:TEMP 32767 +DATA/bacdb/fdb039e555681306e04400163e5bea5f/datafile/pdbseed_temp012016-09-27_04-41-20-pm.dbf
3 20 PDBTEST:TEMP 32767 +DATA/pdbtest_temp012016-09-27_04-41-20-pm.dbf
4 48 OFFSHR:TEMP 32767 +DATA/bacdb/offshr/temp012016-05-25_01-45-13-pm.dbf
5 8738 EMOB:TEMP 32767 +DATA/bacdb/emob/temp012016-05-25_01-45-13-pm.dbf
6 32767 STLBAS:TEMP 32767 +DATA/bacdb/stlbas/temp01.dbf
7 32767 STLBAS:TEMP 32767 +DATA/bacdb/stlbas/temp02.dbf
8 30720 STLBAS:TEMP 30720 +DATA/bacdb/stlbas/temp03.dbf
Tue Dec 04 18:28:58 2018
Errors in file /d01/app/oracle/diag/rdbms/bacdbst/bacdb/trace/bacdb_pr00_18214.trc:
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
ORA-01157: cannot identify/lock data file 227 - see DBWR trace file
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
Managed Standby Recovery not using Real Time Apply
Tue Dec 04 18:28:58 2018
Recovery Slave PR00 previously exited with exception 1111
Tue Dec 04 18:28:58 2018
Errors in file /d01/app/oracle/diag/rdbms/bacdbst/bacdb/trace/bacdb_mrp0_18206.trc:
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
ORA-01157: cannot identify/lock data file 227 - see DBWR trace file
ORA-01111: name for data file 227 is unknown - rename to correct file
ORA-01110: data file 227: '/d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227'
Tue Dec 04 18:28:58 2018
MRP0: Background Media Recovery process shutdown (bacdb)
Completed: alter database recover managed standby database disconnect
RFS[15]: Selected log 6 for thread 1 sequence 85731 dbid 3693154305 branch 923676036
Tue Dec 04 18:29:09 2018
Archived Log entry 72318 added for thread 1 sequence 85730 ID 0xffffffffdc211e01 dest 1:
Solution
in Primary:
backup as copy datafile 227 format='/export/home/oracle/%U.bak' tag='lost file backup';
copy the backup file to Primary server
scp data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak oracle@10.11.1.133:/export/home/oracle/
in Standby:
alter database recover managed standby database cancel;
RMAN> catalog datafilecopy '/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak';
RMAN> report schema;
227 0 STLBAS:ORBDT2 *** /d01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00227
RMAN> switch datafile 227 to copy;
datafile 227 switched to datafile copy "/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak"
RMAN>
RMAN> report schema;
227 5120 STLBAS:ORBDT2 *** /export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0itjus5k.bak
RMAN> copy datafile 227 to '+DATA/BACDB/STLBAS/orbdt206.dbf';
RMAN> copy datafile 227 to '+DATA/BACDB/STLBAS/orbdt206.dbf';
Starting backup at 04-DEC-18
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting datafile copy
input datafile file number=00227 name=/export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak
output file name=+DATA/BACDB/STLBAS/orbdt206.dbf tag=TAG20181204T193437 RECID=130 STAMP=994016080
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 04-DEC-18
RMAN>
RMAN> report schema;
227 500 STLBAS:ORBDT2 *** /export/home/oracle/data_D-BACDB_I-3693154305_TS-ORBDT2_FNO-227_0mtjuud2.bak
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 10240 TEMP 32767 +DATA/bacdb/temp01.dbf
2 244 PDB$SEED:TEMP 32767 +DATA/bacdb/fdb039e555681306e04400163e5bea5f/datafile/pdbseed_temp012016-09-27_04-41-20-pm.dbf
3 20 PDBTEST:TEMP 32767 +DATA/pdbtest_temp012016-09-27_04-41-20-pm.dbf
RMAN> switch datafile 227 to copy;
datafile 227 switched to datafile copy "+DATA/BACDB/STLBAS/orbdt206.dbf"
RMAN> report schema;
227 500 STLBAS:ORBDT2 *** +DATA/BACDB/STLBAS/orbdt206.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 10240 TEMP 32767 +DATA/bacdb/temp01.dbf
2 244 PDB$SEED:TEMP 32767 +DATA/bacdb/fdb039e555681306e04400163e5bea5f/datafile/pdbseed_temp012016-09-27_04-41-20-pm.dbf
3 20 PDBTEST:TEMP 32767 +DATA/pdbtest_temp012016-09-27_04-41-20-pm.dbf
4 48 OFFSHR:TEMP 32767 +DATA/bacdb/offshr/temp012016-05-25_01-45-13-pm.dbf
5 8738 EMOB:TEMP 32767 +DATA/bacdb/emob/temp012016-05-25_01-45-13-pm.dbf
6 32767 STLBAS:TEMP 32767 +DATA/bacdb/stlbas/temp01.dbf
7 32767 STLBAS:TEMP 32767 +DATA/bacdb/stlbas/temp02.dbf
8 30720 STLBAS:TEMP 30720 +DATA/bacdb/stlbas/temp03.dbf
Now start redo apply on standby :-