Backup Options   «Prev  Next»

Performing inactive Redo Log Recovery

The steps in the simulation are as follows:
  1. To make sure you are pointed to the right database ORCL, type in SET ORACLE_SID=ORCL at the prompt. After you finish, press Enter.
  2. To access the Server Manager, type in SVRMGR30 at the prompt. After you finish, press Enter.
  3. To connect as sysdba, type the CONNECT INTERNAL at the prompt. After you finish, press Enter. The password ORACLE is entered for you.
  4. You need to mount the database to perform the inactive redo log recovery. At the prompt, type STARTUP OPEN PFILE='C:\ORANT\DATABASE\INITORCL.ORA' to get the error message showing which online redo log is corrupt. Suppose that the path for the parameter file is C:\ORANT\DATABASE\INITORCL.ORA. After you finish, press Enter.
  5. Now you know that online log #2 needs to be cleared and recreated. Before doing that, you have to find the location of this file. To find the file location, type SELECT * FROM V$LOGFILE; at the prompt. After you finish, press Enter.
  6. The query results show that you have only two online redo logs for the database and that online redo log group #2 is not the current redo log. However, if you try to drop the corrupt online redo log, you will receive error messages because you have only two online redo logs. Type ALTER DATABASE DROP LOGFILE GROUP 2; at the prompt and press Enter.
  7. In this situation, you have to create a temporary online redo log group in order to drop the corrupted one. To add an online redo log, type ALTER DATABASE ADD LOGFILE GROUP 3 'C:\ORANT\DATABASE\LOG3ORCL.ORA' SIZE 150K; at the prompt. Suppose the size of the file is 150K. After you finish, press Enter.
  8. Now you can drop the corrupted online redo log. Type ALTER DATABASE DROP LOGFILE GROUP 2 to perform this action at the prompt. After you finish, press Enter.
  9. To recreate the dropped redo log file, type ALTER DATABASE ADD LOGFILE GROUP 2 'C:\ORANT\DATABASE\LOG2ORCL.ORA' SIZE 150K; at the prompt. After you finish, press Enter.
  10. To remove the temporary redo log file, type ALTER DATABASE DROP LOGFILE GROUP 3; at the prompt. After you finish, press Enter.
  11. Type ALTER DATABASE OPEN; at the prompt to start the database. After you finish, press Enter.
  12. You have successfully recovered the database with an inactive redo log. Do not forget to remove the file for the temporary redo log in your operating system. To avoid data loss, do not forget to multiplex all redo logs. This completes the Simulation. Click the Exit button.