Monday, April 1, 2019

Enabling Flashback Database and checking the status

Enabling Flashback Database and checking the status
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Flashback status of a database can be checked from the below query and system parameters.


Enabling Flashback Database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. you can either revert the entire database to a prior point in time by restoring a backup and doing point-in-time recovery,
2. or you can enable Flashback Database.

When you enable Flashback Database, the database generates flashback logs in the fast recovery area.
These logs are used to flash back the database to a specified time.
During usual operation, the database occasionally logs images of data blocks to the flashback logs.
The database automatically creates, deletes, and resizes flashback logs.


command to check if Flashback Database is enabled for your target database:


To enable Flashback Database:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ensure that you configure a fast recovery area and that the database is running in ARCHIVELOG mode.


Connect Oracle Recovery Manager (RMAN) to the target database

Optionally, specify the length of the desired flashback window (in minutes) by setting the DB_FLASHBACK_RETENTION_TARGET initialization parameter.
The default value for this parameter is 1440 minutes, which is one day.
The following command specifies that the flashback window must be 3 days.




Enable the Flashback Database feature for the whole database using the following command:



You can also execute the commands in this section by connecting to the target database using SQL*Plus instead of RMAN.




No comments:

Post a Comment