Database Reference
In-Depth Information
If the database happened to crash before you could add the log file, you would mount
the database and then issue the ALTER DATABASE ADD LOGFILE command. You should then
be able to open the database.
Another option is to shut down the database in a consistent manner ( SHUTDOWN , SHUTDOWN
IMMEDIATE , SHUTDOWN TRANSACTIONAL , SHUTDOWN NORMAL ) and then copy another member of
the redo log group to the location of the missing member. You can then restart the database
normally.
Dealing with the Loss of an Inactive Online Redo Log Group
Loss of an inactive online redo log group is not a terribly big deal in and of itself and is
quite easy to recover from. There are two different situations you will need to be prepared
for. First is loss of an inactive online redo log group during database startup. Second is loss
of an inactive online redo log group during database operations. Let's look at these two
situations in more detail.
Dealing with the Loss of an Inactive Online Redo Log Group on Startup
First, if you start up the database and the inactive online redo log group cannot be opened,
you will get the following error message:
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: 'C:\ORACLE\ORADATA\ORCL\REDO02.LOG'
The response to this condition is to drop the log-file group using the ALTER DATABASE
command, as shown here:
SQL> alter database drop logfile group 2;
You can then recreate the online redo log group using the ALTER DATABASE ADD LOGFILE
command:
SQL> alter database add logfile group 2
'c:\oracle\oradata\orcl\redo02A.log' size 50m;
SQL> alter database add logfile group 2
'c:\oracle\oradata\orcl\redo02B.log' size 50m;
Dealing with the Loss of an Inactive Online Redo Log Group When the
Database Is Running
If you lose an inactive online redo log group (or it becomes corrupted) while the database is
running, the database will sometimes keep operating. It will sometimes skip the online redo
log group that went missing and continue to operate normally. In this case, you can issue
an ALTER SYSTEM CHECKPOINT command and then clear the log-file group with the ALTER
DATABASE CLEAR LOGFILE GROUP command, as shown here:
SQL>alter system checkpoint;
SQL>alter database clear logfile group 1;
Search WWH ::




Custom Search