Using Rman to restore a control file

Source: Internet
Author: User

The default backup format for control files is:
C-iiiiiiiiii-yyyymmdd-qq


which
C: Indicates a control file
IIIIIIIIII: Indicates dbid
YYYYMMDD: Time stamp for backup
Qq:16 binary serial number, starting from 00, maximum value FF

Using the fast recovery area or recovery catalog
1. Restore the control file from an automated backup
rman> restore controlfile from Autobackup;

2. Restore the control file from the specified backup slice
rman> restore Controlfile from '/tmp/piece_name ';

3. Restore the control files from the most recently available control file backup
rman> restore Controlfile;

If you are not using fast recovery area or recovery catalog, set the dbid before you restore the control file
4. Using the default backup in $oracle_home/dbs
Rman> set dbid=xxxxxxxx;
rman> restore controlfile from Autobackup;

5. The default is to recover from the default backup for the last 7 days, or you can specify the number of days
Rman> set dbid=xxxxxxxx;
rman> restore Controlfile from Autobackup maxdays 20;

6. Restore based on the sequence of automatic backups
Rman> set dbid=xxxxxxxx;
rman> restore Controlfile from Autobackup maxseq 20;

7. From a non-default backup PATH environment
Rman> set dbid=xxxxxxxx;
rman> set controlfile autobackup format for device type disk to '/tmp/%f ';
rman> restore controlfile from Autobackup;

8. Restore from a specified sub-division
Rman> set dbid=xxxxxxxxx;
rman> restore Controlfile from '/tmp/c-1140771490-20080502-03 ';

9. Restore the control file to a temporary directory, and then use the duplicate command to restore to the specified location and name based on the parameter control_files
Rman> set dbid=xxxxxxxxx;
rman> restore Controlfile from '/tmp/c-1140771490-2008050203 ' to '/tmp/control.tmp ';
Rman> replicate controlfile from '/tmp/control.tmp ';

10. Restore based on point in time
rman> restore Controlfile from autobackup until Time "to_date (' Jan 14:00:00 ', ' MON DD YYYY HH24:MI:SS ')";

Using Rman to restore a control file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.