4

I am new to Oracle and for practice I have created some tables (customer, drivers, payment, booking, location, area, job, job_history) in Oracle 11g and upon select * from cat statement I have found a strange table with other created tables named "BIN$c+eOnMB3RbKSEfg/rsxtAQ==$0".I don't know why this table is created.

I tried to remove this table through

drop table BIN$c+eOnMB3RbKSEfg/rsxtAQ==$0;

but it gives error:

drop table BIN$c+*eOnMB3RbKSEfg/rsxtAQ==$0

ERROR at line 1: ORA-00933: SQL command not properly ended

what should I do to remove it?

d219
  • 2,707
  • 5
  • 31
  • 36
  • @Marmite_Bomber's answer is correct. I'd suggest, though, that you not use the `cat` data dictionary table-- that's an object that exists solely for reasons of backwards compatibility and isn't enhanced as new features are added. If you used the modern `user_tables`, `all_tables`, `dba_tables` views, objects in the recycle bin would automatically be filtered out. See https://stackoverflow.com/questions/205736/get-list-of-all-tables-in-oracle/205746#205746 for more details – Justin Cave Jun 18 '19 at 02:44

1 Answers1

9

What you see is a deleted table in the RECYCLEBIN

You may get the original name of the table with this query

SELECT original_name FROM RECYCLEBIN where OBJECT_NAME = 'BIN$c+eOnMB3RbKSEfg/rsxtAQ==$0';

Note that (with your parameter setting) if you DROP a table it is not completely removed, but moved in the recyclebin.

You may ommit this using the PURGE option.

DROP TABLE xxx PURGE;

To remove the table from the recyclebin you must qoute the name with double quotes (as this is not a valid name) and use the PURGE statement (not a DROP - which would trigger ORA-38301: can not perform DDL/DML over objects in Recycle Bin).

PURGE TABLE "BIN$c+eOnMB3RbKSEfg/rsxtAQ==$0"

Alternatively you may use the original_name obtained with the query above:

PURGE TABLE {your_original_name};

To clean up the recyclebin completely use this statement (with the propper table user)

PURGE RECYCLEBIN;
Marmite Bomber
  • 19,886
  • 4
  • 26
  • 53