Oracle Data Sheet mistakenly deleted recovery Flashback

Source: Internet
Author: User

1. Pre-conditions. The RecycleBin parameter opens.

Verify that the parameters are open:

SHOW PARAMETER RecycleBin

2. If the parameter is not open, you need to open it, and restart the database method to

set recyclebin=on scope=spfile;

3. Log in to the database

 as sysdba# shut down database shutdown immediate# Open database startup

4. Create a table test

Create table ZHAOBSH (Test varchar), insert into table ZHAOBSH values ("zhaobsh" c4> "); Select  from zhaobshdrop Table Zhaobsh

5. Roll back the table

Flashback TABLE Zhaobsh to before DROP;

Technical content is relatively low but useful if recyclebin is turned on and the drop table is in a relatively short time.

6. Methods for rolling back to a time node

Guarantee table can be movement

Command

ALTER TABLE zhaobsh ENABLE ROW movement;

Roll back the table to five minutes ago

' 5 '

Rollback to the syntax of a precise time node

FLASHBACK TABLE Zhaobsh to TIMESTAMP to_timestamp ('2018-06-20 10:04:01 PM','  Yyyy-mm-dd HH:MI:SS AM')

Note that the time here is that the database time is not the client's time needs to be strictly matched or the result is incorrect.

Oracle Data Sheet mistakenly deleted recovery Flashback

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.