控制文件多元化:就是复制多个控制文件并存放到不同的磁盘。
1、使用SPFILE多元化控制文件
1)查看控制文件信息和spfile 信息
05:55:48 SQL> select name from v$controlfile;
NAME
----------------------------------------------------------------------------------------- ------------- ------------------------------------------------
/u01/app/oracle/oradata/lx02/control01.ctl
05:56:45 SQL> show parameter contro
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /u01/app/oracle/oradata/lx02/c
ontrol01.ctl
05:56:49 SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u01/app/oracle/product/10.2.0
/db_1/dbs/spfilelx02.ora
05:57:00 SQL>
2)修改control_files 参数
05:57:55 SQL> alter system set control_files=
05:58:01 2 '/u01/app/oracle/oradata/lx02/control01.ctl','/disk1/lx02/oradata/control02.ctl' scope=spfile;
System altered.
3)关闭instance ,拷贝controlfile
05:58:29 SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
05:59:02 SQL> !
[oracle@oracle ~]$ cp /u01/app/oracle/oradata/lx02/control01.ctl /disk1/lx02/oradata/control02.ctl
4)startup 启动实例
05:59:44 SQL> select name from v$controlfile;
NAME
--------------------------------------------
/u01/app/oracle/oradata/lx02/control01.ctl
/disk1/lx02/oradata/control02.ctl