Invalid segment Bin$xxx and Dba_recyclebin was empty (Recycle Bin empty, freeing invalid bin$xx space)

Source: Internet
Author: User

Recently there is a set of space tension, found that there is a large bin$ opening table Partition,index partition type of segment, query confirmation is 2 months ago deleted objects, manually emptied Dba_recyclebin use purge, but all the past few days, Later Dba_recyclebin has been empty, found that the object bin$xx still exist, ORACLE in the processing of large partitioned tables in the case of opening recyclebin Sometimes this anomaly occurs, the following record this case.

Sql> select * from V$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
PL/SQL Release 11.2.0.3.0-production
CORE 11.2.0.3.0 Production
TNS for Hpux:version 11.2.0.3.0-production
Nlsrtl Version 11.2.0.3.0-production

Sql> Select Bytes,segment_type,owner,tablespace_name,segment_name from dba_segments where segment_name like ' BIN$% '

BYTES segment_type OWNER tablespace_name segment_name
-------------------- ------------------ --------------- ------------------------------ ---------------------------- --
5,006,950,400 INDEX PARTITION CDR cdr_inx7 bin$du34gvecb4zgvaafkq3k2w==$0
13,659,799,552 INDEX PARTITION CDR CDR3 bin$du34gvecb4zgvaafkq3k2w==$0
1,048,576 INDEX PARTITION CDR CDR3 bin$du34gvecb4zgvaafkq3k2w==$0
80,321,970,176 TABLE PARTITION CDR cdr_inx5 bin$du34gvedb4zgvaafkq3k2w==$0
84,739,620,864 TABLE PARTITION CDR CDR4 bin$du34gvedb4zgvaafkq3k2w==$0
80,260,104,192 TABLE PARTITION CDR cdr_t1 bin$du34gvedb4zgvaafkq3k2w==$0
80,747,692,032 TABLE PARTITION CDR cdr_inx8 bin$du34gvedb4zgvaafkq3k2w==$0
...

Select object_id from dba_objects where object_name like ' bin% ';
--omitted

Sql> @oid 578398

Owner object_name object_type subobject_name CREATED last_ddl_time status data_object_id
------------------------- ------------------------------ ------------------ ------------------------------ -------- --------- ----------------- --------- --------------
CDR bin$du34gvedb4zgvaafkq3k2w==$0 TABLE PARTITION gprs312_max 20140722 22:27:02 20140828 17:14:30 VALID 592609

Sql> SELECT * from Dba_tables where table_name= ' bin$du34gvedb4zgvaafkq3k2w==$0 ';

No rows selected

Sql> SELECT * FROM dba_tables where table_name like ' bin% ';

No rows selected
Sql> Select 1 from Cdr. "Bin$du34gvedb4zgvaafkq3k2w==$0" Partition (gprs312_01) where rownum<2;

1
----------
1

Sql> select * from Dba_recyclebin;

No rows selected

Sql> Select COUNT (*) from dba_tab_partitions where table_name= ' bin$du34gvedb4zgvaafkq3k2w==$0 ';

COUNT (*)
----------
31

TIP:
When the partition table is open in RecycleBin:
Drop N partition, Partitioon will be deleted directly without going into recyclebin
drop table, table information disappears from Dba_tables, Dba_tab_partition is renamed to bin$ object, other triger,index are the same, but the bin of table is recorded in Dba_recyclebin and the name of the original table and some information when it is deleted, and you can use the table name that starts with bin$ to query the table records.

Try to remove the

Sql> Purge index CDR. "Bin$du34gvecb4zgvaafkq3k2w==$0";
Purge index CDR. "Bin$du34gvecb4zgvaafkq3k2w==$0"
*
ERROR at line 1:
Ora-38307:object not in RECYCLE BIN

sql> drop table Cdr. "Bin$du34gvedb4zgvaafkq3k2w==$0";
drop table Cdr. "Bin$du34gvedb4zgvaafkq3k2w==$0"
*
ERROR at line 1:
Ora-38301:can not perform ddl/dml to objects in Recycle Bin
Workaround:

sql> ALTER SESSION SET Recyclebin=off;
Session altered.

sql> drop table Cdr. "Bin$du34gvedb4zgvaafkq3k2w==$0";
Table dropped.
If the session-level shutdown RecycleBin is not possible, you can try to delete the instance level after it is closed or restarted, and this cleanup frees up 2T of space.

o Best practices for deleting large partitioned tables:
Demantra Large Table partitions and Using the Flashback Recycle bin, RecycleBin, Dba_recyclebin and Sys. recyclebin$ Purge Best Practice (document ID 1962730.1)

Invalid segment Bin$xxx and Dba_recyclebin was empty (Recycle Bin empty, freeing invalid bin$xx space)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.