Oracle Recycle Bin

Source: Internet
Author: User


Turn on Recycle Bin Recyclebin=on, open by default

ALTER SYSTEM SET Recyclebin=off scope=spfile;


One, restore the table from the Recycle Bin

Restores deleted tables and subordinate objects.

If multiple Recycle Bin entries have the same original name:

Use a system-generated unique name to restore a specific version

A restored table follows a last-in, first-out (LIFO) rule when using the original name

Renames the original name (if the name is currently in use).

DROP TABLE Employees;

FLASHBACK TABLE <table_name> to before DROP [RENAME to <new_name>];

Related Data dictionary: dba_recyclebin


Second, manually empty the recovery space

Description: Execute Dba_recyclebin This requires as SYSDBA permissions

PURGE {TABLE <table_name> | INDEX <index_name>}

PURGE tablespace <ts_name> [USER <user_name>]

PURGE [user_| Dba_]recyclebin

Manually delete a table, and if there are multiple tables with the same name, delete the oldest one


Third, do not use the Recycle Bin

DROP TABLE <table_name> [PURGE];

DROP tablespace <ts_name>

[including CONTENTS];

DROP USER <user_name> [CASCADE];


Iv. Viewing the Recycle Bin

1. Data dictionary

SELECT *

From Dba_recyclebin

WHERE can_undrop = ' YES ';

2. sql> SHOW RecycleBin

Oracle Recycle Bin

Related Article

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.