DBAII_R1_1_Les14_E

Views:
 
Category: Education
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

User-Managed Incomplete Recovery : 

User-Managed Incomplete Recovery

Objectives : 

Objectives After completing this lesson, you should be able to do the following: Describe the steps of incomplete recovery Perform an incomplete database recovery Identify the loss of current online redo log files

Incomplete Recovery Overview : 

Incomplete Recovery Overview Instance SGA Redo log buffer Databuffer Large Pool Locks Shared pool Data dict.cache Shared SQLand PL/SQL ARCn Userprocess Serverprocess PGA Userprocess Serverprocess PGA Parameterfile Passwordfile Archivedlog files 1 1 Database Datafile 1 Datafile 2 Datafile 3 Controlfiles Redo log file 1 Redo log file 2 0 1 1 1

Situations RequiringIncomplete Recovery : 

Situations RequiringIncomplete Recovery Complete recovery fails because an archived log is lost. All unarchived redo log files and a datafile are lost. User error An important table was dropped. Invalid data was committed in a table. Current control file is lost and a backup control file must be used to open the database.

Types of Incomplete Recovery : 

Types of Incomplete Recovery There are three types of incomplete recovery: Time-based recovery Cancel-based recovery Change-based recovery You may need to recover using a restored control file when: Control files are lost Performing incomplete recovery to a point when the database structure is different than the current

Incomplete Recovery Guidelines : 

Incomplete Recovery Guidelines Follow all steps carefully. Take whole database backups before and after recovery. Always verify that the recovery was successful. Back up and remove archived logs.

Incomplete Recovery and the Alert Log : 

Incomplete Recovery and the Alert Log Check the alert log before and after recovery Contains error information, hints, and SCNs

User-Managed Procedures for Incomplete Recovery : 

User-Managed Procedures for Incomplete Recovery Shut down and back up the database. Restore all datafiles. Do not restore the control file, redo logs, password file, or parameter file. Mount the database. Recover the datafiles to a point before the time of failure. Open the database with RESETLOGS. Perform a closed database backup.

RECOVER Command Overview : 

RECOVER Command Overview Recover a database until cancel: Recover a database until time: Recover using backup control file: RECOVER DATABASE until cancel RECOVER DATABASE until time ‘2001-03-04:14:22:03’ RECOVER DATABASE until time ‘2001-03-04:14:22:03’ using backup controlfile

Time-Based Recovery Example : 

Time-Based Recovery Example Scenario: The current time is 12:00 p.m. on March 9, 2001. The EMPLOYEES table has been dropped. The table was dropped at approximately 11:45 a.m. Database activity is minimal because most staff are currently in a meeting. The table must be recovered.

UNTIL TIME Recovery : 

Shut down and back up 1 Mount the database 2 UNTIL TIME Recovery Restore all datafiles 3 Open with Resetlogs 5 Back up the database 6 Datafile 3 Redo logFile 2 Datafile 2 Control Files Redo logFile 1 Datafile 1 Database 145 146 146 146 146 146 Datafile 3 Redo logFile 2 Datafile 2 Control Files Redo logFile 1 Datafile 1 Recovered Database 0 1 1 1 1 1 EMP Datafile 3 Datafile 2 Datafile 1 Restored Database 146 144 144 144 EMP Redo logFile 2 145 Archivedlog file 144 4 Redo logFile 1 146 Control Files

Cancel-Based Recovery Example : 

Cancel-Based Recovery Example Scenario: The current time is 12:00 p.m. on March 9,2001. The EMPLOYEES table was dropped while someone was trying to fix bad blocks. Log files exist on the same disk. The table was dropped at approximately 11:45 a.m. Staff are currently in a meeting.

Cancel-Based Recovery Example : 

Cancel-Based Recovery Example Findings: Redo logs are not multiplexed. One of the online redo logs is missing. The missing redo log is not archived. The redo log contained information from 11:34 a.m. Twenty-six minutes of data will be lost. Users can recover their data.

Using a Backup Control File During Recovery : 

Using a Backup Control File During Recovery Scenario: The current time is 12:00 p.m. on March 9, 2001. The tablespace containing the EMPLOYEES table has been dropped. The error occurred around 11:45 a.m. Many employee records were updated this morning, but not since 11:00 a.m. Backups are taken every night.

Using a Backup Control File During Recovery : 

Using a Backup Control File During Recovery Findings: The backup from last night contains datafiles and control files required for recovery. The EMP_TS tablespace has one datafile. The current log sequence number is 61. You confirm that the tablespace was dropped at 11:44:54 a.m. on March 9, 2001. Datafile number 4 is offline.

Loss of Current Redo Log Files : 

Loss of Current Redo Log Files If the database is closed: Attempt to open the database. Find the current log sequence number. Recover the database until cancel. Drop and re-create log files if necessary. Open the database using RESETLOGS. Perform a whole-database backup.

Summary : 

Summary In this lesson, you should have learned how to: Perform incomplete database recovery Recover from the loss of current online redo log files

Practices 14-1 and 14-2 Overview : 

Practices 14-1 and 14-2 Overview These practices cover the following topics: Recovery from user failure Recovery with lost archived redo log files

authorStream Live Help