在Oracle数据库中,单个删除的分区并不会进入回收站,全表删除的分区才可能和全表一起放入回收站。这是因为单个分区删除之后,是无法通过简单的闪回加入原分区表中,既然无法保证一致性,这个分区就不会进入回收站中。
SQL> select * from v$version;
BANNER CON_ID
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
PL/SQL Release 12.2.0.1.0 - Production 0
CORE 12.2.0.1.0 Production 0
TNS for Linux: Version 12.2.0.1.0 - Production 0
NLSRTL Version 12.2.0.1.0 - Production 0
SQL> CREATE TABLE cattest (
2 PartID integer not null,
3 CretTm date not null,
4 PartCD varchar2(2) not null
5 ) partition by list (partcd) automatic (
6 partition p18 values ('fz'),
7 partition p19 values ('xm'),
8 partition p20 values ('sm'),
9 partition p21 values ('gz')
10 );
Table created.
SQL> insert into enmotech values (1, sysdate, 'fz');
1 row created.
SQL> select partition_name from user_tab_partitions
2 where table_name = 'cattest';
PARTITION_NAME
P18
P19
P20
P21
SYS_P256
SQL> alter table enmotech drop partition SYS_P256 purge;
alter table enmotech drop partition SYS_P256 purge
*
ERROR at line 1:
ORA-14048: a partition maintenance operation may not be combined with other operations
SQL> alter table cattest drop partition P18;
Table altered.
SQL> select * from user_recyclebin;
no rows selected
SQL> drop table cattest;
Table dropped.
SQL> select object_name,original_name,type from user_recyclebin;
OBJECT_NAME ORIGINAL_NAME TYPE
BIN$TflQLiTmWX7gUwo4qMBX+A==$0 cattest TABLE
BIN$TflQLiTmWX7gUwo4qMBX+A==$0 cattest Table Partition
BIN$TflQLiTmWX7gUwo4qMBX+A==$0 cattest Table Partition
BIN$TflQLiTmWX7gUwo4qMBX+A==$0 cattest Table Partition
BIN$TflQLiTmWX7gUwo4qMBX+A==$0 cattest Table Partition