Oracle recycle bin recyclebin

Source: Internet
Author: User
Oracle10g provides the recycle bin function similar to the operating system. When you drop a table, you only need to rename it and put the table and associated objects such as index and constraint in the recycle bin. If you find that the table is dropped incorrectly, you can use the flashback table name to restore the table in the recycle bin. This is the flashback drop function of Oracle10g. 1. Check whether show parameters recyclebin is enabled in the recycle bin. 2. How to enable/disable recyclebin by setting the initialization parameter recyclebin can control whether to enable the recycle bin function, which is enabled by default. SQL> alter system set recyclebin = off; the system has been changed. SQL> alter system set recyclebin = on; the system has been changed. SQL> alter session set recyclebin = off; the session has been changed. SQL> alter session set recyclebin = on; the session has been changed. 3 SQL> Create Table goods (ID number (8), good varchar2 (20); the table has been created. SQL> insert into goods values ('1', 'pens'); 1 row has been created. SQL> insert into goods values ('2', 'banas'); 1 row has been created. SQL> insert into goods values ('3', 'King'); 1 row has been created. SQL> commit; submitted completely. SQL> select * from goods; Id good ---------- ------------------ 1 pens 2 banas 3 kingsql> show parameters recyclebin; Name type value =----------- revoke recyclebin string onsql> drop table goods; the table has been deleted. SQL> show recyclebin; SQL> flashback table goods to before drop; tables that have been placed in the recycle bin cannot be deleted using the drop command (note the double quotation marks on the object name ): purge table name

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.