5

I dropped a table but didn't purge it. How can I purge it, so I can release the tablespace that the table uses?

1

3 Answers 3

4
PURGE TABLE test;

or

PURGE RECYCLEBIN;

From docs:

The following statement removes the table test from the recycle bin. If more than one version of test resides in the recycle bin, Oracle Database removes the version that has been there the longest:

PURGE TABLE test;

To determine system-generated name of the table you want removed from your recycle bin, issue a SELECT statement on your recycle bin. Using that object name, you can remove the table by issuing a statement similar to the following statement. (The system-generated name will differ from the one shown in the example.)

PURGE TABLE RB$$33750$TABLE$0; 

Remove the Contents of Your Recycle Bin:

Example To remove the entire contents of your recycle bin, issue the following statement:

PURGE RECYCLEBIN;

http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9018.htm

3

The syntax is:

PURGE TABLE table_name;

For example,

SQL> CREATE TABLE t(a NUMBER);

Table created.

SQL> DROP TABLE t;

Table dropped.

Let's check the recyclebin content:

SQL> SHOW  RECYCLEBIN
ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------
T                BIN$aLV3XomoSPCRkJ8yZfos7w==$0 TABLE        2015-11-26:13:43:27

Let's PURGE the table from recyclebin:

SQL> PURGE TABLE t;

Table purged.

SQL> SHOW  RECYCLEBIN
SQL>

it is now purged from recyclebin.

1

The following statement can be used to purge the table from the recycle bin.

PURGE TABLE tablename;

for further reference check this Link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.