- You executed the following query:
Considering that all the redo logs are available, what information can you derive from the output of the preceding query?
考虑到所有重做日志可用,什么样的信息来自于上图的查询结果?
A.The time when the last flashback operation in your database was performed
B.The time when the first flashback operation in your database was performed
C.The approximate time and the lowest system change number (SCN) to which you can flash back your
database 你可以返回你数据库大概最近的时间点和最早的SCN时间点
D.The system change number (SCN) and the time when the Flashback Database was enabled in the
database instance
Answer:C
----------
Flashback Database 相关的2个视图:
1. V$database
这个视图可以查看是否启用了Flashback database功能
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
2. V$flashback_database_log
Flashback Database 所能回退到的最早时间,取决与保留的Flashback Database Log 的多少, 该视图就可以查看许多有用的信息。
Oldest_flashback_scn / Oldest_flashback_time : 这两列用来记录可以恢复到最早的时点
Flashback_size: 记录了当前使用的Flash Recovery Area 空间的大小
Retention_target: 系统定义的策略
Estimated_flashback_size: 根据策略对需要的空间大小的估计值
SQL> select oldest_flashback_scn os, to_char(oldest_flashback_time,'yy-mm-dd hh2
4:mi:ss') ot, retention_target rt,flashback_size fs, estimated_flashback_size es
from v$flashback_database_log;
OS OT RT FS ES
---------- ----------------- ---------- ---------- ----------
946088 09-10-14 13:49:59 1440 16384000 350920704
3. V$flashback_database_stat
这个视图用来对Flashback log 空间情况进行更细粒度的记录和估计。 这个视图以小时为单位记录单位时间内数据库的活动量,Flashback_Data 代表Flashback log产生数量,DB_Date 代表数据改变数量,Redo_Date代表日志数量,通过这3个数量可以反映出数据的活动特点,更准确的预计Flash Recovery Area的空间需求
SQL> alter session set nls_date_format='hh24:mi:ss';
会话已更改。
SQL> select *from v$flashback_database_stat;
BEGIN_TI END_TIME FLASHBACK_DATA DB_DATA REDO_DATA ESTIMATED_FLASHBACK_SIZE
-------- -------- -------------- ---------- ---------- ------------------------
14:43:10 15:15:28 6455296 29310976 3898368