Troubleshoot: data guard synchronization stuck with error ORA-01274

I was recently contacted by a friend who had an emergency: her standby database had stopped synchronizing. Reviewing the alert.log file she found the error ORA-01274, and concluded that a datafile had been added to the primary database, and when trying to replicate the change to the standby, this datafile had not been created due to lack of disk space.

Last night on the Oracle Technet forum, someone reported a similar situation, but in that case the source of the error was less clear, the result was the same: the creation of one or more datafiles was not replicated. What to do in a situation like this?

In situations like this, where Oracle fails to create a datafile in the standby database, the datafile is registered in the controlfile with a name similar to UNNAMED0000 and synchronization is aborted with the error ORA-1274: cannot add datafile.

The steps to follow to overcome the impasse are as follows:

1. Disable automatic standby file management

SQL> alter system set standby_file_management = manual scope=memory;

2. Identify the datafile which is “unnamed”

SQL> select name from v$datafile where name like '%UNNAMED%';
NAME
--------------------------------------------------------
/oracle/product/10.2.0/database/UNNAMED00033

3. Create the datafile to the correct filename

SQL> alter database create datafile 
'/oracle/product/10.2.0/database/UNNAMED00033' as '/oradata/orcl/dat04.dbf';

4. Enable automatic standby file management

SQL> alter system set standby_file_management = auto scope=memory;

Now you can restart the recovery, problem solved!

Did you find this article interesting, did you have any doubts, do you want to suggest a topic to cover, leave me your comments or contact me me right now!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Out of place patching Oracle RAC
Learn how to patch Oracle RAC database in out-of-place mode and use Gold Image for maximum simplicity and minimum effort.
Hide column contents
Learn how to implement the masking of column contents dynamically and without having to modify your applications.
Register ACFS file system fails
Learn how to register an ACFS filesystem after migrating the Disk Group containing it to a new Oracle Cluster.

Need Help?

Fill in these details and I will be in touch as soon as possible.