In an Oracle Data Guard environment, one of the common issues DBAs encounter after adding a new datafile on the primary database is the UNNAMED datafile error on the standby database. This issue usually appears when managed recovery is running and the standby database does not know the exact location of the newly added datafile. It commonly occurs when standby file management is set to MANUAL, when sufficient free space is not available on the standby mount point, or when the ASM disk group does not have enough space. In some cases, this issue can also occur on the primary database if the datafile location (mount point) or ASM disk group is not specified correctly or does not have sufficient free space.
Error Symptoms
You may observe the following errors in the standby alert log or while starting managed recovery:
ORA-01111: name for data file is unknown - rename to correct file ORA-01110: data file: '/oracle/dbs/UNNAMED000xx' ORA-01157: cannot identify/lock data file
Oracle creates a placeholder file with the name UNNAMEDxxxxx when the standby database is unable to create the actual datafile path.
Why Does This Issue Occur?
- A new datafile is added to the primary database
- The standby database does not have the same directory structure
- DB_FILE_NAME_CONVERT is not configured correctly
- Standby is unable to auto-create the datafile
Identify the Unnamed Datafile
Connect to the standby database and identify the unnamed datafile:
SQL> SELECT file#, name FROM v$datafile WHERE name LIKE '%UNNAMED%';
Steps to Resolve Unnamed Datafile Issue
Step 1: Stop Managed Recovery
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
Step 2: Rename the Unnamed Datafile
Create the correct directory on the standby server (if not exists) and rename the file:
SQL> ALTER DATABASE RENAME FILE '/oracle/dbs/UNNAMED00012' TO '/u01/oradata/STDB/users01.dbf';
Step 3: Start Managed Recovery
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Verify the Status
SQL> SELECT file#, name, status FROM v$datafile;
Ensure that the datafile status is ONLINE and redo apply is progressing normally.
Preventing This Issue
- Configure DB_FILE_NAME_CONVERT properly
- Ensure directory structure is identical on primary and standby
- Use OMF (Oracle Managed Files) when possible
- Monitor standby alert logs regularly
If you are frequently adding datafiles, enabling Oracle Managed Files (OMF) can eliminate this issue entirely by allowing Oracle to automatically manage file names and locations.
Conclusion
The UNNAMED datafile issue in Data Guard is not critical but must be addressed immediately to resume redo apply. With proper configuration and monitoring, this issue can be avoided altogether.
Toufique Khan