Download presentation
Presentation is loading. Please wait.
Published byRosalind Kelley Modified over 9 years ago
1
4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses
2
4-2 Copyright © 2006, Oracle. All rights reserved. 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
3
4-3 Copyright © 2006, Oracle. All rights reserved. Causes of File Loss File loss can be caused by: User error Application error Media failure
4
4-4 Copyright © 2006, Oracle. All rights reserved. You fix the problem by taking one of these actions: Create a new file. Rebuild the file. Recover the lost or damaged file. Critical Versus Noncritical A noncritical file loss is one where the database can continue to function.
5
4-5 Copyright © 2006, Oracle. All rights reserved. Losing a TEMPFILE SQL> select * from big_table order by 1,2,3,4,5,6,7,8,9,10,11,12,13; select * from big_table order by 1,2,3,4,5,6,7,8,9,10,11,12,13 * ERROR at line 1: ORA-01565: error in identifying file '/u01/app/oracle/oradata/orcl/temp01.dbf' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory SQL statements that require TEMP space to execute fail if one of the tempfiles is missing.
6
4-6 Copyright © 2006, Oracle. All rights reserved. Recovering from a TEMPFILE Loss Password file Parameter file SYSTEM SYSAUX UNDO USERS INDEX Redo log file 1B Redo log file 1A Redo log file 2B Redo log file 2A Control files TEMP
7
4-7 Copyright © 2006, Oracle. All rights reserved. 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.
8
4-8 Copyright © 2006, Oracle. All rights reserved. Errors in file /u01/app/oracle/admin/orcl/bdump/orcl_arc1_25739.trc: ORA-00313: open failed for members of log group 2 of thread 1 ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/orcl/redo02b.log' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Losing a Redo Log Group Member The alert log and the archiver process (ARCn) trace file record an error when a redo member file is missing.
9
4-9 Copyright © 2006, Oracle. All rights reserved. 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; Password file Parameter file SYSTEM SYSAUX UNDO USERS INDEX Redo log file 1A Redo log file 2A Control files TEMP Redo log file 1B Redo log file 2B
10
4-10 Copyright © 2006, Oracle. All rights reserved. Recreating Redo Log Files (notes only slide)
11
4-11 Copyright © 2006, Oracle. All rights reserved. Recreating Redo Log Files (notes only slide)
12
4-12 Copyright © 2006, Oracle. All rights reserved. Re-creating Redo Log Files
13
4-13 Copyright © 2006, Oracle. All rights reserved. Re-creating Indexes Use options to reduce the time it takes to create the index: PARALLEL NOLOGGING SQL> CREATE INDEX rname_idx 2 ON hr.regions (region_name) 3 PARALLEL 4;
14
4-14 Copyright © 2006, Oracle. All rights reserved. Recreating Indexes (notes only slide)
15
4-15 Copyright © 2006, Oracle. All rights reserved. Remote database administration Local database administration Yes No Do you have a secure connection? Use OS authentication. Use a password file. Authentication Methods for Database Administrators Do you want to use OS authentication?
16
4-16 Copyright © 2006, Oracle. All rights reserved. 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. 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. $ orapwd file=$ORACLE_HOME/dbs/orapwORCL password=admin entries=5
17
4-17 Copyright © 2006, Oracle. All rights reserved.
18
4-18 Copyright © 2006, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Recover temporary tablespaces Recover a redo log group member Recover from a lost index Re-create the password file
19
4-19 Copyright © 2006, Oracle. All rights reserved. Practice Overview: Recovering from Lost TEMPFILE and Redo Log File This practice covers the following topics: Starting the database with a missing tempfile Creating a new temporary tablespace Altering the default temporary tablespace for a database Recovering from a lost online redo log member
20
4-20 Copyright © 2006, Oracle. All rights reserved.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.