Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

INSERT prints ORA-38301: can not perform DDL/DML over objects in Recycle Bin

David BalažicApr 4 2024

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

I get this error on INSERT:

insert into MY_TABLE1 (Column1, Column2,
            *
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

What I did was:

  1. delete all tables , sequences and materialized views from the scheme
  2. recreate them (and some stored procedures)
  3. INSERT some test data

If I do a PURGE RECYCLEBIN first (before step 1), then the error does not appear.

This seems weird. Why does INSERT into a newly created table cause a Recycle Bin related error?

If after the error I immediately repeat the same INSERT statement, I get a different error:
ORA-01658: unable to create INITIAL extent for segment in tablespace USERS

Following repetitions of the same command always return the ORA-01658, until I disconnect (I use “SQL*Plus: Release 11.2.0.4.0 Production”) and reconnect. Then I get once the ORA-38301 and then again ORA-01658 repeatedly.

The mentioned 3 steps are done by a script I run. Sometimes I can run it several time in a row without the mentioned error. Then it gives the error. Running the script after the error happened once will always return the error. Until the Recycle Bin is purged, then it will run several times without error.

The second error suggests it is a free space issue, but running this script:

select a.TABLESPACE_NAME,b.TABLESPACE_NAME, a.file_id,b.file_name,b.autoextensible,b.bytes/1024/1024,sum(a.bytes)/1024/1024
from dba_extents a , dba_data_files b
where a.file_id=b.file_id
group by a.TABLESPACE_NAME,b.TABLESPACE_NAME,a.file_id,b.file_name,autoextensible,b.bytes/1024/1024
;

I get the values 600 and 482 for the USERS tablespace.

I understand there is over 100 MB free space (and the test data in the script is barely 1 MB, there are like 100 inserts of simple data).

Any idea where to look?

Comments
Post Details
Added on Apr 4 2024
9 comments
1,159 views