Friday, January 22, 2016

ORA-00344 unable to re-create online log ORA-27040 file create error unable to create file

http://blog.dbvisit.com/activating-standby-database-failover/


ORA-00344 unable to re-create online log ORA-27040 file create error unable to create file


SQL>  alter database rename file '/oracle/oradata/dbvisitp/redo01.log'
 to '/oracleX/oradata/dbvisitp/redo01.log';
Database altered.

SQL> alter database activate standby database;
alter database activate standby database
*
ERROR at line 1:
ORA-00344: unable to re-create online log
'/oracleX/oradata/dbvisitp/redo01.log'
ORA-27040: file create error, unable to create file
Linux Error: 2: No such file or directory



The database is still a standby database as the activation failed.
We cannot manually create the redo logs, as this is an Oracle internal operation.
The only thing we can do is to give the correct location for the redo log files.
Rename the redo log to the correct location:



SQL>  alter database rename file '/oracleX/oradata/dbvisitp/redo01.log' to
'/oracle/oradata/dbvisitp/redo01.log';

Database altered.
SQL> alter database activate standby database;

Database altered.

SQL>


Note: all previous backups of this database are now invalid and cannot be used to restore this database. This is because of the RESETLOGS command which resets the archive sequence number (SEQUENCE#) and invalidates all previous archive logs. The SCN number of the database is not reset.


No comments:

Post a Comment

Followers