mount状态下解决ora-01157

mount状态下解决ora-01157

错误是由于数据文件丢失造成的。解决过程如下:


ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/edm01/TBAOCM01.DBF'


SQL> l 
  1* select STATUS,name from V$datafile
SQL> /

STATUS                NAME
--------------------- --------------------------------------------------
SYSTEM                /apps/oradata/tan30/system01.dbf
ONLINE                /apps/oradata/tan30/undotbs01.dbf
ONLINE                /apps/oradata/tan30/sysaux01.dbf
ONLINE                /apps/oradata/tan30/users01.dbf
ONLINE                /edm01/TBAOCM01.DBF
ONLINE                /apps/oradata/tan30/partion01.dbf
ONLINE                /apps/oradata/tan30/partion02.dbf
ONLINE                /apps/oradata/tan30/partion03.dbf
ONLINE                /apps/oradata/tan30/partion04.dbf
ONLINE                /apps/oradata/tan30/biglob01.dbf

10 rows selected.


QL> select name from V$tablespace;

NAME
--------------------------------------------------
SYSTEM
UNDOTBS1
SYSAUX
USERS
TEMP
TBSOCM
PARTION01
PARTION02
PARTION03
PARTION04
BIGLOB

11 rows selected.

SQL>
SQL> select name ,CHECKPOINT_CHANGE# from V$datafile;

NAME                                               CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/apps/oradata/tan30/system01.dbf                              9811429
/apps/oradata/tan30/undotbs01.dbf                             9811429
/apps/oradata/tan30/sysaux01.dbf                              9811429
/apps/oradata/tan30/users01.dbf                               9811429
/edm01/TBAOCM01.DBF                                           8044741
/apps/oradata/tan30/partion01.dbf                             9811429
/apps/oradata/tan30/partion02.dbf                             9811429
/apps/oradata/tan30/partion03.dbf                             9811429
/apps/oradata/tan30/partion04.dbf                             9811429
/apps/oradata/tan30/biglob01.dbf                              9811429

10 rows selected.

SQL>

继续检查发现这个文件物理上找不到。

解决办法:删除该表空间,如有需要再重建。


SQL> alter database datafile '/edm01/TBAOCM01.DBF'
  2   offline drop;

Database altered.

SQL> alter database open;

Database altered.

SQL>  drop tablespace TBSOCM including contents;

Tablespace dropped.

SQL>

如果有需要再进行重建该表空间,如果有相应的备份可以按常规恢复方法恢复
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值