Oracle 无法使用Alter Tablespace 命令从表空间中drop一个数据文件

如果自己搞不定可以找诗檀软件专业ORACLE数据库修复团队成员帮您恢复!

诗檀软件专业数据库修复团队

服务热线 : 13764045638 QQ号:47079569 邮箱:[email protected]

 

适用于:

Oracle Database – Enterprise Edition – 版本 10.2.0.1 到 11.2.0.1.0 [Release 10.2 到 11.2]
本文信息适用于任何平台。
症状

尝试从使用10.2及以上特性从一个表空间中drop数据文件:
alter tablespace … drop datafile … ;

fails. The errors reported may differ depending on the actual situation.

ORA-3262: the file is non-empty
ORA-3263: cannot drop the first file of tablespace <tablespacename>
ORA-3264: cannot drop offline datafile of locally managed tablespace

ORA-60 <self-deadlock>

 

有些错误是相当简单的。但有些错误不是,像ORA-60。由于最常见错误的解决方法是不言自明的,本文侧重于ORA-60的自死锁错误..

更改

数据文件在操作系统级别丢失,导致数据文件处于脱机状态。而数据文件包含一些临时段和extent就成为invalid或stray。这导致尝试从表空间中删除数据文件时显示ORA-60。

在数据文件名中该文件就会被列为MISSING,其原因参见:

Note 1050268.1: Explanation of MISSING keyword in datafile name

原因

要drop一个数据文件或临时文件,满足以下条件:

– 必须为空。
– 不可以是表空间中被创建的第一个文件。
在这种情况下,应drop表空间。
– 不可以在只读表空间中。
– 不可以是脱机的。

解决方案

丢失的数据文件使该表空间处于一个不确定的状态。表空间本身实际上仍然可用。但是,当位于丢失数据文件的对象被访问时,该语句将显示错误:

ORA-376: file 7 cannot be read at this time

该表表空间也需要被drop。10gR2从一个表空间中drop单个数据文件的关闭不能在这种情况下使用..

以下文档可用于恢复数据:
Note 216683.1: How to Recover Data from a Tablespace When One or Several Datafiles are Lost.
Note 286355.1: How to Recover OFFLINE Dropped Datafile in ARCHIVELOG MODE


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *