Oracle Flash Back Technology--flashback removal

Source: Internet
Author: User

1, check whether to start the flash back delete

SQL>  show Parameter recyclebin; NAME                                 TYPE        VALUE--------------------------------------------------------------------- --------recyclebin                           string       on

Start the Flash back

2. Test Flash back deleted table:

Create two identical tables, and then delete them and restore them.

Sql> Create TableEdu.test_flash (ID Number( A), namevarchar2( -)); Tablecreated SQL> Insert  intoEdu.test_flashValues(1,'1'); 1Row inserted SQL> Commit; CommitComplete SQL> Drop TableEdu.test_flash;Tabledropped SQL> Create TableEdu.test_flash (ID Number( A), namevarchar2( -)); Tablecreated SQL> Insert  intoEdu.test_flashValues(2,'2'); 1Row inserted SQL> Commit; CommitComplete SQL> Drop TableEdu.test_flash;TableDropped

View Recycle Bin

Sql> SelectOwner,original_name,object_name, Ts_name,droptime fromDba_recyclebinwhereOwner='EDU'; OWNER original_nameobject_namets_name Droptime------------------------------ -------------------------------- ------------------------------ ---------------- -------------- -------------------EDU Test_flash bin$mfwmgr6pc/Lguweaah94la==$0USERS .-Geneva- -: -: A: GenevaEDU Test_flash BIN$MFWMGR6QC/Lguweaah94la==$0USERS .-Geneva- -: -: A: to

Recovering a deleted table

SQL>tabletodrop; Done

View Recycle Bin again

Sql> SelectOwner,original_name,object_name, Ts_name,droptime fromDba_recyclebinwhereOwner='EDU'; OWNER original_nameobject_namets_name Droptime------------------------------ -------------------------------- ------------------------------ ----------------- ------------- -------------------EDU Test_flash bin$mfwmgr6pc/Lguweaah94la==$0USERS .-Geneva- -: -: A: Geneva

Found the flash back directly by name, flashback to the last deleted table

If you need to specify which table to flash back to can also be executed:

Table "bin$mfwmgr6pc/lguweaah94la= =$0todrop to Test_ flash_2;

Oracle Flash Back Technology-flashback removal

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.