Oracle 11gr1 flash back to flashback

Source: Internet
Author: User

Open Database flashback
1. Check whether flashback is enabled for a database. There are two simple methods:
(1) directly query the database
SQL> select name, log_mode, flashback_on from v $ database;

NAME LOG_MODE FLASHBACK_ON
---------------------------------------
ORA11G ARCHIVELOGNO--> Flashback is not enabled

(2) view background processes
Oracle @ BMP 1A: ~>Ps-ef | grep rvw | grep-v grep
Oracle 9288 1 0? 00:00:00 ora_rvwr_ora11g --> flashback has opened www.bkjia.com

2. If flashback is not enabled for the database, open flashback:
(1) determine the storage path of flashback
SQL> show parameter recovery

NAME TYPE VALUE
----------------------------------------------------------------------
Db_recovery_file_dest string
Db_recovery_file_dest_size big integer 0
Recovery_parallelism integer 0
Modify db_recovery_file_dest:
SQL> alter system set db_recovery_file_dest = '/home/oracle/flashback' scope = both;
Alter system set db_recovery_file_dest = '/home/oracle/flashback' scope = both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified the value is invalid
ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE
The error above is becauseBefore setting db_recovery_file_dest, you must set db_recovery_file_dest_size., So:
SQL> Alter system set db_recovery_file_dest_size = 20G scope = both;

System altered.

SQL> show parameter recovery

NAME TYPE VALUE
------------------------------------------------------------------------
Db_recovery_file_dest string
Db_recovery_file_dest_size big integer 20G
Recovery_parallelism integer 0
SQL>Alter system set db_recovery_file_dest = '/home/oracle/flashback' scope = both;

System altered.

SQL> show parameter recovery

NAME TYPE VALUE
------------------------------------------------------------------------
Db_recovery_file_dest string/home/oracle/flashback
Db_recovery_file_dest_size big integer 20G
Recovery_parallelism integer 0

(2) Open flashback
SQL> alter database flashback on;
Alter database flashback on
*
ERROR at line 1:
ORA-38759: Database must be mounted by only one instance and not open.
The error above is becauseThe flashback to open the database must be in the mount status., So:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 5344731136 bytes
Fixed Size 2169104 bytes
Variable Size 2130708208 bytes
Database Buffers 3204448256 bytes
Redo Buffers 7405568 bytes
Database mounted.
SQL>Alter database flashback on;

Database altered.

SQL> alter database open;

Database altered.

SQL> select name, log_mode, flashback_on from v $ database;

NAME LOG_MODE FLASHBACK_ON
---------------------------------------
ORA11G ARCHIVELOGYES

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.