Databases Reference
In-Depth Information
Next, ensure that your database is in mount mode:
$ sqlplus / as sysdba
SQL> startup mount;
Next, run the following query to verify that the damaged log group is INACTIVE and determine whether it has
been archived:
SELECT group#, status, archived, thread#, sequence#
FROM v$log;
Here is some sample output:
GROUP# STATUS ARC THREAD# SEQUENCE#
------ ---------------- --- ---------- ----------
1 CURRENT NO 1 25
3 INACTIVE NO 1 24
2 INACTIVE NO 1 23
If the status is INACTIVE, then this log group is no longer needed for crash recovery (as described in Table 14-3 ).
Therefore, you can use the clear logfile command to re-create all members of a log group. The following example
re-creates all log members of group 2:
SQL> alter database clear logfile group 2;
If the log group has not been archived, then you will need to use the clear unarchived logfile command
as follows:
SQL> alter database clear unarchived logfile group 2;
If the cleared log group had not been previously archived, it's critical that you immediately create a backup of
your database. See Chapter 7 for details on taking a complete backup of your database.
Keep in mind that in these prior examples the logfile group is number 2. You'll have to modify the group number
to match the group number for your scenario.
How It Works
If the online redo log group is inactive and archived, then its contents aren't required for crash or media recovery. Use
the clear logfile command to re-create all online redo log file members of a group.
the clear logfile command will drop and re-create all members of a log group for you. You can issue this
command even if you have only two log groups in your database.
Note
If the online redo log group has not been archived, then it may be required for media recovery. In this case, use
the clear unarchived logfile command to re-create the logfile group members. Back up your database as soon as
possible in this situation.
 
 
Search WWH ::




Custom Search