Oracle Database/Recovery

From Wikibooks, open books for an open world
Jump to: navigation, search

Recovering from loss of a control file[edit]

Using RMAN:

If flash recovery area is configured and control file auto backup is on then:

RMAN> connect target /

RMAN> startup nomount;

RMAN> restore controlfile from autobackup;

This will restore the control file to the location specified by the initialization parameter CONTROL_FILES mentioned in initialization parameter.

If flash recovery area is configured and control file auto backup is off then:

RMAN> connect target /

RMAN> startup nomount;

RMAN> restore controlfile from 'C:\FRA\DBNAME\backupset\date_of_backup\backupset_name';

This will restore the control file to the location specified by the initialization parameter CONTROL_FILES mentioned in initialization parameter.

If restoration is being done using recovery catalog then:

RMAN> connect target /

RMAN> connect catalog catalog_database_user/password@recovery_catalog_service;

RMAN> startup nomount;

RMAN> restore controlfile;

This will restore the control file to the location specified by the initialization parameter CONTROL_FILES mentioned in initialization parameter.

If no flash recovery area is configured, no recovery catalog is available and RMAN backup piece is available at default location then:

RMAN> connect target /

RMAN> startup nomount;

RMAN> set dbid 1234567890;

RMAN> restore controlfile from autobackup;

Recovering from loss of a redo log file[edit]

Recovering from loss of a system-critical datafile[edit]

Recovering from loss of a non–system-critical datafile[edit]