Intro
In today's data-driven era, protecting data is paramount. Organizations must be prepared to address potential failures by implementing robust disaster recovery strategies. For those hosting critical data, having a disaster recovery (DR) site is essential. Oracle Data Guard offers a comprehensive solution for database disaster recovery, ensuring data protection and availability.
In this article, I will discuss the issues encountered after rebuilding the standby database. Our standby system suddenly stopped due to the restoration of an unnamed data file. This occurred because I forgot to set STANDBY_FILE_MANAGEMENT to AUTO after making changes to the standby redo.
Error:
Errors in file /u01/app/oracle/diag/rdbms/fe4prd_ha/TEST_HA/trace/TEST_HA_pr00_16592.trc:
ORA-01111: name for data file 781 is unknown - rename to correct file
ORA-01110: data file 781: '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/UNNAMED00781'
ORA-01157: cannot identify/lock data file 781 - see DBWR trace file
ORA-01111: name for data file 781 is unknown - rename to correct file
ORA-01110: data file 781: '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/UNNAMED00781'
Completed: alter database recover managed standby database disconnect from session
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (TEST_HA)
# Get the datafile name
select FILE#,name from v$datafile where FILE#=&datafile_number;
select FILE#,name from v$datafile where FILE#=781;
FILE# NAME
---------- ----------------------------------------------------------------------------------------------------
781 /u02/app/oracle/oradata/TEST_PRD/TEST_PRD/datafile/o1_mf_fleetedg_m51xj74z_.dbf
Solution :
SQL> Alter database create datafile '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/UNNAMED00781' as '+DATA/TEST_HA/DATAFILE/o1_mf_fleetedg_m51xj74z_.dbf' size 34358689792;
Database altered.
-- Change
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT='AUTO' SCOPE=BOTH;
No comments:
Post a Comment