This error can show up when trying to archive an active logfile but the logfile is unavailable.
SQL> alter system archive log current;
alter system archive log current
*
ERROR at line 1:
ORA-16038: log 1 sequence# 19 cannot be archived
ORA-00312: online log 1 thread 1: '/orafs04/oradata/rmant01/redo01a.log'
Trying to drop the logfile will receive the following error:
SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance rmant01 (thread 1)
ORA-00312: online log 1 thread 1: '/orafs04/oradata/rmant01/redo01a.log'
The solution is to clear the logfile with 'unarchived' option first and then drop and recreate the logfile.
SQL> alter database clear unarchived logfile group 1;
Database altered.
SQL> alter database drop logfile group 1;
Database altered.
SQL> alter database add logfile ('/orafs04/oradata/rmant01/redo01a.log') size 100M;
Database altered.
Note: You may need to backup database immediately since you lose the transaction in the logfile which was dropped.
No comments:
Post a Comment