QUESTION 13
View the Exhibit.
Examine the following command that is executed for the TRANSPORT table in the SH schema:
SQL> SELECT DBMS_STATS.CREATE_EXTENDED_STATS('sh', 'customers_obe', '(country_id,
cust_state_province)') FROM dual;
Which statement describes the significance of this command?
- A. It collects statistics into the pending area in the data dictionary.
- B. It creates a virtual hidden column in the CUSTOMERS_OBE table.
- C. It collects statistics with AUTO_SAMPLE_SIZE for ESTIMATE_PERCENT.
- D. It creates a histogram to hold skewed information about the data in the columns.
Answer: B
创建一个虚拟隐含列
对于where条件里具有两个列以上的情况,比如where c1=’A’ and c2=’B’来说,11g以前优化器评估其selectivity时,总是将每个列的selectivity相乘,从而得到整个where条件的selectiviey。但是如果两个列具有很强的依赖关系,比如汽车制造商与汽车型号这两个列来说,我们知道每个汽车制造商所生产的汽车型号几乎都不会重复,也就是说当你发出where 汽车制造商列=’XXX’ and 汽车型号列=’XXX’时,与发出where汽车型号列=’XXX’时返回的记录行数可能几乎一样。这时如果在计算where条件的selectivity时仍然采用将汽车制造商列的selectivity乘以汽车型号列的selectivity时,就会导致总的selectivity过低,从而导致优化器估计返回的记录行数过少,从而可能导致不正确的执行计划。
为了弥补这样的问题,11g以后可以让你将多个依赖程度很高列合并成一个组,然后对该组收集统计信息。具体如何实现,则可以看下面的例子。
select dbms_stats.create_extended_stats('Schema_name','Table_name','(C1,C2)') from dual;
通过调用函数dbms_stats.create_extended_stats将两个或多个列合并,并返回一个虚拟的隐藏列的列名,其名字类似于:SYS_STUW_5RHLX443AN1ZCLPE_GLE4。
然后,我们可以开始对表收集统计信息,收集完以后,你可以使用ALL|DBA|USER_STAT_EXTIONSIONS视图来查看列组合的统计信息。
exec dbms_stats.gather_table_stats('Schema_name','Table_name');
如果你要对组合列收集直方图,则可以如下所示:
exec dbms_stats.gather_table_stats('Schema_name','Table_name',
method_opt=>'for columns (C1,C2) size AUTO');
参考:050解析
QUESTION 14
View the Exhibit to examine the parameter values.
You are planning to set the value for the MEMORY_TARGET parameter of your database instance.
What value would you assign?
A. 90 MB
B. 272 MB
C. 362 MB
D. 1440 MB
Answer: C
没什么好说的,Memory=SGA+PGA
QUESTION 15
You installed Oracle Database 11g and are performing a manual upgrade of the Oracle9i database. As a
part of the upgrade process, you execute the following script:
SQL>@utlu111i.sql.
Which statement about the execution of this script is true?
A. It must be executed from the Oracle Database 11g environment.
B. It must be executed only after the SYSAUX tablespace has been created.
C. It must be executed from the environment of the database that is being upgraded.
D. It must be executed only after AUTOEXTEND is set to ON for all existing tablespaces.
E. It must be executed from both the Oracle Database 11g and Oracle Database 9i environments.
Answer: C
在被升级的库中执行Analyze the existing instance
Upgrading to Oracle Database 11g
http://www.oracleflash.com/38/Oracle-11g-Release-1-Pre-Upgrade-tool-utlu111i-sql.html#databasesection
QUESTION 16
Which three statements about performance analysis by SQL Performance Analyzer are true? (Choose
three.)
A. It detects changes in SQL execution plans.
B. It produces results that can be used to create the SQL plan baseline.
C. The importance of SQL statements is based on the size of the objects accessed.
D. It generates recommendations to run SQL Tuning Advisor to tune regressed SQLs.
E. It shows only the overall impact on workload and not the net SQL impact on workload.
Answer: ABD
http://docs.oracle.com/cd/E11882_01/server.112/e41481/spa_intro.htm#RATUG166
QUESTION 17
Which tasks can be accomplished using the Enterprise Manager Support Workbench in Oracle Database
11g? (Choose all that apply.)
A. Generate reports on data failure such as data file failures.
B. You can package and upload diagnostic data to Oracle Support.
C. You can track the Service Request (SR) and implement repairs.
D. You can manually run health checks to gather diagnostic data for a problem.
Answer: BCD
QUESTION 18
Which statement is true regarding the VALIDATE DATABASE command?
A. It checks the database for intrablock corruptions only.
B. It checks for block corruption in the valid backups of the database.
C. It checks the database for both intrablock and interblock corruptions.
D. It checks for only those corrupted blocks that are associated with data files.
Answer: A
QUESTION 19
Which two are the prerequisites to enable Flashback Data Archive? (Choose two.)
A. Undo retention guarantee must be enabled.
B. Database must be running in archivelog mode.
C. Automatic undo management must be enabled.
D. The tablespace on which the Flashback Data Archive is created must be managed with Automatic
Segment Space Management (ASSM).
Answer: CD
QUESTION 20
You are managing the APPPROD database as a DBA. You plan to duplicate this database in the same
system with the name DUPDB.
You issued the following RMAN commands to create a duplicate database:
RMAN> CONNECT target sys/sys@APPPROD
RMAN> DUPLICATE TARGET DATABASE
TO dupdb
FROM ACTIVE DATABASE
DB_FILE_NAME_CONVERT '/oracle/oradata/prod/',
'/scratch/oracle/oradata/dupdb/'
SPILE
PARAMETER_VALUE_CONVERT '/oracle/oradata/prod/',
'/scratch/oracle/oradata/dupdb/'
SET SGA_MAX_SIZE = '300M'
SET SGA_TARGET = '250M'
SET LOG_FILE_NAME_CONVERT '/oracle/oradata/prod/redo/', '/scratch/oracle/oradata/dupdb/redo/';
Which three are the prerequisites for the successful execution of the above command? (Choose three.)
A. The source database should be open.
B. The target database should be in ARCHIVELOG mode if it is open.
C. RMAN should be connected to both the instances as SYSDBA.
D. The target database backups should be copied to the source database backup directories.
E. The password file must exist for the source database and have the same SYS user password as the
target.
Answer: BCE
A,源数据库应该为打开,错误,也可以是mount状态。
D,目标数据库的备份必须拷贝到源数据库目录。错误,上面的复制数据库语句是从活动的数据库来复制的,不需要备份。Prerequisites Specific to Active Database Duplication
When you execute DUPLICATE with FROM ACTIVE DATABASE, at least one normal target channel and at least one AUXILIARY channel are required.
When you connect RMAN to the source database as TARGET, you must specify a password, even if RMAN uses operating system authentication. The source database must be mounted or open. If the source database is open, then archiving must be enabled. If the source database is not open, then it must have been shut down consistently.When you connect RMAN to the auxiliary instance, you must provide a net service name. This requirement applies even if the auxiliary instance is on the local host.
The source database and auxiliary instances must use the same SYSDBA password, which means that both instances must have password files. You can create the password file with a single password so you can start the auxiliary instance and enable the source database to connect to it.
The DUPLICATE behavior for password files varies depending on whether your duplicate database acts as a standby database. If you create a duplicate database that is not a standby database, then RMAN does not copy the password file by default. You can specify the PASSWORD FILE option to indicate that RMAN should overwrite the existing password file on the auxiliary instance. If you create a standby database, then RMAN copies the password file to the standby host by default, overwriting the existing password file. In this case, the PASSWORD FILE clause is not necessary.
You cannot use the UNTIL clause when performing active database duplication. RMAN chooses a time based on when the online data files have been completely copied, so that the data files can be recovered to a consistent point in time.
QUESTION 21
You are managing an Oracle Database 11g ASM instance having three disks in a disk group with ASM
compatibility attribute set to 11.1.0 and redundancy set to high. One of the disks in the disk group becomes
unavailable because of power failure.
Which statements will be true in this scenario? (Choose all that apply.)
A. The disk automatically goes offline.
B. The disk is immediately dropped from the disk group.
C. The ASM tracks the extents that are modified during the outage.
D. The ASM migrates the extents from the unavailable disk to the remaining disks.
Answer: AC
Disks
磁盘组创建时使用CREATE DISKGROUP 语句, 创建时允许我们设置冗余项:
NORMAL REDUNDANCY - Two-way mirroring, requiring two failure groups.
HIGH REDUNDANCY - Three-way mirroring, requiring three failure groups.
EXTERNAL REDUNDANCY - No mirroring for disks that are already protected using hardware mirroring or RAID. If you have hardware RAID it should be used in preference to ASM redundancy, so this will be the standard option for most installations.
在短暂的磁盘故障发生时, ASM 保持跟踪记录那些要被写入掉线的磁盘中所改变的部分; 一旦磁盘再次可以使用时,那些改变的部分变被再次的同步到磁盘中, 而不是被覆写全盘的内容;这种机制可以适当的加快重新同步数据的效率; --- 这里说明C是正确的
快速镜像同步(fast mirror resync) 这种机制仅仅在磁盘组的 compatibility attributes 被设置为 11.1 or higher才生效
How ASM Manages Disk Failures
取决于磁盘组的冗余级别和定义的故障组,一个或多个的故障磁盘可能导致以下结果之一:
1.首先磁盘被下线随后被自动的下线;在这种情况下磁盘组一直挂载着并且提供着服务;另外由于镜像的存在,所有的磁盘组的信息保持健康的状态;随后在磁盘移除的操作之后,ASM执行一个再平衡调整用于重建全部的冗余项来恢复那些在坏掉的磁盘的上的数据
2.全部的磁盘组自动的卸载,这意味着丢失掉的数据的可访问性
QUESTION 22
Which statement is true regarding the retention policy for the incidents accumulated in the Automatic
Diagnostic Repository (ADR)?
A. The incident metadata is purged when the problem is resolved and the DBA closes the SR.
B. The incident files and dumps are not retained in the ADR for the manually created incidents.
C. The incident files are retained but the incident metadata is purged when the problem is resolved and the
DBA closes the SR
D. The default setting is for one year after which the incident metadata is purged from the ADR and the
files are retained for one month.
Answer: D
ADR(Automatic Diagnostic Repository)是一个基于文件的档案库,用于存放数据库的诊断信息,例如跟踪文件,意外dump文件,IPS包,警告日志文件,健康监控报告,核心dump文件以及其它诊断信息。ADR的根目录叫做ADR base, 位置通过参数DIAGNOSTIC_DEST设置。ADR拥有统一的目录结构,在数据库之外存储多个产品和实例的诊断信息,因此即使在数据库关闭时仍然可以进行问题诊断。
从Oracle 11gR1开始,ADR用于存储数据库,ASM,CRS和其它产品或组件(如listener)的诊断信息。每一个实例或者产品拥有各自的ADR home路径。例如在一个RAC环境下,ASM, 数据库实例拥有单独的ADR home。http://blog.chinaunix.net/uid-25528717-id-3160758.html
事件元数据保留在ADR中默认一年。
事件文件和dump保留在ADR中默认是一个月。
可以使用事件package configuration更改这些保留策略。后台进程MMON自动清洗过期的ADR数据。http://blog.csdn.net/tianlesoftware/article/details/8222724
SHORTP_POLICY 默认是720小时,30天。其控制如下三种文件的保留时间:
(1) Trace files
(2) Core dump files
(3) Packaging informationLONGP_POLICY默认值是8760小时,即365天,1年,其控制如下三种文件的保留时间:
(1) Incident information
(2) Incident dumps
(3) Alert logs修改ADR的保留策略:
adrci> set control (SHORTP_POLICY = 360)
adrci> set control (LONGP_POLICY = 2160)
adrci> show control
ADR Home =/u01/app/oracle/diag/rdbms/dave/dave:
*************************************************************************
ADRID SHORTP_POLICY LONGP_POLICY
-------------------- ----------------------------------------
3642307927 360 2160
1 rows fetched
关于ADRCI 的更多内容,参考官网手册:
http://docs.oracle.com/cd/E11882_01/server.112/e10701/adrci.htm
QUESTION 23
You opened the encryption wallet and then issued the following command:
SQL>CREATE TABLESPACE securespace
DATAFILE '/home/user/oradata/secure01.dbf'
SIZE 150M
ENCRYPTION USING '3DES168'
DEFAULT STORAGE(ENCRYPT);
Then you closed the wallet. Later, you issued the following command to create the EMPLOYEES table in
the SECURESPACE tablespace and you use the NO SALT option for the EMPID column.
What is the outcome?
A. It creates the table and encrypts the data in it.
B. It generates an error because the wallet is closed.
C. It creates the table but does not encrypt the data in it.
D. It generates an error because the NO SALT option cannot be used with the ENCRYPT option.
Answer: B
如果关闭Wallet,则加密列不可访问:
SQL> select * from eygle.tde;
select * from eygle.tde
*
ERROR at line 1:
ORA-28365: wallet is not open
SQL> alter system set encryption wallet close identified by "eygle";
System altered.
SQL> select * from eygle.tde;
select * from eygle.tde
*
ERROR at line 1:
ORA-28365: wallet is not open
SQL> desc eygle.tde
Name Null? Type
----------------------------------------------------------------- -------- -------------------------------
ID NUMBER(10)
DATA VARCHAR2(50) ENCRYPT
SQL> select id from eygle.tde;
ID
----------
0
5
34
9
31
30
32
14
21
9 rows selected.
参考:http://www.eygle.com/archives/2011/09/oracle_transparent_data_encryption.html
QUESTION 24
Examine the following PL/SQL block:
SET SERVEROUTPUT ON
SET LONG 10000
ECLARE report clob;
BEGIN
report := DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE();
DBMS_OUTPUT.PUT_LINE(report);
END;
Which statement describes the effect of the execution of the above PL/SQL block?
A. The plan baselines are verified with the SQL profiles.
B. All fixed plan baselines are converted into nonfixed plan baselines.
C. All the nonaccepted SQL profiles are accepted into the plan baseline.
D. The nonaccepted plans in the SQL Management Base are verified with the existing plan baselines.
Answer: D
参考:http://blog.csdn.net/rlhua/article/details/16369811
QUESTION 25
In which two aspects does hot patching differ from conventional patching? (Choose two.)
A. It consumes more memory compared with conventional patching.
B. It can be installed and uninstalled via OPatch unlike conventional patching.
C. It takes more time to install or uninstall compared with conventional patching.
D. It does not require down time to apply or remove unlike conventional patching.
E. It is not persistent across instance startup and shutdown unlike conventional patching.
Answer: AD
- 热补丁注意事项
- 可能不是所有平台上都有热补丁程序。当前在以下平台上有热补丁程序:
– Linux x86
– Linux x86-64
– Solaris SPARC64- 要消耗一些额外的内存。
– 确切的内存数取决于:
— 补丁程序的大小
— 当前运行的Oracle 进程数
– 最小内存数:每个Oracle 进程大约占一个OS 页面
QUESTION 26
Which statement about the enabling of table compression in Oracle Database 11g is true?
A. Compression can be enabled at the table, tablespace, or partition level for direct loads only.
B. Compression can be enabled only at the table level for both direct loads and conventional DML.
C. Compression can be enabled at the table, tablespace, or partition level for conventional DML only.
D. Compression can be enabled at the table, tablespace, or partition level for both direct loads and
conventional DML.
Answer: D
QUESTION 27
Which are the prerequisites for performing flashback transactions on your database? (Choose all that
apply.)
A. Supplemental log must be enabled.
B. Supplemental log must be enabled for the primary key.
C. Undo retention guarantee for the database must be configured.
D. Execute permission on the DBMS_FLASHBACK package must be granted to the user.
Answer: ABD
参考:
http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS1010Configuring Your Database for Flashback Transaction
To configure your database for the Flashback Transaction feature, you or your database administrator must:
· With the database mounted but not open, enable ARCHIVELOG:
ALTER DATABASE ARCHIVELOG;
· Open at least one archive log:
ALTER SYSTEM ARCHIVE LOG CURRENT;
· If not done, enable minimal and primary key supplemental logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
· If you want to track foreign key dependencies, enable foreign key supplemental logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
Note:
If you have very many foreign key constraints, enabling foreign key supplemental logging might not be worth the performance penalty.
Flashback Transaction
Use Flashback Transaction to roll back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and run the corresponding compensating transactions that return the affected data to its original state. (Flashback Transaction is part ofDBMS_FLASHBACK package.)
For DBMS_FLASHBACK Package
To allow access to the features in the DBMS_FLASHBACK package, grant the EXECUTE privilege on DBMS_FLASHBACK.
Using Flashback Transaction
The DBMS_FLASHBACK.TRANSACTION_BACKOUT procedure rolls back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and run the compensating transactions that return the affected data to its original state.
The transactions being rolled back are subject to these restrictions:
· They cannot have performed DDL operations that changed the logical structure of database tables.
· They cannot use Large Object (LOB) Data Types:
- o BFILE
BLOB
CLOB
NCLOB
· They cannot use features that LogMiner does not support.
The features that LogMiner supports depends on the value of the COMPATIBLE initialization parameter for the database that is rolling back the transaction. The default value is the release number of the most recent major release.
Flashback Transaction inherits SQL data type support from LogMiner. Therefore, if LogMiner fails due to an unsupported SQL data type in a the transaction, Flashback Transaction fails too.
Some data types, though supported by LogMiner, do not generate undo information as part of operations that modify columns of such types. Therefore, Flashback Transaction does not support tables containing these data types. These include tables with BLOB, CLOB and XML type.
QUESTION 28
You are managing an Oracle Database 11g database. You want to take the backup of MULT_DATA, a big
file tablespace of size 100 TB on tape drive, but you have tape drives of only 10 GB each.
Which method would accomplish the task quickly and efficiently?
A. intrafile parallel backup
B. parallel image copy backup
C. backup with MAXPIECESIZE configured for the channel
D. parallel backup with MAXPIECESIZE configured for the channel
Answer: A
RMAN 的新增功能 对超大型文件应用 Intrafile 并行备份和还原 在备份单一大型数据文件时,现在可以使用多个并行服务器进程和“通道”来有效地分配工作量。这种使用多个部分的方法改善了备份的性能。
使用 RMAN多部分备份 BACKUP 和 VALIDATE DATAFILE命令接受新的选项:SECTIONSIZE[M | K | G]. 为每个备份部分指定计划的大小。该选项既是备份命令也是备份规范级别选项,所以可以在同一备份作业中对不同的文件应用不同的部分大小。查看有关特定多部分备份的元数据: •V$BACKUP_SET 和 RC_BACKUP_SET 视图都有一个 MULTI_SECTION 列,用于表明是否为多部分备份。 •V$BACKUP_DATAFILE和 RC_BACKUP_DATAFILE视图都有一个SECTION_SIZE列,用于指定多部分备份的每个部分中的块数。零意味着对整个文件进行备份。
QUESTION 29
Which statements are true regarding the Query Result Cache? (Choose all that apply.)
A. It can be set at the system, session, or table level.
B. It is used only across statements in the same session.
C. It can store the results from normal as well as flashback queries.
D. It can store the results of queries based on normal, temporary, and dictionary tables.
Answer: AC
参考:
QUESTION 30
You want to analyze a SQL Tuning Set (STS) using SQL Performance Analyzer in a test database.
Which two statements are true regarding the activities performed during the test execution of SQLs in a
SQL Tuning Set? (Choose two.)
A. Every SQL statement in the STS is considered only once for execution.
B. The SQL statements in the STS are executed concurrently to produce the execution plan and execution
statistics.
C. The execution plan and execution statistics are computed for each SQL statement in the STS.
D. The effects of DDL and DML are considered to produce the execution plan and execution statistics.
Answer: AC
A SQL tuning set (STS) is a database object that is used to manage SQL workloads. The SQL tuning set can be used to store one or more SQL statements along with their execution context, including the text of the SQL, parsing schema under which the SQL statement can be compiled, bind values needed to execute the SQL statement, execution plan, number of times the SQL statement was executed, and so on.
QUESTION 31
Which two changes and their effect on the system can be tested by using the Database Replay feature?
(Choose two.)
A. multiplexing of the control file
B. database and operating system upgrades
C. adding the redo log member to the database
D. changing the database storage to ASM-managed storage
Answer: BD
QUESTION 32
You executed the following commands:
SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false;
SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS('SH', 'CUSTOMERS', 'PUBLISH','false');
SQL> EXECUTE
DBMS_STATS.GATHER_TABLE_STATS('SH', 'CUSTOMERS');
Which statement is correct regarding the above statistics collection on the SH.CUSTOMERS table in the
above session?
A. The statistics are stored in the pending statistics table in the data dictionary.
B. The statistics are treated as the current statistics by the optimizer for all sessions.
C. The statistics are treated as the current statistics by the optimizer for the current sessions only.
D. The statistics are temporary and used by the optimizer for all sessions until this session terminates.
Answer: A
By default, the optimizer uses the published statistics stored in the data dictionary views. If you want the optimizer to use the newly collected pending statistics, then set the initialization parameter OPTIMIZER_USE_PENDING_STATISTICS to TRUE (the default value is FALSE), and run a workload against the table or schema:
ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = TRUE;
11gr2开始,可以使用下面类型的操作来收集优化器统计信息:
- 自动发布收集的统计信息在收集操作结束以后(默认选项publish)
- 保存新的统计信息,并且待定(暂不发布pending)
这个特性可以将新收集的统计信息置为待定状态,所以可以先验证新统计信息的有效性然后再发布。
QUESTION 33
The Database Resource Manager is automatically enabled in the maintenance window that runs the
Automated Maintenance Task.
What is the reason for this?
A. to prevent the creation of an excessive number of scheduler job classes
B. to allow the Automated Maintenance Tasks to use system resources without any restriction
C. to allow resource sharing only among the Automated Maintenance Tasks in the maintenance window
D. to prevent the Automated Maintenance Tasks from consuming excessive amounts of system resources
Answer: D
参考:http://blog.csdn.net/rlhua/article/details/13092965
自动维护任务依赖于在维护窗口期间启用的资源管理器。维护窗口打开时,会自动设置DEFAULT_MAINTENANCE_PLAN资源管理器计划,以控制自动维护任务使用的CPU 数量。
而d答案:防止自动维护任务消耗过多的系统资源,正确。
QUESTION 34
Which is the source used by Automatic SQL Tuning that runs as part of the AUTOTASK framework?
A. SQL statements that are part of the AWR baseline only
B. SQL statements based on the AWR top SQL identification
C. SQL statements that are part of the available SQL Tuning Set (STS) only
D. SQL statements that are available in the cursor cache and executed by a user other than SYS
Answer: B
QUESTION 35
View the Exhibit and examine the output.
You executed the following command to enable Flashback Data Archive on the EXCHANGE_RATE table:
ALTER TABLE exchange_rate FLASHBACK ARCHIVE;
What is the outcome of this command?
A. The table uses the default Flashback Archive.
B. The Flashback Archive is created on the SYSAUX tablespace.
C. The Flashback Archive is created on the same tablespace where the tables are stored.
D. The command generates an error because no Flashback Archive name is specified and there is no
default Flashback Archive.
Answer: D
Oracle 11g中flashback增加了:Flashback Data Archive 特性。该技术与之前的Flashback的实现机制不同,通过将变化数据另外存储到创建的闪回归档区(Flashback Archive)中,以和undo区别开来,这样就可以为闪回归档区单独设置存储策略,使之可以闪回到指定时间之前的旧数据而不影响undo策略。并且可以根据需要指定哪些数据库对象需要保存历史变化数据,而不是将数据库中所有对象的变化数据都保存下来,这样可以极大地减少空间需求。
Flashback Data Archive并不是记录数据库的所有变化,而只是记录了指定表的数据变化。所以,Flashback Data Archive是针对对象的保护,是Flashback Database的有力补充。
通过Flashback Data Archive,可以查询指定对象的任何时间点(只要满足保护策略)的数据,而且不需要用到undo,这在有审计需要的环境,或者是安全性特别重要的高可用数据库中,是一个非常好的特性。缺点就是如果该表变化很频繁,对空间的要求可能很高。
实验验证:
1、首先创建一个表空间用于存储闪回数据归档sys@TEST1107> create tablespace fla_tbs1 datafile '/u01/app/oracle/oradata/test1107/fla_tbs01.dbf' size 10M;
Tablespace created.
2、创建闪回数据归档
sys@TEST1107> create flashback archive fla1 tablespace fla_tbs1 quota 10M retention 1 year;
Flashback archive created.
3、查询有哪些闪回数据归档以及其状态。
sys@TEST1107> select FLASHBACK_ARCHIVE_NAME,STATUS from DBA_FLASHBACK_ARCHIVE;
FLASHBACK_ARCHIVE_NAME STATUS
------------------------------ -------
FLA1
4、对scott.dept表启用闪回数据归档,报错,因为没有指定默认闪回归档。
sys@TEST1107> alter table scott.dept flashback archive;
alter table scott.dept flashback archive
*
ERROR at line 1:
ORA-55608: Default Flashback Archive does not exist
5、将FLA1指定为默认闪回数据归档。
sys@TEST1107> alter flashback archive FLA1 set default;
Flashback archive altered.
6、查询,此时须注意,status栏位下面的有DEFAULT的状态。
sys@TEST1107> select FLASHBACK_ARCHIVE_NAME,STATUS from DBA_FLASHBACK_ARCHIVE;
FLASHBACK_ARCHIVE_NAME STATUS
------------------------------ -------
FLA1 DEFAULT
7、对表启用闪回数据归档,成功。
sys@TEST1107> alter table scott.dept flashback archive;
Table altered.
对于题中的显示,**FLA1的状态栏位为空值,即没有指定FLA1为默认的闪回数据归档.**执行命令会出错;
参考:http://blog.csdn.net/tianlesoftware/article/details/6412427
QUESTION 36
View the Exhibit to examine the error during the database startup.
You open an RMAN session for the database instance. To repair the failure, you executed the following as
the first command in the RMAN session:
RMAN> REPAIR FAILURE;
Which statement describes the consequence of the command?
A. The command performs the recovery and closes the failures.
B. The command only displays the advice and the RMAN script required for repair.
C. The command produces an error because the ADVISE FAILURE command has not been executed
before the REPAIR FAILURE command.
D. The command executes the RMAN script to repair the failure and removes the entry from the Automatic
Diagnostic Repository (ADR).
Answer: C
1、首先来看下各个文件的位置。
sys@TEST0910> select FILE_ID,FILE_NAME,TABLESPACE_NAME from dba_data_files;
FILE_ID FILE_NAME TABLESPACE_NAME
---------- -------------------------------------------------- ------------------------------
4 /u01/app/oracle/oradata/test0910/users01.dbf USERS
3 /u01/app/oracle/oradata/test0910/undotbs01.dbf UNDOTBS1
2 /u01/app/oracle/oradata/test0910/sysaux01.dbf SYSAUX
1 /u01/app/oracle/oradata/test0910/system01.dbf SYSTEM
5 /u01/app/oracle/oradata/test0910/example01.dbf EXAMPLE
2、先用rman备份users表空间,用作恢复。
RMAN> backup tablespace users;
Starting backup at 13-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: starting piece 1 at 13-SEP-13
channel ORA_DISK_1: finished piece 1 at 13-SEP-13
piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_13/o1_mf_nnndf_TAG20130913T111426_936byprm_.bkp tag=TAG20130913T111426 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 13-SEP-13
3、操作系统删除users.dbf文件
[oracle@rtest ~]$ rm -rf /u01/app/oracle/oradata/test0910/users01.dbf
[oracle@rtest ~]$ ls /u01/app/oracle/oradata/test0910/users01.dbf
ls: /u01/app/oracle/oradata/test0910/users01.dbf: No such file or directory
4、shutdown abort模拟数据库宕机并startup,发现错误与题目一样
sys@TEST0910> shutdown abort;
ORACLE instance shut down.
sys@TEST0910> startup
ORACLE instance started.
Total System Global Area 2505338880 bytes
Fixed Size 2230952 bytes
Variable Size 553649496 bytes
Database Buffers 1929379840 bytes
Redo Buffers 20078592 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
ORA-01110: data file 4: '/u01/app/oracle/oradata/test0910/users01.dbf'
5、进入rman,修复失败。
RMAN> repair failure ;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of repair command at 09/13/2013 11:20:04
RMAN-06954: REPAIR command must be preceded by ADVISE command in same session
在试图没有进行advise failure命令时使用repair failure,则报错。
主要原因为:在repair failure之前,要先运行advise failure,让rman给出修复的建议,并给出修复的脚本,之后再运行repair failure
6、按照提示,进行advise命令。
RMAN> advise failure;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of advise command at 09/13/2013 11:20:59
RMAN-07211: failure option not specified
为什么也报错呢?原因为在advise failure之前,要先运行list failure,列出所要修复的错误,所以先list failure。
7、运行LIST-->ADVISE-->REPAIR 命令
RMAN> list failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
122 HIGH OPEN 13-SEP-13 One or more non-system datafiles are missing
RMAN> advise failure;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
122 HIGH OPEN 13-SEP-13 One or more non-system datafiles are missing
analyzing automatic repair options; this may take some time
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=189 device type=DISK
analyzing automatic repair options complete
Mandatory Manual Actions
========================
no manual actions available
Optional Manual Actions
=======================
1. If file /u01/app/oracle/oradata/test0910/users01.dbf was unintentionally renamed or moved, restore it
Automated Repair Options
========================
Option Repair Description
------ ------------------
1 Restore and recover datafile 4
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/test0910/test0910/hm/reco_3910127882.hm
advise failure命令对记录在自动诊断信息库中的所有故障给出建议。默认时,此命令只列出具有critical或high优先级的那些故障。除了产生所有输入故障的摘要外,此命令还对每个故障提供一个建议修复选项。通常,advise failure命令同时给出自动和手动修复选项。在advisefailure命令输出结束时,RMAN生成一个脚本,列出建议的修复选项的细节。如果你想自己进行修复,可以直接使用这个脚本,或者对它进行修改。
RMAN> repair failure;
Strategy: The repair includes complete media recovery with no data loss
Repair script: /u01/app/oracle/diag/rdbms/test0910/test0910/hm/reco_3910127882.hm
contents of repair script:
# restore and recover datafile
restore datafile 4;
recover datafile 4;
sql 'alter database datafile 4 online';
Do you really want to execute the above repair (enter YES or NO)? Y
executing repair script
Starting restore at 13-SEP-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test0910/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_13/o1_mf_nnndf_TAG20130913T111426_936byprm_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_13/o1_mf_nnndf_TAG20130913T111426_936byprm_.bkp tag=TAG20130913T111426
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 13-SEP-13
Starting recover at 13-SEP-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:09
Finished recover at 13-SEP-13
sql statement: alter database datafile 4 online
repair failure complete
Do you want to open the database (enter YES or NO)? YES
database opened
利用advise failure 命令提供的建议,repaire failure根据建议恢复错误。
QUESTION 37
You issued the following command on the temporary tablespace LMTEMP in your database:
SQL>ALTER TABLESPACE lmtemp SHRINK SPACE KEEP 20M;
Which requirement must be fulfilled for this command to succeed?
A. The tablespace must be locally managed.
B. The tablespace must have only one temp file.
C. The tablespace must be made nondefault and offline.
D. The tablespace can remain as the default but must have no active sort operations.
Answer: A
QUESTION 38
You are working as a DBA on the decision support system. There is a business requirement to track and
store all transactions for at least three years for a few tables in the database. Automatic undo management
is enabled in the database.
Which configuration should you use to accomplish this task?
A. Enable Flashback Data Archive for the tables.
B. Enable supplemental logging for the database.
C. Specify undo retention guarantee for the database.
D. Create Flashback Data Archive on the tablespace on which the tables are stored.
E. Query V$UNDOSTAT to determine the amount of undo that will be generated and create an undo
tablespace for that size.
Answer: A
QUESTION 39
Your organization decided to upgrade the existing Oracle 10g database to Oracle 11g database in a
multiprocessor environment. At the end of the upgrade, you observe that the DBA executes the following
script:
SQL> @utlrp.sql
What is the significance of executing this script?
A. It performs parallel recompilation of only the stored PL/SQL code.
B. It performs sequential recompilation of only the stored PL/SQL code.
C. It performs parallel recompilation of any stored PL/SQL as well as Java code.
D. It performs sequential recompilation of any stored PL/SQL as well as Java code.
Answer: C
QUESTION 40
Which two are the uses of the ASM metadata backup and restore (AMBR) feature? (Choose two.)
A. It can be used to back up all data on ASM disks.
B. It can be used to re-create the ASM disk group with its attributes.
C. It can be used to recover the damaged ASM disk group along with the data.
D. It can be used to gather information about a preexisting ASM disk group with disk paths, disk name,failure groups, attributes, templates, and alias directory structure.
Answer: BD
QUESTION 41
You executed the following PL/SQL block successfully:
VARIABLE tname VARCHAR2(20)
BEGIN
dbmsaddm.insertfindingdirective (NULL, DIRNAME=>'Detail CPU Usage', FINDING_NAME=>'CPU
Usage',
MIN_ACTIVE_SESSIONS=>0, MIN_PERC_IMPACT=>90);
:tname := 'database ADDM task4';
dbms_addm.analyze_db(:tname, 150, 162);
END;
/
Then you executed the following command:
SQL> SELECT dbms_addm.get_report(:tname) FROM DUAL;
The above command produces Automatic Database Diagnostic Monitor (ADDM) analysis .
A. with the CPU Usage finding if it is less than 90
B. without the CPU Usage finding if it is less than 90
C. with the CPU Usage finding for snapshots below 90
D. with the CPU Usage finding for snapshots not between 150 and 162
Answer: B
insert_finding_directive 这个过程的作用是创建一个对指定类型做报告限制的指令
QUESTION 42
Which statements describe the capabilities of the DBMS_NETWORK_ACL_ADMIN package? (Choose all
that apply.)
A. It can be used to allow the access privilege settings for users but not roles.
B. It can be used to allow the access privilege settings for users as well as roles.
C. It can be used to control the time interval for which the access privilege is available to a user.
D. It can be used to selectively restrict the access for each user in a database to different host computers.
E. It can be used to selectively restrict a user's access to different applications in a specific host computer.
Answer: BCD
ACL的描述,死记
QUESTION 43
To generate recommendations to improve the performance of a set of SQL queries in an application, you
execute the following blocks of code:
BEGIN
dbms_advisor.create_task(dbms_advisor.sqlaccess_advisor,'TASK1'); END;
/
BEGIN
dbms_advisor.set_task_parameter('TASK1','ANALYSIS_SCOPE','ALL'); dbms_advisor.set_task_parameter('TASK1','MODE','COMPREHENSIVE'); END;
/
BEGIN
dbms_advisor.execute_task('TASK1');
dbms_output.put_line(dbms_advisor.get_task_script('TASK1')); END;
/
The blocks of code execute successfully; however, you do not get the required outcome.
What could be the reason?
A. A template needs to be associated with the task.
B. A workload needs to be associated with the task.
C. The partial or complete workload scope needs to be associated with the task.
D. The type of structures (indexes, materialized views, or partitions) to be recommended need to be
specified for the task.
Answer: B
QUESTION 44
You are managing an Oracle Database 11g instance with ASM storage. The ASM instance is down. To
know the details of the disks in the DATA disk group, you issued the following ASMCMD command:
ASMCMD> lsdsk -I -d DATA
Which statement is true regarding the outcome of this command?
A. The command succeeds but it retrieves only the disk names.
B. The command produces an error because the ASM instance is down.
C. The command succeeds but it shows only the status of the ASM instance.
D. The command succeeds and retrieves information by scanning the disk headers based on an
ASM_DISKSTRING value.
Answer: D
http://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_util004.htm#OSTMG94559
QUESTION 45
You plan to set up the Automatic Workload Repository (AWR) baseline metric thresholds for a moving
window baseline.
Which action would you take before performing this task?
A. Compute the baseline statistics.
B. Take an immediate AWR snapshot.
C. Decrease the window size for the baseline.
D. Decrease the expiration time for the baseline.
Answer: A
没看懂
http://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94177
QUESTION 46
You need to create a partitioned table to store historical data and you issued the following command:
CREATE TABLE purchase_interval
PARTITION BY RANGE (time_id)
INTERVAL (NUMTOYMINTERVAL(1,'month')) STORE IN (tbs1,tbs2,tbs3) (
PARTITION p1 VALUES LESS THAN(TO_DATE('1-1-2005', 'dd-mm-yyyy')), PARTITION p2 VALUES
LESS THAN(TO_DATE('1-1-2007', 'dd-mm-yyyy'))) AS
SELECT *
FROM purchases
WHERE time_id < TO_DATE('1-1-2007','dd-mm-yyyy');
What is the outcome of the above command?
- A. It returns an error because the range partitions P1 and P2 should be of the same range.
- B. It creates two range partitions (P1, P2). Within each range partition, it creates monthwise subpartitions.
- C. It creates two range partitions of varying range. For data beyond '1-1-2007,' it creates partitions with a width of one month each.
- D. It returns an error because the number of tablespaces (TBS1,TBS2,TBS3)specified does not match the number of range partitions (P1,P2) specified.
Answer: C
http://blog.csdn.net/jgmydsai/article/details/38231135
INTERVAL 是11G新增的自动分区特性
该语句建立p1、p2两个分区,其后的数据按月自动进行分区
QUESTION 47
View the Exhibit to examine the Automatic Database Diagnostic Monitor (ADDM) tasks.
You executed the following commands:
SQL> VAR tname VARCHAR2(60);
SQL> BEGIN
:tname := 'my_instance_analysis_mode_task';
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,'Sg_directive','SCOTT'); END;
Which statement describes the consequence?
A. The ADDM task is filtered to suppress the Segment Advisor suggestions for the SCOTT schema.
B. The ADDM task is filtered to produce the Segment Advisor suggestions for the SCOTT schema only.
C. The PL/SQL block produces an error because the my_instance_analysis_mode_task task has not been
reset to its initial state.
D. All subsequent ADDM tasks including my_instance_analysis_mode_task are filtered to suppress the
Segment Advisor suggestions for the SCOTT schema.
Answer: C
实验验证:
sys@TEST1107> VAR tname VARCHAR2(60);
sys@TEST1107> BEGIN :tname := 'my_instance_analysis_mode_task';
2 DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,'Sg_directive','SCOTT');
3 END;
4 /
PL/SQL procedure successfully completed.
sys@TEST1107> SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;
ERROR:
ORA-13631: The most recent execution of task my_instance_analysis_mode_task contains no results.
ORA-06512: at "SYS.PRVT_ADVISOR", line 3189
ORA-06512: at "SYS.DBMS_ADVISOR", line 590
ORA-06512: at line 1
no rows selected
DBMS_ADDM.ANALYZE_INST缺少分析,会报错。
Examples
A new ADDM task is created to analyze a local instance. However, it has special treatment for all segments that belong to user SCOTT. The result of GET_REPORT does not show actions for running Segment advisor for segments that belong to SCOTT.
var tname VARCHAR2(60);
BEGIN
DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(NULL,
'my Segment directive',
'SCOTT');
:tname := 'my_instance_analysis_mode_task';
DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);
END;
To see a report containing all actions regardless of the directive:
SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;
QUESTION 48
Examine the following PL/SQL block:
DECLARE
my_plans pls_integer;
BEGIN
my_plans := DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (sql_id => ?9twu5t2dn5xd?; END;
Which statement is true about the plan being loaded into the SQL plan baseline by the above command?
A. It is loaded with the FIXED status.
B. It is loaded with the ACCEPTED status.
C. It is not loaded with the ENABLED status.
D. It is not loaded with the ACCEPTED status.
Answer: B
QUESTION 49
View the Exhibit exhibit1 to observe the maintenance window property.
View the Exhibit exhibit2 to examine the output of the query.
Which two statements describe the conclusions? (Choose two.)
A. The window duration should be increased.
B. RESOURCE_PERCENTAGE should be increased.
C. RESOURCE_PERCENTAGE should be decreased.
D. The repeat time for the window should be decreased.
Answer: AB
QUESTION 50
Evaluate the following statements:
CREATE TABLE purchase_orders
(po_id NUMBER(4),
po_date TIMESTAMP,
supplier_id NUMBER(6),
po_total NUMBER(8,2),
CONSTRAINT order_pk PRIMARY KEY(po_id))
PARTITION BY RANGE(po_date)
(PARTITION Q1 VALUES LESS THAN (TO_DATE(?1-apr-2007?d-mon-yyyy?), PARTITION Q2 VALUES
LESS THAN (TO_DATE(?1-jul-2007?d-mon-yyyy?), PARTITION Q3 VALUES LESS THAN (TO_DATE(?1-
oct -2007?d-mon-yyyy?), PARTITION Q4 VALUES LESS THAN (TO_DATE(?1-jan-2008?d-mon-yyyy?));
CREATE TABLE purchase_order_items
(po_id NUMBER(4) NOT NULL,
product_id NUMBER(6) NOT NULL,
unit_price NUMBER(8,2),
quantity NUMBER(8),
CONSTRAINT po_items_fk
FOREIGN KEY (po_id) REFERENCES purchase_orders(po_id)) PARTITION BY REFERENCE
(po_items_fk);
What are the two consequences of the above statements? (Choose two.)
- A. Partitions of PURCHASE_ORDER_ITEMS have system-generated names.
- B. Both PURCHASE_ORDERS and PURCHASE_ORDER_ITEMS tables are created with four partitions each.
- C. Partitions of the PURCHASE_ORDER_ITEMS table exist in the same tablespaces as the partitions of the PURCHASE_ORDERS table.
- D. The PURCHASE_ORDER_ITEMS table inherits the partitioning key from the parent table by automatically duplicating the key columns.
- E. Partition maintenance operations performed on the PURCHASE_ORDER_ITEMS table are automatically reflected in the PURCHASE_ORDERS table.
Answer: BC
Reference-Partitioned Tables-关联分区表
QUESTION 51
Which statements are true regarding SecureFile LOBs? (Choose all that apply.)
A. The amount of undo retained is user controlled.
B. SecureFile LOBs can be used only for nonpartitioned tables.
C. Fragmentation is minimized by using variable-sized chunks dynamically.
D. SecureFile encryption allows for random reads and writes of the encrypted data.
E. It automatically detects duplicate LOB data and conserves space by storing only one copy.
Answer: CD
QUESTION 52
View the Exhibit for some of the current parameter settings.
A user logs in to the HR schema and issues the following commands:
SQL> CREATE TABLE emp
(empno NUMBER(3),
ename VARCHAR2(20),
sal NUMBER(8,2));
SQL> INSERT INTO emp(empno,ename) VALUES(1,'JAMES'); At this moment, a second user also logs in
to the HR schema and issues the following command:
SQL> ALTER TABLE emp MODIFY sal NUMBER(10,2);
What happens in the above scenario?
- A. A deadlock is created.
- B. The second user's command executes successfully.
- C. The second user's session immediately produces the resource busy error.
- D. The second user's session waits for a time period before producing the resource busy error.
Answer: D
分析:
设置了DDL_LOCK_TIMEOUT参数为60s,执行ddl语句如果修改的字段正在这些dml语句,则等待设定的实际后,再报错!DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue. The default value of zero indicates a status of NOWAIT. The maximum value of 1,000,000 seconds will result in the DDL statement waiting forever to acquire a DML lock.
If a lock is not acquired before the timeout period expires, then an error is returned.
QUESTION 53
You upgraded Oracle Database 10g to Oracle Database 11g. How would this affect the existing users'
passwords?
A. All passwords automatically become case-sensitive.
B. All passwords remain non-case-sensitive till they are changed.
C. All passwords remain non-case-sensitive and cannot be changed.
D. All passwords remain non-case-sensitive until their password attribute in the profile is altered.
Answer: B
QUESTION 54
What recommendations does the SQL Access Advisor provide for optimizing SQL queries? (Choose all that
apply.)
A. selection of SQL plan baselines
B. partitioning of tables and indexes
C. creation of index-organized tables
D. creation of bitmap, function-based, and B-tree indexes
E. optimization of materialized views for maximum query usage and fast refresh
Answer: BDE
参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF95276
SQL Access Advisor index recommendations include bitmap, function-based, and B-tree indexes. A bitmap index offers a reduced response time for many types of ad hoc queries and reduced storage requirements compared to other indexing techniques. Bitmap indexes are most commonly used in a data warehouse to index unique or near-unique keys. SQL Access Advisor materialized view recommendations include fast refreshable and full refreshable MVs, for either general rewrite or exact text match rewrite.
SQL Access Advisor, using the TUNE_MVIEW procedure, also recommends how to optimize materialized views so that they can be fast refreshable and take advantage of general query rewrite.
Using SQL Access Advisor in Enterprise Manager or API, you can do the following:
Recommend materialized views and indexes based on collected, user-supplied, or hypothetical workload information.
Recommend partitioning of tables, indexes, and materialized views.
Mark, update, and remove recommendations.
QUESTION 55
Your system has been upgraded from Oracle Database 10g to Oracle Database 11g. You imported SQL
Tuning Sets (STS) from the previous version. After changing the OPTIMIZER_FEATURE_ENABLE
parameter to 10.2.0.4 and running the SQL Performance
Analyzer, you observed performance regression for a few SQL statements.
What would you do with these SQL statements?
A. Set OPTIMIZER_USE_PLAN_BASELINES to FALSE to prevent the use of regressed plans.
B. Capture the plans from the previous version using STS and then load them into the stored outline.
C. Capture the plans from the previous version using STS and then load them into SQL Management Base
(SMB).
D. Set OPTIMIZER_CAPTURE_SQL_PLAN_BASELINES to FALSE to prevent the plans from being
loaded to the SQL plan baseline.
Answer: C
参考:http://blog.csdn.net/rlhua/article/details/16369811
SQL 性能分析器和SQL 计划基准方案
上一个图中所述的第一种方法的一个变体是通过使用SQL 性能分析器。可以捕获STS 中Oracle Database 11 g 之前的计划,并将这些计划导入到Oracle Database 11 g。然后,将初始化参数optimizer_features_enable设置为10g,使优化程序将此数据库当成10g Oracle DB 进行操作。接下来,为STS 运行SQL 性能分析器。运行完成后,将初始化参数optimizer_features_enable设置回11g,并为STS 重新运行SQL 性能分析器。
SQL 性能分析器将生成一个报表,列出了从10g 到11g 其计划已发生回归的SQL 语句。
对于那些SQL 性能分析器显示的由于新优化程序版本而发生性能回归的SQL 语句,可以使用STS 捕获其计划,然后将这些计划加载到SMB 中。
此方法提供了计划植入进程的最佳形式,因为它有助于在保留数据库升级所带来的性能改进的同时,防止性能回归。
QUESTION 56
You are managing Oracle Database 11g with an ASM storage with high redundancy. The following
command was issued to drop the disks from the dga disk group after five hours:
ALTER DISKGROUP dga OFFLINE DISKS IN FAILGROUP f2 DROP AFTER 5H;
Which statement is true in this scenario?
A. It starts the ASM fast mirror resync.
B. It drops all disk paths from the dga disk group.
C. All the disks in the dga disk group would be OFFLINE and the DISK_REPAIR_TIME disk attribute would
be set to 5 hours.
D. All the disks in the dga disk group in failure group f2 would be OFFLINE and the DISK_REPAIR_TIME
disk attribute would be set to 5 hours.
Answer: D
QUESTION 57
View the Exhibit to observe the error.
You receive this error regularly and have to shut down the database instance to overcome the error.
What can the solution be to reduce the chance of this error in future, when implemented?
A. locking the SGA in memory
B. automatic memory management
C. increasing the value of SGA_MAX_SIZE
D. setting the PRE_PAGE_SGA parameter to TRUE
Answer: B
QUESTION 58
Which three statements are true regarding the functioning of the Autotask Background Process (ABP)?
(Choose three.)
A. It translates tasks into jobs for execution by the scheduler.
B. It creates jobs without considering the priorities associated with them.
C. It determines the list of jobs that must be created for each maintenance window.
D. It is spawned by the MMON background process at the start of the maintenance window.
E. It maintains a repository in the SYSTEM tablespace to store the history of the execution of all tasks.
Answer: ACD
Oracle ABP(Autotask Background Process)
ABP相当于自动任务与调度程序之间的中介,其主要作用是将自动任务转换成Autotask作业,供调度程序执行。同样重要的是,ABP还维护所有任务执行的历史记录。ABP将其专用资料档案库存储在sysaux表空间中,您可以通过DBA_AUTOTASK_TASK 查案该资料档案库。
ABP是在启动维护窗口时,有MMON 启动的,所有实例只需要一个ABP。MMON进程将监视ABP,并在必要时重启ABP.
ABP可以确定为每项维护任务创建的作业列表,此列表按以下优先级排序:紧急、高级、中级。在每个优先级组中,作业是按执行的首选顺序排列的。**
ABP按照以下方式创建作业:先创建所有紧急优先级的作业,然后创建高优先级的作业,最后创建所有中优先级的作业**
ABP将作业分配到多个调度程序作业类。这些作业类将作业映射到基于优先级的使用者组。**
注意:使用Oracle DB 11g时,不存在与特定任务永久关联的作业。因此,不能使用DBMS_SCHEDULER过程来控制自动任务的行为,请改而使用DBMS_AUTO_TASK_ADMIN过程
QUESTION 59
You executed the following commands in an RMAN session for your database instance that has failures:
RMAN> LIST FAILURE;
After some time, you executed the following command in the same session:
RMAN> ADVISE FAILURE;
But there are new failures recorded in the Automatic Diagnostic Repository (ADR) after the execution of the
last LIST FAILURE command.
Which statement is true for the above ADVISE FAILURE command in this scenario?
- A. It produces a warning for new failures before advising for CRITICAL and HIGH failures.
- B. It ignores new failures and considers the failures listed in the last LIST FAILURE command only.
- C. It produces an error with recommendation to run the LIST FAILURE command before the ADVISE FAILURE command.
- D. It produces advice only for new failures and the failures listed in the last LIST FAILURE command are ignored.
Answer: A
QUESTION 60
View the Exhibit to examine the output for the V$DIAG_INFO view.
Which statements are true regarding the location of diagnostic traces? (Choose all that apply.)
A. The path to the location of the background as well as the foreground process trace files is /u01/oracle/
diag/rdbms/orclbi/orclbi/trace.
B. The location of the text alert log file is /u01/oracle/diag/rdbms/orclbi/orclbi/alert.
C. The location of the trace file for the current session is /u01/oracle/diag/rdbms/orclbi/orclbi/trace.
D. The location of the XML-formatted version of the alert log is /u01/oracle/diag/rdbms/orclbi/orclbi/alert.
Answer: ACD
QUESTION 61
Evaluate the following command:
SQL>ALTER SYSTEM SET db_securefile = 'IGNORE';
What is the impact of this setting on the usage of SecureFiles?
A. It forces BasicFiles to be created even if the SECUREFILE option is specified to create the LOB.
B. It forces SecureFiles to be created even if the BASICFILE option is specified to create the LOB.
C. It does not allow the creation of SecureFiles and generates an error if the SECUREFILE option is
specified to create the LOB.
D. It ignores the SECUREFILE option only if a Manual Segment Space Management tablespace is used
and creates a BasicFile.
Answer: A
SecureFile功能是oracle 11g中对大对象(LOB)存储格式的完全重新设计实现,原来的LOB存储格式现在通称为BASICFILE,它仍然是默认的存储方法,但是SECURFILE关键字开启了新的存储方法,它允许加密、利用压缩节约空间和数据重复消除。
初始化参数
SecureFile功能在初始化参数COMPATIBLE设置11.0.0.0.0或更高时可用。
DB_SECUREFILE初始化参数控制数据库对LOB存储格式的默认行为,允许的值有:
◆ALWAYS - 在ASSM表空间中的所有LOB对象以SecureFile LOB的格式创建,在非ASSM表空间中的所有LOB对象以BasicFile LOB的格式创建(除非明确地指出要以SecureFile格式创建),在没有指定选项的情况下,BasicFile存储格式选项被忽略,SecureFile默认存储格式选项被使用。
◆ FORCE - 所有LOB对象都以SecureFile LOB格式创建,如果是在一个非ASSM表空间中创建LOB,会出现错误,在没有指定选项的情况下,BasicFile存储格式选项被忽略,SecureFile默认存储格式选项被使用。
◆PERMITTED - 默认设置,当使用了SECUREFILE关键字时它允许SecureFile LOB存储格>式,默认存储方法是BASICFILE。
◆NEVER - 不允许创建SecureFile LOB对象。
◆IGNORE - 防止创建SecureFile LOB,使用SecureFile存储选项时忽略所有错误。
这个参数是动态的,因此它可以使用ALTER SYSTEM命令设置。
例子:
SQL> ALTER SYSTEM SET db_securefile = 'FORCE';
SQL> ALTER SYSTEM SET db_securefile = 'PERMITTED';
下面的例子假设DB_SECUREFILE初始化参数设置为默认值PERMITTED。
创建SecureFile LOB
基础
SecureFile LOB通过在LOB存储子句后添加SECUREFILE关键字来创建,下面的代码显示创建了两个表,第一个使用的是原来的存储格式,第二个使用的是SecureFile存储格式。
CREATE TABLE bf_tab (
id NUMBER,
clob_data CLOB
)
LOB(clob_data) STORE AS BASICFILE;
INSERT INTO bf_tab VALUES (1, 'My CLOB data');
COMMIT;
CREATE TABLE sf_tab (
id NUMBER,
clob_data CLOB
)
LOB(clob_data) STORE AS SECUREFILE;
INSERT INTO sf_tab VALUES (1, 'My CLOB data');
COMMIT;
LOB重复消除
SecureFile的DEDUPLICATE选项允许在表或分区一级上的一个LOB内消除重复数据,正如你预料的那样,这个技术与预防重写导致系统开销增大,KEEP_DUPLICATE选项明确地阻止重复消除,下面的例子对比了普通的SecureFile和重复消除SecureFile的空间使用情况。
CREATE TABLE keep_duplicates_tab (
id NUMBER,
clob_data CLOB
)
LOB(clob_data) STORE AS SECUREFILE keepdup_lob(
KEEP_DUPLICATES
);
CREATE TABLE deduplicate_tab (
id NUMBER,
clob_data CLOB
)
LOB(clob_data) STORE AS SECUREFILE dedup_lob (
DEDUPLICATE
);
DECLARE
l_clob CLOB := RPAD('X', 10000, 'X');
BEGIN
FOR i IN 1 .. 1000 LOOP
INSERT INTO keep_duplicates_tab VALUES (i, l_clob);
END LOOP;
COMMIT;
FOR i IN 1 .. 1000 LOOP
INSERT INTO deduplicate_tab VALUES (i, l_clob);
END LOOP;
COMMIT;
END;
/
EXEC DBMS_STATS.gather_table_stats(USER, 'keep_duplicates_tab');
EXEC DBMS_STATS.gather_table_stats(USER, 'deduplicate_tab');
COLUMN segment_name FORMAT A30
SELECT segment_name, bytes
FROM user_segments
WHERE segment_name IN ('KEEPDUP_LOB', 'DEDUP_LOB');
SEGMENT_NAME BYTES
------------------------------ ----------
DEDUP_LOB 262144
KEEPDUP_LOB 19267584
2 rows selected.
SQL>
注意重复消除段要小很多,空间节约依赖于LOB段内的重复程度,重复模式可以使用ALTER TABLE命令进行重新设置。
keep_duplicates 不消除重复,deduplicate 消除重复
LOB_deduplicate_clause This clause is valid only for SecureFiles LOBs. KEEP_DUPLICATES disables LOB deduplication. DEDUPLICATE enables LOB deduplication. All lobs in the segment are read, and any matching LOBs are deduplicated before returning.
QUESTION 62
You are managing an Oracle Database 11g ASM instance with a disk group dg01 having three disks. One
of the disks in the disk group becomes unavailable because of power failure. You issued the following
command to change the DISK_REPAIR_TIME attribute from 3.6 hours to 5 hours:
ALTER DISKGROUP dg01 SET ATTRIBUTE 'disk_repair_time' = '5h';
To which disks in the disk group will the new value be applicable?
A. all disks in the disk group
B. all disks that are currently in OFFLINE mode
C. all disks that are not currently in OFFLINE mode
D. all disks in the disk group only if all of them are ONLINE
Answer: C
参考:http://docs.oracle.com/cd/E11882_01/server.112/e10803/config_storage.htm#HABPT4818
Set the DISK_REPAIR_TIME Disk Group Attribute Appropriately
The DISK_REPAIR_TIME disk group attribute specifies how long a disk remains offline before Oracle ASM drops the disk. If a disk is made available before theDISK_REPAIR_TIME parameter has expired, the storage administrator can issue the ONLINE DISK command and Oracle ASM resynchronizes the stale data from the mirror side. In Oracle Database 11g, the online disk operation does not restart if there is a failure of the instance on which the disk is running. You must reissue the command manually to bring the disk online.
You can set a disk repair time attribute on your disk group to specify how long disks remain offline before being dropped. The appropriate setting for your environment depends on how long you expect a typical transient type of failure to persist.
Set the DISK_REPAIR_TIME disk group attribute to the maximum amount of time before a disk is definitely considered to be out of service.>
QUESTION 63
You issued the following RMAN command to back up the database:
RMAN> RUN{
ALLOCATE CHANNEL c1
DEVICE TYPE sbt
BACKUP DATABASE
TAG quarterly
KEEP FOREVER
RESTORE POINT FY06Q4;}
Which two statements are true regarding the backup performed? (Choose two.)
A. Archived redo log files are backed up along with data files.
B. Only data files are backed up and a restore point named FY06Q4 is created.
C. Archived log files are backed up along with data files, and the archived log files are deleted.
D. The command creates a restore point named FY06Q4 to match the SCN at which this backup is
consistent.
Answer: AD
QUESTION 64
View the Exhibit to examine a portion of the output from the VALIDATE DATABASE command.
Which statement is true about the block corruption detected by the command?
A. No action is taken except the output in the Exhibit.
B. The corruption is repaired by the command implicitly.
C. The failure is logged(记录) into the Automatic Diagnostic Repository (ADR).
D. The ADVISE FAILURE command is automatically called to display the repair script.
Answer: C
QUESTION 65
Which two kinds of failures make the Data Recovery Advisor (DRA) generate a manual checklist? (Choose
two.)
A. failures because a data file is renamed by error
B. failures when no standby database is configured
C. failures that require no archive logs to be applied for recovery
D. failures due to loss of connectivity-for example, an unplugged disk cable
Answer: AD
QUESTION 66
Which two statements are true regarding the starting of the database instance using the following
command? (Choose two.)
SQL>STARTUP UPGRADE
A. It enables all system triggers.
B. It allows only SYSDBA connections.
C. It ensures that all job queues remain active during the upgrade process.
D. It sets system initialization parameters to specific values that are required to enable database upgrade
scripts to be run.
Answer: BD
QUESTION 67
Which statements are true regarding system-partitioned tables? (Choose all that apply.)
A. Only a single partitioning key column can be specified.
B. All DML statements must use partition-extended syntax.
C. The same physical attributes must be specified for each partition.
D. Unique local indexes cannot be created on a system-partitioned table.
E. Traditional partition pruning and partitionwise joins are not supported on these tables.
Answer: DE
从以下官方文档得知,ABC是错误的,D是正确的,排除法,选DE。
题问:哪一个是关于系统分区表的真实陈述?
A.只有一个分区键列可以被指定。System partitioning does not use partitioning keys。
B.所有DML语句必须使用分区扩展语法。错误。
Both INSERT and MERGE statements (not shown here) must use the partition extended syntax to identify the partition to which the row should be added.While delete and update operations do not require the partition extended syntax。
C.必须为每个分区指定同样的物理属性。错误。Each partition can have different physical attributes。
D.唯一本地索引不能在系统分区表上被创建。
E.传统的分区修剪和智能化分区连接不支持这些表。
QUESTION 68
The OPTIMIZER_USE_PLAN_BASELINES parameter is set to TRUE. The optimizer generates a plan for a
SQL statement but does not find a matching plan in the SQL plan baseline.
Which two operations are performed by the optimizer in this scenario? (Choose two.)
A. The optimizer adds the new plan to the plan history.
B. The optimizer selects the new plan for the execution of the SQL statement.
C. The optimizer adds the new plan to the SQL plan baseline as an accepted plan.
D. The optimizer adds the new plan to the SQL plan baseline but not in the ENABLED state.
E. The optimizer costs each of the accepted plans in the SQL plan baseline and picks the one with the
lowest cost.
Answer: AE
优化器捕获的plan不会直接进入baseline,而是进入plan history,只有当比较后cost最低的才会进入baseline
QUESTION 69
Which two statements about Oracle Direct Network File System (NFS) are true? (Choose two.)
A. It bypasses the OS file system cache.
B. A separate NFS interface is required for use across Linux, UNIX, and Windows platforms.
C. It uses the operating system kernel NFS layer for user tasks and network communication modules.
D. File systems need not be mounted by the kernel NFS system when being served through Direct NFS.
E. Oracle Disk Manager can manage NFS on its own, without using the operating system kernel NFS
driver.
Answer: AE
QUESTION 70
You are managing an Oracle Database 11g instance with ASM storage. You lost an ASM disk group DATA.
You have RMAN backup of data as well as ASM metadata backup. You want to re-create the missing disk
group by using the ASMCMD md_restore command. Which of these methods would you use to achieve
this? (Choose all that apply.)
A. Restore metadata in an existing disk group by passing the existing disk group name as an input
parameter.
B. Restore the disk group with changed disk group specification, failure group specification, disk group
name, and other disk attributes.
C. Restore the disk group with the exact configuration as the backed-up disk group, using the same disk
group name, same set of disks, and failure group configurations.
D. Restore the disk group with the exact configuration as the backed-up disk group, using the same disk
group name, same set of disks, failure group configurations, and data on the disk group.