ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 042-065

042-065

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-18 10:09:52 0 删除 编辑
65. Which statement is true regarding Flashback Version Query?
A. It returns versions of rows only within a transaction.
B. It can be used in subqueries contained only in a SELECT statement.
C. It will return an error if the undo retention time is less than the lower
bound time or SCN specified.
D. It retrieves all versions including the deleted as well as subsequently
reinserted versions of the rows.
Answer: D
通过flashback version query 来查到之前的“历史变化”数据。 Flashback version query
是通过from 语句的扩展语句 versions between. 有两种形式的versions between:
VERSIONS BETWEEN TIMESTAMP [lower bound] AND [upper bound]
VERSIONS BETWEEN SCN [lower bound] AND [upper bound]
lower bound/ upper bound 可以是具体的timestamp/scn, 也可以是关键字
minvalue/maxvalue. 这些关键字让Oracle 去找到所有的versions, 当然这要受制于
undo_retention 参数设置的大小,毕竟这部分信息是放在undo segment 上的。
SQL> select x, y, z
from fbt VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE
order by y;
Sql>select x, y, z from fbt VERSIONS BETWEEN scn 54347743 AND 64347768 order by y;
ORA-08181: 指定的编号不是有效的系统更改号 (解释C 选项,确实会报错,只能证明跟
UNDO_RETENTION 值有关,但该值比lower scn 小就会报错,还不一定了)
参数UNDO_RETENTION=n,决定了能往前闪回的最大时间,值越大就需要越多Undo 空间。
Subsequently:随后

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718845/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-064
下一篇: 047-066
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    214031