day10_控制文件

---------------------验证互为镜像功能---------------------

窗口1
cd /oracle/app/oradata/ecom
rm control03.ctl 


窗口2
SQL> startup force;
ORACLE instance started.

Total System Global Area  285212672 bytes
Fixed Size                  1218992 bytes
Variable Size              92276304 bytes
Database Buffers          188743680 bytes
Redo Buffers                2973696 bytes
ORA-00205: error in identifying control file, check alert log for more info

【加载到Nomount状态时,读取参数文件,在参数文件中,指向控制文件,有3个控制文件。】


窗口1
cp control01.ctl control03.ctl 


窗口2
alter database mount;
alter database open;

控制文件复制回来,正常了,验证了镜像功能




---------------------------多路复用------------------------------------
窗口1
SQL> alter system set control_files ='/oracle/app/oradata/ecom/control01.ctl','/home/oracle/ctrl02.ctl' scope=spfile;


窗口2
cp /oracle/app/oradata/ecom/control01.ctl /home/oracle/ctrl02.ctl

窗口1
SQL> shutdown immediate;

窗口2
rm control02.ctl control03.ctl

窗口1
SQL> startup
SQL> show parameter control_files;






原文地址:https://www.cnblogs.com/xiaoxiao5ya/p/7c1144e20f8df6e86f1021ab83fb3407.html