欢迎来到天天文库
浏览记录
ID:34725114
大小:59.97 KB
页数:10页
时间:2019-03-10
《oracle案例:损坏control文件的恢复方法》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Oracle案例:损坏控制文件的恢复方法一:损坏单个控制文件1、单个文件丢失场景模拟:[oracle@oracledbs]$rm/disk2/lx02/oradata/control03.ctl[oracle@oracledbs]$sqlplus'/assysdba'SQL*Plus:Release10.2.0.1.0-ProductiononMonAug106:14:542011Copyright(c)1982,2005,Oracle. Allrightsreserved.Connectedtoanidleinstance.06:14:54SQL>startupORACLEinstances
2、tarted.TotalSystemGlobalArea 176160768bytesFixedSize 1218364bytesVariableSize 88082628bytesDatabaseBuffers 83886080bytesRedoBuffers 2973696bytesORA-00205:errorinidentifyingcontrolfile,checkalertlogformoreinfo通过告警日志获得信息:ALTERDATABASE MOUNTMonAug 106
3、:14:572011ORA-00202:controlfile:'/disk2/lx02/oradata/control03.ctl'ORA-27037:unabletoobtainfilestatusLinuxError:2:NosuchfileordirectoryAdditionalinformation:3恢复步骤:06:14:57SQL>shutdownORA-01507:databasenotmountedORACLEinstanceshutdown.06:15:14SQL>![oracle@oracledbs]$cp/disk1/lx02/oradata/control02.ct
4、l/disk2/lx02/oradata/control03.ctl[oracle@oracledbs]$sqlplus'/assysdba'SQL*Plus:Release10.2.0.1.0-ProductiononMonAug106:15:362011Copyright(c)1982,2005,Oracle. Allrightsreserved.Connectedtoanidleinstance.06:15:37SQL>startupORACLEinstancestarted.TotalSystemGlobalArea 176160768bytesFixedSize
5、 1218364bytesVariableSize 88082628bytesDatabaseBuffers 83886080bytesRedoBuffers 2973696bytesDatabasemounted.Databaseopened.06:15:47SQL>selectnamefromv$controlfile;NAME-----------------------------------------------/u01/app/oracle/oradata/lx02/control01.ctl/dis
6、k1/lx02/oradata/control02.ctl/disk2/lx02/oradata/control03.ctl二:损坏全部控制文件异常关闭数据库1.shutdownabort控制文件全部丢失需要重建控制文件和recover模拟场景------丢失所有控制文件,并且异常关闭数据库,场景模拟如下:00:43:07SQL>insertintoscott.testvalues(10);1rowcreated.00:43:22SQL>insertintoscott.testvalues(11);1rowcreated.00:43:25SQL>commit;Commitcomplete.00
7、:43:27SQL>altersystemswitchlogfile;Systemaltered.00:43:29SQL>/Systemaltered.00:43:31SQL>/Systemaltered.00:43:36SQL>shutdownabort;database异常关闭ORACLEinstanceshutdown.00:43:44SQL>![oracle@workdbs]$rm/dis
此文档下载收益归作者所有