Oracle案例:损坏Control文件的恢复方法.docx
文本预览下载声明
Oracle案例:损坏控制文件的恢复方法
一: 损坏单个控制文件
1、单个文件丢失
场景模拟:[oracle@oracle dbs]$ rm /disk2/lx02/oradata/control03.ctl[oracle@oracle dbs]$ sqlplus /as sysdbaSQL*Plus: Release .0 - Production on Mon Aug 1 06:14:54 2011Copyright (c) 1982, 2005, Oracle.? All rights reserved.Connected to an idle instance.06:14:54 SQL startupORACLE instance started.Total System Global Area? 176160768 bytesFixed Size????????????????? 1218364 bytesVariable Size?????????????bytesDatabase Buffers??????????bytesRedo Buffers??????????????? 2973696 bytesORA-00205: error in identifying control file, check alert log for more info通过告警日志获得信息:ALTER DATABASE?? MOUNTMon Aug? 1 06:14:57 2011ORA-00202: control file: /disk2/lx02/oradata/control03.ctlORA-27037: unable to obtain file statusLinux Error: 2: No such file or directoryAdditional information: 3
恢复步骤:06:14:57 SQL shutdownORA-01507: database not mountedORACLE instance shut down.06:15:14 SQL ![oracle@oracle dbs]$ cp /disk1/lx02/oradata/control02.ctl /disk2/lx02/oradata/control03.ctl[oracle@oracle dbs]$ sqlplus /as sysdbaSQL*Plus: Release .0 - Production on Mon Aug 1 06:15:36 2011Copyright (c) 1982, 2005, Oracle.? All rights reserved.Connected to an idle instance.06:15:37 SQL startupORACLE instance started.Total System Global Area? 176160768 bytesFixed Size????????????????? 1218364 bytesVariable Size?????????????bytesDatabase Buffers??????????bytesRedo Buffers??????????????? 2973696 bytesDatabase mounted.Database opened.06:15:47 SQL select name from v$controlfile;NAME-----------------------------------------------/u01/app/oracle/oradata/lx02/control01.ctl/disk1/lx02/oradata/control02.ctl/disk2/lx02/oradata/control03.ctl
二: 损坏全部控制文件
异常关闭数据库
shutdown abort 控制文件全部丢失 需要重建控制文件和recover
模拟场景------
丢失所有 HYPERLINK /xueyuanzhuanqu/jishuwenzhang/201210/jishuwenzhang-1377.html 控制文件,并且异常关闭数据库,场景模拟如下:00:43:07 SQL insert into scott.test values (10);1 row created.00:43:22 SQL insert into
显示全部