Prev | Current Page 743 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


Two initialization parameter settings control how much flashback data is retained in the
database. The DB_FLASHBACK_RETENTION_TARGET initialization parameter sets the upper
limit (in minutes) for how far back in time the database can be flashed back. The DB_RECOVERY_
FILE_DEST initialization parameter sets the size of the Flash Recovery Area (see Chapter 12 for
more information on setting up the Flash Recovery Area). Note that the flashback table command
uses data already stored in the undo tablespace (it does not create additional entries), whereas the
flashback database command relies on flashback logs stored in the Flash Recovery Area.
Chapter 14: Miscellaneous High Availability Features 499
You can determine how far back you can flash back the database by querying the
V$FLASHBACK_DATABASE_LOG view. The amount of flashback data retained in the database is
controlled by the initialization parameter and the size of the Flash Recovery Area. The following
listing shows the available columns in V$FLASHBACK_DATABASE_LOG and sample contents:
SQL> describe V$FLASHBACK_DATABASE_LOG
Name Null? Type
----------------------------------------- -------- -------
OLDEST_FLASHBACK_SCN NUMBER
OLDEST_FLASHBACK_TIME DATE
RETENTION_TARGET NUMBER
FLASHBACK_SIZE NUMBER
ESTIMATED_FLASHBACK_SIZE NUMBER
SQL> select * from V$FLASHBACK_DATABASE_LOG;
OLDEST_FLASHBACK_SCN OLDEST_FL RETENTION_TARGET FLASHBACK_SIZE
-------------------- --------- ---------------- --------------
ESTIMATED_FLASHBACK_SIZE
------------------------
5903482 27-SEP-07 1440 8192000
0
You can verify the database??™s flashback status by querying V$DATABASE; the FLASHBACK_
ON column will have a value of ???YES??™ if the flashback has been enabled for the database:
select current_scn, flashback_on from V$DATABASE;
CURRENT_SCN FLA
----------- ---
5910734 YES
With the database open for over an hour, verify that the flashback data is available and then
flash it back??”you will lose all transactions that occurred during that time:
shutdown;
startup mount exclusive;
flashback database to timestamp sysdate-1/24;
Note that the flashback database command requires that the database be mounted in exclusive
mode, which will affect its participation in any RAC clusters (see Chapter 10).


Pages:
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755
miedzyzdroje wczasy personal cash loans for people with bad credit zarządzanie sprzedażą naprawa komputerów Warszawa Prawo filmowe