Flashback_database

Page 1

4/3/12

Configuring flashback database.htm

Configuring flashback database In order to configure the Flashback Database feature, you need to step through a series of operations, as follows: 1. Check whether the database in archive mode by querying v$database as: SQL> select log_mode from v$database; LOG_MODE -----------ARCHIVELOG

Or simply issue the command SQL> archive log list; Database log mode

Archive Mode

Automatic archival

Enabled

Archive destination

USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence

23

Next log sequence to archive 25 Current log sequence

25

Incase the database is in noarchive mode follow following steps as SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP MOUNT; SQL> ALTER DATABASE ARCHIVELOG; SQL> STARTUP OPEN

2. Set up a flash recovery area as: You use two initialization parameters to configure a flash recovery area: • DB_RECOVERY_FILE_DEST_SIZE: This parameter sets the maximum size of the flash recovery area. • DB_RECOVERY_FILE_DEST: This parameter points to the location on disk of the flash recovery area. You must locate the flash recovery area on a disk separate from the database area, where you file:///C:/Users/Rafi/Desktop/Configuring flashback database.htm

1/3


4/3/12

Configuring flashback database.htm

store the active database files such as data files, control files, and online redo logs. Here’s how you would specify the two flash recovery area initialization parameters in your init.ora file: DB_RECOVERY_FILE_DEST_SIZE = 10G DB_RECOVERY_FILE_DEST = '/oracle/u01/app/oracle/flash_recovery_area’ Or use SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 2G; System altered. SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = '/oracle/u01/app/oracle/flash_recovery_area’; System altered.

3. Set the DB_FLASHBACK_RETENTION_TARGET initialization parameter to specify how far back you can flashback your database.Here one day(1440) SQL> ALTER SYSTEM SET 2 DB_FLASHBACK_RETENTION_TARGET=1440; System altered. SQL>

4. Shut down and restart the database in the mount exclusive mode. If you are using a single

instance, a simple MOUNT command can be used: SQL> SHUTDOWN IMMEDIATE; Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP MOUNT;

5. Enable the Flashback Database feature: SQL> ALTER DATABASE FLASHBACK ON; Database altered. SQL> file:///C:/Users/Rafi/Desktop/Configuring flashback database.htm

2/3


4/3/12

Configuring flashback database.htm

6. Use the ALTER DATABASE OPEN command to open the database and then confirm that the Flashback Database feature is enabled, by querying the V$DATABASE view: SQL> STARTUP OPEN; SQL> SELECT FLASHBACK_ON FROM V$DATABASE; FLA --------YES SQL> ______________________________________________________________________________

file:///C:/Users/Rafi/Desktop/Configuring flashback database.htm

3/3


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.