故障背景
1 非归档模式。
2 删除用户表空间数据文件。
3 不存在备份。
在表空间级别删除数据文件报错。
SQL> alter tablespace nrmstj drop datafile '/data/orcl1.dbf';
alter tablespace nrmstj drop datafile '/data/orcl1.dbf'
*
ERROR at line 1:
ORA-03264: cannot drop offline datafile of locally managed tablespace
解决方案
1 对于非归档模式 只能使用 offline drop离线被删除的数据文件,数据库其他能够正常使用,
只是数据文件段内对应的数据无法被dml或者ddl
alter database datafile 66 offline drop;
2 找出对应的数据库段进行表空间迁移,幸亏是OGG目标库,可以从主库进行数据迁移,如果是正式库 ,则整个数据文件的数据丢失。
select distinct segment_name,segment_type from dba_extents where file_id=66 and segment_type='TABLE'。
NR.TT3 找到ogg复制进程对应的进程,排除表的复制。
4 删除掉表。
OCI Error ORA-00376: file 66 cannot be read at this time