Oracle的控制文件多路复用,控制文件备份,控制文件手工恢复

一.配置控制文件多路复用 

 1.查询Oracle的控制文件所在位置

SQL> select name from v$controlfile;

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

 spfile多路复用控制文件

2.修改control_files参数:

SQL> alter system set 
control_files='/u01/app/oracle/oradata/orcl/control02.ctl',
'/u01/app/oracle/oradata/orcl/control03.ctl',
'/u01/app/oracle/oradata/orcl/control05.ctl' 
scope=spfile;

3.关闭数据库 

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down

 4. 进行文件拷贝(必须在数据库关闭下复制文件)

[oracle@cz ~]$ cp /u01/app/oracle/oradata/orcl/control01.ctl /u01/app/oracle/oradata/orcl/control02.ctl
[oracle@cz ~]$ cp /u01/app/oracle/oradata/orcl/control01.ctl /u01/app/oracle/oradata/orcl/control03.ctl
[oracle@cz ~]$ cp /u01/app/oracle/oradata/orcl/control01.ctl /u01/app/oracle/oradata/orcl/control05.ctl

5. 连接数据库 

[oracle@cz ~]$ sqlplus / as sysdba

6. 启动数据库

SQL> startup;
ORACLE instance started.

Total System Global Area 1169149952 bytes
Fixed Size		    2252624 bytes
Variable Size		  738197680 bytes
Database Buffers	  419430400 bytes
Redo Buffers		    9269248 bytes
Database mounted.
Database opened.

 7.查询控制文件信息

SQL> select name from v$controlfile;

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/orcl/control02.ctl
/u01/app/oracle/oradata/orcl/control03.ctl
/u01/app/oracle/oradata/orcl/control05.ctl

二.控制文件的损坏模拟与重建

你可能感兴趣的:(oracle,数据库)