Configuration and usage of flash back for Oracle 10 Gb Database

Source: Internet
Author: User

We have previously introduced: For a detailed introduction of the Oracle database flashback personality, this article willFlashback of Oracle 10 Gb DatabaseThe configuration and usage are summarized for your reference. You can directly apply the configuration without understanding it.

Run the following SQL statement:

 
 
  1. Sqlplus sys/passwd @ tns_name as sysdba
  2.  
  3. SQL> shutdown immediate; // closes the database
  4.  
  5. SQL> startup mount; // start the Database Control file to connect the instance to the database. There are also two unmount methods to start the database instance. open the control file to locate and open the data file and log file, and start the database.
  6.  
  7. SQL> alter database archivelog; // starts Archiving
  8.  
  9. SQL> alter datbase flashback on;
  10.  
  11. SQL> select flashback_on from v $ database; // view the startup result. If the flashback_on value is on, the startup is successful.
  12.  
  13. SQL> show parameter recyclebin; // if you want to use the flashback of a table, the recyclebin recycle bin must be enabled.

In this way, the flash back of the Oracle 10 Gb database is configured.

If you want to use the database to flash back, you need to execute the following code:

 
 
  1. Sqlplus sys/passwd @ tns_name as sysdba
  2.  
  3. SQL> shutdown immediate; // closes the database
  4.  
  5. SQL> startup mount; // start the Database Control file to connect the instance to the database. There are also two unmount methods to start the database instance. open the control file to locate and open the data file and log file, and start the database.
  6.  
  7. SQL> flashback database to timestamp to_timestamp ('2017-08-08 09-14-01 ', 'yyyy-mm-dd hh24: mi: ss'); // flash back to the database
  8.  
  9. SQL> alter database open resetlogs; // The resetlogs or noresetlogs must be added to the end of open or a ora-01589 error will be reported

To flash back the table, the Code is as follows:

 
 
  1. flashback table table_name  to timestamp to_timestamp('2011-08-08 09-14-01','yyyy-mm-dd hh24:mi:ss''); 

Flashback after the table is deleted:

 
 
  1. flashback table table_name to before drop; 

If a ora-38305 error occurs at this time. Run the following command first:

 
 
  1. alter table table_name enable row movement; 

Here is an introduction to the configuration and usage of flash back for Oracle 10g databases. If you want to learn more about Oracle databases, you can read the article: http://database.51cto.com/oracle/, and I believe you can bring it to you!

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.