【翻译自mos文章】在alter/drop表空间时遇到错误ORA-38301,ORA-00604,purge dba_recyclebin 也不行

在alter/drop表空间时遇到错误ORA-38301,ORA-00604,purge dba_recyclebin 也不行

适用于:

Oracle Database - Enterprise Edition - Version 10.2.0.1 and later

Information in this document applies to any platform.

症状:

当你试图drop一个empty的tablespace时,遇到与recyclebin相关的错误

SQL> drop tablespace TEST_TBS including contents and datafiles;
 drop tablespace TEST_TBS including contents and datafiles
 *
 ERROR at line 1:
 ORA-00604: error occurred at recursive SQL level 1
 ORA-38301: can not perform DDL/DML over objects in Recycle Bin

尝试purge dba_recyclebin 并 offline该tablespace也不行:

SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SQL> alter tablespace TEST_TBS offline;

Tablespace altered.

SQL> drop tablespace TEST_TBS including contents and datafiles;
 drop tablespace TEST_TBS including contents and datafiles
 *
 ERROR at line 1:
 ORA-00604: error occurred at recursive SQL level 1
 ORA-38301: can not perform DDL/DML over objects in Recycle Bin

原因:

查询 dba_segments显示该表空间内还有segments

SQL> select SEGMENT_NAME,SEGMENT_TYPE,owner from dba_segments where tablespace_name='TEST_TBS';

 SEGMENT_NAME                   SEGMENT_TYPE       OWNER
 ------------------------------ ------------------ ------------------------------
 BIN$Pks1AnxmMCTgQ8+Ct10wJA==$0 TABLE              ORACLE
 BIN$Pks790fcQEzgQ8+Ct11ATA==$0 TABLE              ORACLE

解决方案:

用该schema的owner登陆sqlplus,然后执行purge recyclebin,然后再删除drop tablespace

SQL> purge recyclebin;

SQL> drop tablespace TEST_TBS including contents and datafiles;

若是这么还是不解决问题,最快速的变通方法就是disable掉recyclebin,再drop tablespace,再enable recyclbin

SQL> conn / as sysdba

SQL> alter system set recyclebin=off;

SQL> drop tablespace TEST_TBS including contents and datafiles;

SQL> alter system set recyclebin=on;

---提醒:11gR2里边,recyclebin貌似是静态参数。

若是上面的步骤不能解决问题,请用下面的方法:

1) sqlplus / as sysdba
2) ALTER SYSTEM SET recyclebin = OFF DEFERRED;
3) disconnect and exit sqlplus
4) sqlplus / as sysdba
5) drop tablespace........
6) sqlplus / as sysdba
7) ALTER SYSTEM SET recyclebin = ON DEFERRED; or ALTER SYSTEM SET recyclebin = ON;
时间: 2024-10-13 00:20:21

【翻译自mos文章】在alter/drop表空间时遇到错误ORA-38301,ORA-00604,purge dba_recyclebin 也不行的相关文章

【翻译自mos文章】OGG add Supplemental Logging 时失败,报错为 块损坏(Block Corruption)

OGG add Supplemental Logging 时失败,报错为 块损坏(Block Corruption) 来源于: Add Supplemental Logging Fails Due To Block Corruption (文档 ID 1468322.1) 适用于: Oracle Server - Enterprise Edition - Version 10.2.0.5 to 12cBETA1 [Release 10.2 to 12.1] Information in this

【翻译自mos文章】DR$SS_IDX表无法被导出

DR$SS_IDX表无法被导出 来源于: DR$SS_IDX Tables Can't Be Exported (文档 ID 1324656.1) 译者注:在英文原文中,一直都是说的DR#SS_IDX,而在实验中,是DR$,因此,翻译后的中文中,就使用DR$ 适用于: Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later   [Release: 11.2 and later ] Information in this d

【 翻译自mos文章】Alter Database Add Supplemental Log Data 命令挂起

Alter Database Add Supplemental Log Data 命令挂起 来源于: Alter Database Add Supplemental Log Data Hangs (文档 ID 406498.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. 症状: 作为流复制配

【翻译自mos文章】回收 asm磁盘空间的方法

回收 asm磁盘空间的方法 參考原文: How To Reclaim Asm Disk Space? (Doc ID 351866.1) 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. ***Checked for relevance on 12-Jan-2010*** 目标: 你有一套2节点的r

【翻译自mos文章】当relink Oracle 软件时,用的是哪个linker 和 compiler?

当relink Oracle 软件时,用的是哪个linker 和 compiler? 参考自: REQUIRED LINKER AND COMPILER LOCATIONS (文档 ID 1012798.6) Problem Description: ==================== Which linker and compiler should I use to relink Oracle executables?  Where are they located? Search Wo

【翻译自mos文章】SYS_OP_C2C 导致的全表扫描(fts)/全索引扫描

SYS_OP_C2C 导致的全表扫描(fts)/全索引扫描 参考原文: SYS_OP_C2C Causing Full Table/Index Scans (Doc ID 732666.1) 适用于: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 12.1.0.1 [Release 10.1 to 12.1] Information in this document applies to any platform. This

【翻译自mos文章】在不使用par file的情况下,export or import 含有大小写表名的表

在不使用par file的情况下,export or import 含有大小写表名的表 参考原文: How to Export or Import Case Sensitive Tables Without Using a Par File (Doc ID 1622134.1)1 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2] Information i

【翻译自mos文章】oracle数据库的最大数据容量限制和表空间的最大数据容量限制

oracle数据库的最大数据容量限制和表空间的最大数据容量限制 参考原文: What Is The Maximum Tablespace Size And Database Limit For An Oracle Database ? (Doc ID 1372905.1) 适用于: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11.2] Oracle Database -

【翻译自mos文章】使用索引快速全扫(index ffs) 来避免全表扫描

使用索引快速全扫(index ffs) 来避免全表扫描 参考原文: Index Fast Full Scan Usage To Avoid Full Table Scans (Doc ID 70135.1) 适用于: Oracle Database - Enterprise Edition - Version 7.3.0.0 to 11.2.0.3 [Release 7.3.0 to 11.2] Information in this document applies to any platfo