How to Restore a Oracle Control File from RMAN Tool

Restore a Oracle Control File from RMAN
Андрей Волков

Андрей Волков

Системное, сетевое администрирование +DBA. И немного программист!))  Профиль автора.

If you are missing one control file, and you have multiple copies, then you can shut down your database and simply restore the missing or damaged control file by copying a good control file to the correct location and name of the missing control file (see Chapter 2 for details).


Listed next are three typical scenarios when restoring a control file:

  • Using a recovery catalog
  • Using an autobackup
  • Specifying a backup file name

When you’re connected to the recovery catalog, you can view backup information about your control files even while your target database is in nomount mode. To list backups of your control files, use the LIST command, as shown:

$ rman target / catalog rcat/foo@rcat

RMAN> startup nomount;

RMAN> list backup of controlfile;

If you’re missing all your control files, and you’re using a recovery catalog, then issue the STARTUP NOMOUNT and the RESTORE CONTROLFILE commands:

RMAN> startup nomount;

RMAN> restore controlfile;

RMAN restores the control files to the location defined by your CONTROL_FILES initialization parameter. You should see a message indicating that your control files have been successfully copied back from an RMAN backup piece. You can now alter your database into mount mode and perform any additional restore and recovery commands required for your database.

Image Note  When you restore a control file from a backup, you’re required to perform media recovery on your entire database and open your database with the OPEN RESETLOGS command, even if you didn’t restore any data files. You can determine whether your control file is a backup by querying the CONTROLFILE_TYPE column of the V$DATABASE view.

When you enable the autobackup of your control file and are using an FRA, restoring your control file is fairly simple. First, connect to your target database, then issue a STARTUP NOMOUNT command, followed by the RESTORE CONTROLFILE FROM AUTOBACKUP command, like this:

$ rman target /

RMAN> startup nomount;

RMAN> restore controlfile from autobackup;

RMAN restores the control files to the location defined by your CONTROL_FILES initialization parameter. You should see a message indicating that your control files have been successfully copied back from an RMAN backup piece. Here is a snippet of the output:

channel ORA_DISK_1: control file restore from AUTOBACKUP complete

You can now alter your database into mount mode and perform any additional restore and recovery commands required for your database.

When restoring a database to a different server, these are generally the first few steps in the process take a backup of the target database, copy to the remote server, and then restore the control file from the RMAN backup. In these scenarios, I usually know the name of the backup piece that contains the control file. Here is an example in which you instruct RMAN to restore a control file from a specific backup piece file:

RMAN> startup nomount;

RMAN> restore controlfile from

'/u01/O12C/rman/rman_ctl_c-3423216220-20130113-01.bk';

The control file will be restored to the location defined by the CONTROL_FILES initialization parameter.

Вас заинтересует / Intresting for you:

RMAN: Specifying the Backup Us...
RMAN: Specifying the Backup Us... 2482 views Андрей Волков Sat, 29 Feb 2020, 10:14:03
RMAN: Using Online or Offline ...
RMAN: Using Online or Offline ... 1638 views Андрей Волков Sat, 29 Feb 2020, 10:01:33
How to use RMAN for Stop/Start...
How to use RMAN for Stop/Start... 1925 views Андрей Волков Mon, 31 Jan 2022, 17:35:05
RMAN: Backing Up the spfile
RMAN: Backing Up the spfile 4723 views Андрей Волков Wed, 29 Sep 2021, 18:13:31
Comments (0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations