4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses.

Slides:



Advertisements
Similar presentations
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
Advertisements

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.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
ITEC474 Control File Maintenance
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
Chapter 9 Auditing Database Activities
Harvard University Oracle Database Administration Session 2 System Level.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
RMAN Restore and Recovery
Backup and Recovery (2) Oracle 10g CAP364 1 Hebah ElGibreen.
Backup and Recovery Part 1.
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
Oracle9i Database Administrator: Implementation and Administration
7 Maintaining Redo Log Files. 7-2 Objectives Explaining the use of online redo log files Obtaining log and archive information Controlling log switches.
Using RMAN to Perform Recovery
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
7 Copyright © 2004, Oracle. All rights reserved. Recovering from Noncritical Losses.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 9 Auditing Database Activities.
7 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
Oracle 10g Database Administrator: Implementation and Administration Chapter 3 Creating an Oracle Instance.
Database Storage Structures
8 Copyright © Oracle Corporation, All rights reserved. Configuring the Database Archiving Mode.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Week 2 Lecture 1 Creating an Oracle Instance. Learning Objectives  Learn the steps for creating a database  Understand the prerequisites for creating.
10 Copyright © Oracle Corporation, All rights reserved. User-Managed Backups.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
16 Copyright © 2005, Oracle. All rights reserved. Performing Database Recovery.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
23 Copyright © 2004, Oracle. All rights reserved. Preferring the Past: Flashback.
Oracle Database Architectural Components
15 Copyright © Oracle Corporation, All rights reserved. Managing Users.
9 Copyright © 2005, Oracle. All rights reserved. Managing Undo Data.
10 Copyright © 2007, Oracle. All rights reserved. Managing Undo Data.
Maintaining Online Redo Log Files
Oracle9i Database Administrator: Implementation and Administration
Recovering from Noncritical Losses
Performing Database Recovery
Chapter 5 The Redo Log Files.
Presentation transcript:

4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses

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

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 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.

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.

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

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.

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.

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

4-10 Copyright © 2006, Oracle. All rights reserved. Recreating Redo Log Files (notes only slide)

4-11 Copyright © 2006, Oracle. All rights reserved. Recreating Redo Log Files (notes only slide)

4-12 Copyright © 2006, Oracle. All rights reserved. Re-creating Redo Log Files

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;

4-14 Copyright © 2006, Oracle. All rights reserved. Recreating Indexes (notes only slide)

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?

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

4-17 Copyright © 2006, Oracle. All rights reserved.

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

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

4-20 Copyright © 2006, Oracle. All rights reserved.