Oracleflashback -- returns oracle data and restores data to the specified timestamp

Source: Internet
Author: User

Oracleflashback -- returns oracle data and restores data to the specified timestamp

Microsoft Windows [version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C: \ Users \ ckz> sqlplus zzjd/zzjd@10.22.1.143/orcl as sysdba; SQL * Plus: Release 11.2.0.1.0 Production on Wednesday May 13 17:00:46 2015 Copyright (c) 1982,201 0, Oracle. all rights reserved. connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> shutdown immediate; the Database has been closed. The database has been detached. The ORACLE routine has been disabled. SQL> startup MOUNT; the ORACLE routine has been started. Total System Global Area 1071333376 bytesFixed Size 1375792 bytesVariable Size 713032144 bytesDatabase Buffers 352321536 bytesRedo Buffers 4603904 bytes database loaded. SQL> flashback database to scn 119272598; flash back complete. SQL> alter database open; alter database open * 1st Line Error: ORA-01589: to open the database, you must use RESETLOGS or NORESETLOGS option SQL> alter database open noresetlogs; alter database open noresetlogs * 1st row error: ORA-01610: recovery using the backup controlfile option must be completed SQL> alter database open resetlogs; database changed. SQL>

View the recoverable timestamp or SCN point and execute the following SQL statement:

select scn,to_char(time_dp,'yyyy-mm-dd hh24:mi:ss')from sys.smon_scn_time order by to_char(time_dp,'yyyy-mm-dd hh24:mi:ss') desc;

We do not recommend that you use this method to restore data.

Method 2:

Before restoring a data table, clear the data table to be restored to avoid data conflict during recovery.

delete t_viradsl2 

insert into t_viradsl2 select * from t_viradsl2 as of timestamp to_Date('2011-01-19 15:28:00', 'yyyy-mm-dd hh24:mi:ss') 


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.