Presentation is loading. Please wait.

Presentation is loading. Please wait.

Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.

Similar presentations


Presentation on theme: "Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace."— Presentation transcript:

1 Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace Information Archived log information Backup information Current log sequence number Check point information

2 Types of Control File Backups Editable trace file: SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE; Binary backup: SQL>ALTER DATABASE BACKUP CONTROLFILE; RMAN>BACKUP CURRENT CONTROLFILE Operating system copy when database is shut down

3 Recovering Control File from RMAN Autobackup RMAN>RESTORE CONTROLFILE FROM AUTOBACKUP

4 Recreation of a Control File from Trace Dump Edit trace dump file and open database using RESETLOGS option Use when: all existing control files have been lost. wish to change name of database wish to change maximum number of redo log file groups redo log group members archived redo log files kept datafiles instances that can concurrently access the database

5 Recreation of a Control File STARTUP NOMOUNT CREATE CONTROLFILE REUSE DATABASE "MYDATABASE" NORESETLOGS NOARCHIVELOG MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 320 MAXINSTANCES 1 MAXLOGHISTORY 120 LOGFILE GROUP 1 '/MYPATH/T_LOG1.F' SIZE 500K, GROUP 2 '/MYOTHERPATH/T_LOG.F' SIZE 500K DATAFILE '/DPATH/DBS/T_DB1.F' '/DPATH/DBS/TBS1.F', '/DPATH/DBS/TIMS.DBF' CHARACTER SET WE8DEC ;

6 Recovery of User-Created Binary Copy of Control File Shutdown Database Copy control file into all locations Mount database Issue RECOVER DATABASE USING BACKUP CONTROLFILE; statement

7 Incomplete Recovery Recovery where not all available redo is applied Performed when: Online redo logs are lost Recover from user error Needed archived redo files are missing Loss of current control file Restore database copy from backup

8 Enterprise Manager Recovery Create and run an RMAN script within EM Choose Database Target for recovery Choose Perform Recovery at Maintenance screen

9 Restoring Backup Control File Restoration from manual backup: RMAN>RESTORE CONTROLFILE; Restoration from autobackup: RMAN>RESTORE CONTROLFILE FROM AUTOBACKUP;

10 Recovering to Point In Time RUN { SET UNTIL TIME 'time in NLS_DATE_FORMAT'; RESTORE DATABASE; RECOVER DATABASE; } ALTER DATABASE OPEN RESETLOGS;

11 Cancel Based Recovery Backup database Shutdown database ( SHUTDOWN ABORT ) Restore control files Mount database ( STARTUP MOUNT ) Recover database ( RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE ) Cancel Recovery ( CANCEL ) Open database ( ALTER DATABASE OPEN RESETLOGS )

12 Time Based Recovery Backup database Shutdown database ( SHUTDOWN ABORT ) Restore control files Mount database ( STARTUP MOUNT ) Recover database: SQL>RECOVER DATABASE UNTIL TIME '2006-01-01:12:24:30' USING BACKUP CONTROLFILE SQL> RECOVER DATABASE UNTIL CHANGE 10234; Open database ( ALTER DATABASE OPEN RESETLOGS;)

13 Recovery Through RESETLOGS Recovery across RESETLOGS not possible before Oracle 10g Backups now can be used from before incomplete recovery Archive logs need to be distinguishable Setting the LOG_ARCHIVE_FORMAT Include %r for incarnation number Example: ALTER SYSTEM SET LOG_ARCHIVE_FORMAT=arch_%s_%d_%r scope=both;


Download ppt "Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace."

Similar presentations


Ads by Google