Oracle Flash back to those things

Source: Internet
Author: User

Turn on the flash back database

ALTER DATABASE flashback on;

ALTER DATABASE open;

Modify Date Time display format:

Alter session set nls_date_format= ' Yyyy-mm-dd hh24:mi:ss ';

View the Flashback database log information in the system view V$flashback_database_log:

SELECT * from V$flashback_database_log;

Flash back to the database:

Flashback database to timestamp (to_date (' 2014-10-11 12:20:11 ', ' yyyy-mm-dd hh24:mi:ss '));

Resetlogs or noresetlogs is required to open after flashback recovery:

ALTER DATABASE open resetlogs/noresetlogs;

Flash Back table:

Flashback table TableName to timestamp (to_date (' 2014-11-10 12:12:12 ', ' yyyy-mm-dd hh24:mi:ss ');

Flash back to Recycle Bin:

Flashback table TableName to before drop;

The following commands can be used to delete data from the Recycle Bin:;

Purge table tablename;

Empty the Recycle Bin:

Purge Dba_recyclebin;

Flash back query:

SELECT * FROM TableName as of timestamp to timestamp (to_date (' 2014-11-12 10:10:10 ', ' yyyy-mm-dd hh24:mi:ss ')) where ...;

Flash back version query:

Select Versions_starttime,version_operation,name,score from tablename versions between timestamp minvalue and MaxValue;

Flashback transaction Query:

Select Table_name,undo_sql from Flashback_tracsaction_query where rownum<5;


This article is from the "accumulation of growth" blog, please be sure to keep this source http://5200644.blog.51cto.com/5190644/1575173

Oracle Flash back to those things

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.