Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 14 Handling Online Redo Log Failures. Background RMAN doesn’t back up online redo logs You don’t use RMAN to recover from online redo log failures.

Similar presentations


Presentation on theme: "Chapter 14 Handling Online Redo Log Failures. Background RMAN doesn’t back up online redo logs You don’t use RMAN to recover from online redo log failures."— Presentation transcript:

1 Chapter 14 Handling Online Redo Log Failures

2 Background RMAN doesn’t back up online redo logs You don’t use RMAN to recover from online redo log failures Authors and editor debated on whether this topic should be included in an RMAN book Authors felt strongly that some material should be added to show how to deal with online redo log failures This topic isn’t covered well in many other Oracle B&R books One of the first chapters written in the book

3 Online Redo Logs Store the transaction redo stream Used for recovery Considered a weak link in the Oracle architecture If not using a tool like Data Guard in maximum protection mode, you could lose transactions if you lose your current online redo log

4 Mitigating Online Redo Failure Multiplex groups to have multiple members Never allow two members of the same group to share the same controller Never put two members of the same group on the same physical disk Ensure operating system file permissions are set appropriately Use physical storage devices that are redundant (that is, RAID) Appropriately size the log files so that they switch and are archived at regular intervals Set the archive_lag_target initialization parameter to ensure that the online redo logs are switched at regular intervals

5 Determining How to Restore 1. Inspect the alert.log file to determine which online redo log files have experienced a media failure 2. Query V$LOG and V$LOGFILE to determine the status of the log group and degree of multiplexing 3. If there is still one functioning member of a multiplexed group, then see recipe 14-2 for details on how to fix the remaining failed member(s) 4. Depending on the status of the log group, use Table 14-1 to determine what action to take

6 Determining Status SQL> select a.group#, a.thread#, a.status grp_status, b.member member, b.status mem_status from v$log a, v$logfile b where a.group# = b.group# order by a.group#, b.member;

7 Status Column of V$LOG Inactive, not required for crash recovery Active, required for crash recovery Current, required for crash recovery, log writer is currently writing

8 Restoring After Losing One Member of Multiplexed Group Oracle continues to operate if it can write to one member of an online redo log group If one member is bad, an error is written to the alert.log file Steps to take: 1. Identify the online redo log file experiencing media failure 2. Ensure that the online redo log file is not part of the current online log group 3. Drop the damaged member 4. Add a new member to the group

9 Recovering After Loss of All Members of the INACTIVE Redo Log Group 1. Verify that all members of a group have been damaged 2. Verify that the log group status is INACTIVE 3. Re-create the log group with the clear logfile command 4. If the re-created log group has not been archived, then immediately back up your database

10 Dropping and Adding a Redo Log Group A log group has to have an inactive status before you can drop it. You can check the status of the log group as shown here: SQL> select group#, status, archived, thread#, sequence# from v$log; SQL> alter database drop logfile group ; SQL> alter database add logfile group ('\directory\file') SIZE K|M;

11 Recovering After Loss of All Members of the ACTIVE Redo Log Group 1. Verify the damage to the members 2. Verify that the status is ACTIVE 3. Attempt to issue a checkpoint 4. If the checkpoint is successful, the status should now be INACTIVE, and you can clear the log group 5. If the log group that was cleared was unarchived, back up your database immediately 6. If the checkpoint is unsuccessful, then you will have to perform incomplete recovery (see recipe 14-5 for options)

12 Recovering After Loss of All Members of the CURRENT Redo Log Group This is where things get a little scary Oracle needs the current online redo log to perform crash recovery You might have to perform an incomplete recovery

13 Options When Losing Current Online Redo Log Perform an incomplete recovery up to the last good SCN If flashback is enabled, flash your database back to the last good SCN If you’re using Oracle Data Guard, fail over to your physical or logical standby database Contact Oracle Support for suggestions

14 Background Authors, editor, and technical editor (who is an RMAN expert working for Oracle Support) debated on exactly which options they could include in the book when losing current online redo log group There are other options, but potentially not supported unless you enlist the help of Oracle Support Decided to go with the line “contact Oracle Support to discuss all options...”


Download ppt "Chapter 14 Handling Online Redo Log Failures. Background RMAN doesn’t back up online redo logs You don’t use RMAN to recover from online redo log failures."

Similar presentations


Ads by Google