Aiman Aamir
Aiman Aamir

Reputation: 51

How to remove a strange table named "BIN$c+eOnMB3RbKSEfg/rsxtAQ==$0" from oracle database?

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?

Upvotes: 5

Views: 3339

Answers (2)

user24027670
user24027670

Reputation: 1

purge table Scheman_name."BIN$%";

Where you should mention the exact full BIN$ table name.

Upvotes: 0

Marmite Bomber
Marmite Bomber

Reputation: 21063

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;

Upvotes: 10

Related Questions