在做多路复用控制文件的实验时,创建控制文件总是会报错误:ORA-00205: error in identifying control file, check alert log for more info
下面是当时的操作过程:
点击(此处)折叠或打开
-
SYS@ORCL> show parameter control_files;
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
control_files string /u01/app/oracle/oradata/ORCL/c
-
ontrol01.ctl, /u01/app/oracle/
-
fast_recovery_area/ORCL/contro
-
l02.ctl
-
SYS@ORCL> shutdown immediate;
-
Database closed.
-
Database dismounted.
-
ORACLE instance shut down.
-
SYS@ORCL> ! cp /u01/app/oracle/oradata/ORCL/control01.ctl /home/oracle/control03.ctl
-
-
SYS@ORCL> startup nomount;
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
-
SYS@ORCL> alter system set control_files='/u01/app/oracle/oradata/ORCL/control01.ctl,/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /home/oracle/control03.ctl' scope=spfile;
-
-
System altered.
-
-
SYS@ORCL> startup force;
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
- ORA-00205: error in identifying control file, check alert log for more info
看上去似乎没有错误,于是开始查看alert日志,在日志中看到的内容如下:
点击(此处)折叠或打开
- Mon Feb 01 23:44:54 2016
- ALTER DATABASE MOUNT
- ORA-00210: cannot open the specified control file
- ORA-00202: control file: '/u01/app/oracle/oradata/ORCL/control01.ctl,/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /home/oracle/control03.ctl'
- ORA-27037: unable to obtain file status
- Linux-x86_64 Error: 2: No such file or directory
- Additional information: 3
- ORA-205 signalled during: ALTER DATABASE MOUNT...
点击(此处)折叠或打开
- SYS@ORCL> alter system set control_files='/u01/app/oracle/oradata/ORCL/control01.ctl,/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /home/oracle/control03.ctl' scope=spfile;
可是上面明明提示这据SQL更改成功了,为什么会出错呢?思来想去可能问题出在后面的参数值的格式上,于是将这句SQL改为:
点击(此处)折叠或打开
-
SYS@ORCL> alter system set control_files='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl','/home/oracle/control03.ctl' scope=spfile;
-
-
System altered.
-
-
SYS@ORCL> startup force;
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
-
Database mounted.
-
Database opened.
-
SYS@ORCL> show parameter control_files;
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
control_files string /u01/app/oracle/oradata/ORCL/c
-
ontrol01.ctl, /u01/app/oracle/
-
fast_recovery_area/ORCL/contro
-
l02.ctl, /home/oracle/control0
- 3.ctl
点击(此处)折叠或打开
-
SYS@ORCL> alter system set control_files="/u01/app/oracle/oradata/ORCL/control01.ctl","/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl","/home/oracle/control03.ctl" scope=spfile;
-
-
System altered.
-
-
SYS@ORCL> startup force;
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
-
Database mounted.
-
Database opened.
-
SYS@ORCL> show parameter control_files;
-
-
NAME TYPE VALUE
-
------------------------------------ ----------- ------------------------------
-
control_files string /u01/app/oracle/oradata/ORCL/c
-
ontrol01.ctl, /u01/app/oracle/
-
fast_recovery_area/ORCL/contro
-
l02.ctl, /home/oracle/control0
- 3.ctl
也能成功,在此处的control_files参数是单引号和双引号之间没有区别。那么把失败的情况换成双引号结果会怎样?
点击(此处)折叠或打开
-
SYS@ORCL> alter system set control_files="/u01/app/oracle/oradata/ORCL/control01.ctl,/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /home/oracle/control03.ctl" scope=spfile;
-
-
System altered.
-
-
SYS@ORCL> startup force;
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
- ORA-00205: error in identifying control file, check alert log for more info
同样还是失败,也就是说,在修改此参数时,一个单/双引号里的内容均会被认为是一个完整的路径,要想指定多个路径,必须以单/双引号分别指定路径,路径之间以逗号隔开,当然,全部是西文字符。