oracle: ocp题解与实验(12 & 13/205)

来源:互联网 发布:淘宝话费充值怎么退款 编辑:程序博客网 时间:2024/06/06 02:23

题目:

12. You are working on an Oracle Database 10g database. You enabled the Flashback Database feature. Which two statements regarding flashback logs are true? (Choose two.)A. Flashback logs are not archived.B. Flashback logs are maintained in redo log files.C. Flashback logs are maintained in the Flash Recovery Area.D. Flashback logs are used to maintain Flashback Database related errors.E. Flashback logs need to be cleared manually after you disable Flashback Database.Answer: A, C

题目翻译:oracle 10g,你开启了flashback database功能,哪两个句子描述flashback logs是正确的?

答案解释:关于flashback database的概念,需要看下文档,上面的选项在文档都有描述:

 About Flashback Database

Oracle Flashback Database, accessible from both RMAN (by means of the FLASHBACKDATABASE command) and SQL*Plus (by means of the FLASHBACKDATABASE statement), lets you quickly recover the entire database from logical data corruptions or user errors.

It is similar to conventional point in time recovery in its effects, allowing you to return a database to its state at a time in the recent past. Flashback Database is, however, much faster than point-in-time recovery, because it does not require restoring datafiles from backup and it requires applying fewer changes from the archived redo logs.

Flashback Database can be used to reverse most unwanted changes to a database, as long as the datafiles are intact. This includes returning a database to its state in previous incarnations, that is, undoing the effects of anOPEN RESETLOGS operation.

Flashback Database uses its own logging mechanism, creating flashback logs which are stored in the flash recovery area. You can only use Flashback Database if flashback logs are available. Therefore, you must set up your database in advance to create flashback logs if you want to take advantage of this feature.

To enable Flashback Database, you set up a flash recovery area, and set aflashback retention target, to specify how far back into the past you want to be able to restore your database with Flashback Database.

From that time on, at regular intervals, the database copies images of each altered block in every datafile into the flashback logs. These block images can later be reused to reconstruct the datafile contents as of any moment at which logs were captured.

When a database is restored to its state at some past target time using Flashback Database, each block changed since that time is restored from the copy of the block in the flashback logs most immediately prior to the desired target time. The redo log is then used to re-apply changes since the time that block was copied to the flashback logs.

在OCP培训官方教材中有:

EXAM TIP Unlike redo logs, the flashback logs cannot be multiplexed and are not archived. They are created and managed automatically.

从上面的红字描述上可以容易判断AC是正确的,其他都是错误的;

*************************************************************************************************************************

题目:

13.You executed the following query:SELECT operation, undo_sql, table_name FROM flashback_transaction_query;Which statement is correct regarding the query output?A. It would return information regarding only the last committed transaction.B. It would return only the active transactions in all the undo segments in the database.C. It would return only the committed transactions in all the undo segments in the database.D. It would return both active and committed transactions in all the undo segments in the database.E. It would return information regarding the transactions that began and were committed in the last 30 minutes.Answer: D

答案解释:关于flashback transaction query的,继续看文档说明吧:

Flashback Transaction Query
Flashback Table Query and Flashback Versions Query use undo data for an object.Flashback Transaction Query analyzes the undo by a different dimension: it will
retrieve all the undo data for a transaction, no matter how many objects it affects.The critical view is FLASHBACK_TRANSACATION_QUERY。
 A one-line SQL statement might generate many rows in FLASHBACK_TRANSACTION_QUERY. This is because SQL is a set-oriented language:one statement can affect many
rows. But each row affected will have its own row in the view
. The view will show committed transactions and also transactions in progress. For an active transaction, the COMMIT_SCN and COMMIT_TIMESTAMP columns are NULL. Rolled-back transactions are not displayed.

红字就是描述的选项D,flashback一些列的功能其实就是基于undo数据段扩展的很多功能,所有的信息都在undo数据段里存放着,只不过通过flashback工具命令做了一些恢复的事情,或是该题目中的查询分析;
原创粉丝点击