控制文件丢失了,需要DBA处理。
1,控制文件大小不对。 将正常的cp给不正常的。指定正确的来运行。
2,控制文件版本不对 千万要记住要先cp全部的控制文件备份后在来cp
3,控制文件某个丢失,至少存在一个
4,控制文件都丢失,
5,有但是很old
Total System Global Area 1090519040 bytes
Fixed Size 1267020 bytes
Variable Size 704645812 bytes
Database Buffers 369098752 bytes
Redo Buffers 15507456 bytes
ORA-00205: error in identifying control file, check alert log for more info
这里提示了控制文件有错误。
SQL> show parameter control_f
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /sof/oracle/oradata/orcl/contr
ol01.ctl, /sof/oracle/oradata/
orcl/control02.ctl, /sof/oracl
e/oradata/orcl/control03.ctl
SQL> ho ls -l /sof/oracle/oradata/orcl/ 这里我们查看到日志文件中,有两个大小一样,说明这两个是正常的。
total 1536352
-rw------- 1 oracle oinstall 7110639 Jan 4 16:00 control01.ctl
-rw------- 1 oracle oinstall 7389184 Jan 4 16:01 control02.ctl
-rw------- 1 oracle oinstall 7389184 Jan 4 16:01 control03.ctl
SQL> ho cp /sof/oracle/oradata/orcl/control01.ctl /sof/oracle/oradata/orcl/control01.ct.bak
SQL> ho cp /sof/oracle/oradata/orcl/control02.ctl /sof/oracle/oradata/orcl/control01.ctl
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1090519040 bytes
Fixed Size 1267020 bytes
Variable Size 704645812 bytes
Database Buffers 369098752 bytes
Redo Buffers 15507456 bytes
Database mounted.
Database opened.
现在数据库就能正常的运行了。
2,控制文件版本不对
SQL> startup
ORACLE instance started.
Total System Global Area 1090519040 bytes
Fixed Size 1267020 bytes
Variable Size 704645812 bytes
Database Buffers 369098752 bytes
Redo Buffers 15507456 bytes
Database mounted.
Database opened.
SQL> alter system set control_files='/sof/oracle/oradata/orcl/control02.ctl' scope=spfile;
System altered.
Database opened.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1090519040 bytes
Fixed Size 1267020 bytes
Variable Size 704645812 bytes
Database Buffers 369098752 bytes
Redo Buffers 15507456 bytes
Database mounted.
Database opened.
SQL> show parameter control_f
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string /sof/oracle/oradata/orcl/contr
ol02.ctl
SQL> alter system set control_files='/sof/oracle/oradata/orcl/control02.ctl','/sof/oracle/oradata/orcl/control01.ctl','/sof/oracle/oradata/orcl/control03.ctl' scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance s