10g Admin Workshop II - 4 - Recovering from Noncritical Losses

Posted by Vincent on April 1, 2008

Objectives

After completing this lesson, you should be able to:
• Recover temporary tablespaces
• Recover a redo log group member
• Recover from a lost index
• Re-create the password file

Losing a TEMPFILE
SQL statements that require TEMP space to execute fail if one of the tempfiles is missing.

Recovering from a TEMPFILE Loss
You can recover from a lost TEMPFILE without restarting the database.
SQL> ALTER TABLESPACE temp ADD DATAFILE
'/u01/app/oracle/oradata/orcl/temp02.dbf' SIZE 20M;
Tablespace altered.
SQL> ALTER TABLESPACE temp DROP TEMPFILE
'/u01/app/oracle/oradata/orcl/temp01.dbf';
Tablespace altered.

Log Group Status: Review
A redo log group has a status of one of the following values at any given time:
• CURRENT: The LGWR process is currently writing redo data to it.
• ACTIVE: It is no longer being written to, but it is still required for instance recovery.
• INACTIVE: It is no longer being written to, and it is no longer required for instance recovery.

Re-creating Redo Log Files
SQL> ALTER DATABASE DROP LOGFILE MEMBER
> '/u01/app/oracle/oradata/orcl/redo02b.log';

SQL> !rm /u01/app/oracle/oradata/orcl/redo02b.log

SQL> ALTER DATABASE ADD LOGFILE MEMBER
> '/u01/app/oracle/oradata/orcl/redo02b.log'
> TO GROUP 2;

 

 

• You can drop a redo log member only if it is not part of an active or current group. If the group you want to drop is active, then force a log switch to occur.

The progression of log group #1 from CURRENT to ACTIVE to INACTIVE:
SQL> alter system switch logfile;

SQL> alter system checkpoint;

Re-creating a Password Authentication File
1. Log in to the database by using OS authentication.
2. Set the REMOTE_LOGIN_PASSWORDFILE parameter to NONE and restart the database.
3. Re-create the password file by using orapwd.
   $ orapwd file=$ORACLE_HOME/dbs/orapwORCL
password=admin entries=5

4. Set REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE.
5. Add users to the password file and assign appropriate privileges to each user.
6. Restart the instance.

 

-- EOF --


This work is licensed under a CC A-S 4.0 International License.