oracle数据文件误删除,oracle数据文件被误删除后的灾难处理方法

oracle数据文件被误删除后的灾难处理方法- -

Tag:

oracle

datafile

数据文件

误删除

灾难                                           环境:Red Hat Linux 7.2 SMP 数据库:Oracle 8.1.7 起因,一同事建立了一个表空间并建立一张表后发现表空间未用到直接删除了那个数据文件.其操作如下: create tablespace r_csh_20051001 datafile '/webdata/dbdata/ry/csh20051001.dat' size 50M autoextend on next 500M default storage (initial 10m NEXT 10m MINEXTENTS 1 PCTINCREASE 0); create table r_csh(       UsedDate   char(26)  default '',       CardNumber char(26) default '',       UserNumber char(16) default '',       Credit     number(5) default 0,       UserArea   number(6) default 0,       CardArea   number(6) default 0,       ValiDdate  char(26)  default '' ); rm /webdata/dbdata/ry/csh20051001.dat 经过这一操作后,数据库出现连接失败,发现数据库已经停止了. 查看oracle的log显示: Errors in file /oracle/admin/webdb/bdump/ckpt_31638.trc: ORA-01110: data file 63: '/webdata/dbdata/ry/csh20051001.dat' ORA-01115: IO error reading block from file 63 (block # 1) ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode ORA-01116: error in opening database file 63 ORA-01110: data file 63: '/webdata/dbdata/ry/csh20051001.dat' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 Fri Oct 21 15:31:47 2005 CKPT: terminating instance due to error 1242 Instance terminated by CKPT, pid = 31638 Fri Oct 21 15:55:09 2005 想要把oracle重新启动,发现也启动不了: SQL> shutdown immediate; SQL> startup; ORACLE instance started. Total System Global Area   40104096 bytes Fixed Size                    73888 bytes Variable Size              23080960 bytes Database Buffers           16777216 bytes Redo Buffers                 172032 bytes Database mounted. ORA-01122: database file 63 failed verification check ORA-01110: data file 63: '/webdata/dbdata/ry/csh20051001.dat' ORA-01251: Unknown File Header Version read for file number 63 分析问题: 因为数据文件在没有被offline的情况下实物理删除了,导致oracle的数据不一致,因此启动失败. 解决方法: lsnrctl stop sqlplus internal SQL> shutdown abort SQL> startup mount SQL> alter database datafile '/webdata/dbdata/ry/csh20051001.dat' offline drop; SQL> alter database open; SQL> drop tablespace r_csh_20051001; lsnrctl start 其中省略了屏幕输出内容. 小结:oracle数据文件(datafile)被误删除后没有恢复的办法,只能把该数据文件offline后drop掉 这是我们的实际操作记载!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值