7 x 24 在线支持!
解决ORACLE删除表空间时报ORA-1157错误
如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!
诗檀软件专业数据库修复团队
服务热线 : 13764045638 QQ号:47079569 邮箱:[email protected]
适用于
Oracle数据库 – 企业版 - 11.2.0.3版本及更高版本
	本文档的内容适用于所有平台。
症状
	查看alert.log文件,看到如下报错:
	Errors in file /u01/app/oracle/diag/rdbms/ps2jfmsm/ps2jfmsm1/trace/ps2jfmsm1_m000_27934.trc:
	ORA-01157: cannot identify/lock data file 76 - see DBWR trace file
	ORA-01110: data file 76: '/u01/app/oracle/product/11.2.0.3/db_1/dbs/glacloseindexdata'
变化
数据文件在操作系统上被移动了。
原因
是因为这个文件找不到了。
	检查/u01/app/oracle/product/11.2.0.3/db_1/dbs路径下,显示那个文件并不在这里。
	 
解决
首先检查这个文件是不是这个表空间里唯一的数据文件:
	SQL> select ts# from v$datafile where file# = 76;
	  TS#
	----------
	  33    
	SQL> select file# from v$datafile where ts# = 33;
	  FILE#
	----------
	  76
	So only datafile 76 exists in tablespace 33
	SQL> select name from v$tablespace where ts# = 33;
	NAME
	------------------------------
	GLACLOSEINDEX
	尝试删除这个表空间:
	SQL> drop tablespace glacloseindex;
	drop tablespace glacloseindex
	*
	ERROR at line 1:
	ORA-01157: cannot identify/lock data file 76 - see DBWR trace file
	ORA-01110: data file 76:
	'/u01/app/oracle/product/11.2.0.3/db_1/dbs/glacloseindexdata'
	SQL> select * from v$recover_file;
	no rows selected
	So the datafile must still be online.
	SQL> alter database datafile 76 offline drop;
	Database altered.
	SQL>
	SQL>
	SQL> drop tablespace glacloseindex;
	Tablespace dropped.

 沪公网安备 31010802001377号
沪公网安备 31010802001377号