所有的文件丢失,正常关库情况。
场景模拟:先改变数据库的物理文件,然后备份到trace和二进制文件,然后又对数据进行修改,然后删除所有的控制文件。
06:16:00
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE
instance shut down.
06:17:22 SQL> !
[oracle@oracle dbs]$ rm
/u01/app/oracle/oradata/lx02/control01.ctl
[oracle@oracle dbs]$ rm
/disk1/lx02/oradata/control02.ctl
[oracle@oracle dbs]$ rm
/disk2/lx02/oradata/control03.ctl
[oracle@oracle dbs]$ sqlplus '/as
sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 1 06:17:51
2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to
an idle instance.
06:17:51 SQL> startup
ORACLE instance
started.
Total System Global Area 176160768 bytes
Fixed
Size 1218364 bytes
Variable Size 88082628
bytes
Database Buffers 83886080 bytes
Redo
Buffers 2973696 bytes
ORA-00205: error in identifying control
file, check alert log for more info
告警日志:
ALTER DATABASE MOUNT
Mon
Aug 1 06:17:54 2011
ORA-00202: control file:
'/u01/app/oracle/oradata/lx02/control01.ctl'
ORA-27037: unable to obtain file
status
Linux Error: 2: No such file or directory
Additional information:
3
Mon Aug 1 06:17:54 2011
恢复步骤:利用trace 文件重建
在nomount 状态
06:19:51
SQL>CREATE CONTROLFILE REUSE DATABASE "LX02" RESETLOGS
NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES
30
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1
'/u01/app/oracle/oradata/lx02/redo01a.log' SIZE 10M,
GROUP 2
'/u01/app/oracle/oradata/lx02/redo02a.log' SIZE 10M
-- STANDBY
LOGFILE
DATAFILE
'/u01/app/oracle/oradata/lx02/system01.dbf',
'/u01/app/oracle/oradata/lx02/rtbs01.dbf',
'/u01/app/oracle/oradata/lx02/sysaux01.dbf',
'/u01/app/oracle/oradata/lx02/user01.dbf',
'/u01/app/oracle/oradata/lx02/example01.dbf',
'/u01/app/oracle/oradata/lx02/indx01.dbf',
'/u01/app/oracle/oradata/lx02/OLTP01.DBF'
CHARACTER
SET ZHS16GBK
06:21:23 20 ;
Control file created.
06:21:27 SQL>
alter database open resetlogs;
Database altered.