Rman Recovery Control File

Source: Internet
Author: User

View the current control file location

Sql> select name from V$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/control01.ctl
/u01/app/oracle/flash_recovery_area/orcl/control02.ctl

Back up a control file first

Rman> Backup current controlfile tag= ' bak_ctlfile ' format= '/home/oracle/backup/bak_ctl_%u_%t ';

Create a table space

Create tablespace xds datafile '/u01/app/oracle/oradata/cfpay/xds.dbf ' size 10m autoextend off;

Rm/u01/app/oracle/oradata/orcl/control01.ctl

Rm/u01/app/oracle/flash_recovery_area/orcl/control02.ctl

Shutdown abort

Starup Nomount

Rman>restore controlfile from '/home/oracle/backup/bak_ctl_0ir8ibjo_1_1_20160619 '

Sql> ALTER DATABASE Mount;

Database altered.

Sql> select name from V$datafile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/example01.dbf
/u01/app/oracle/oradata/orcl/test01.dbf

6 rows selected.

Then use the archive in Rman.

rman> Recover database;

Starting Media recovery

Archived log for thread 1 with sequence 9 was already on disk as File/u01/app/oracle/oradata/orcl/redo03.log
Archived log file Name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=9
Creating datafile file Number=7 name=/u01/app/oracle/oradata/orcl/xds.dbf
Archived log file Name=/u01/app/oracle/oradata/orcl/redo03.log thread=1 sequence=9
Media recovery complete, elapsed time:00:00:01
Finished recover at 19-jun-16

Sql>/

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/system01.dbf
/u01/app/oracle/oradata/orcl/sysaux01.dbf
/u01/app/oracle/oradata/orcl/undotbs01.dbf
/u01/app/oracle/oradata/orcl/users01.dbf
/u01/app/oracle/oradata/orcl/example01.dbf
/u01/app/oracle/oradata/orcl/test01.dbf
/u01/app/oracle/oradata/orcl/xds.dbf

Resetlogs Way to open a database

sql> ALTER DATABASE open resetlogs;

Database altered.

After you follow the different backups there is no problem.

Rman Recovery 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.