1Z0-050习题解析(1-10)

QUESTION 1

Identify the two direct sources from where SQL plans can be loaded into the SQL plan baselines. (Choose two.)
A. Cursor cache
B. Stored outline
C. SQL Tuning Set

D. Automatic Workload Repository (AWR) snapshots
Answer: AC

解析: AWR snapshot 需要先导入到sql tuning set;
To load plans from a SQL tuning set, use the LOAD_PLANS_FROM_SQLSET function of the DBMS_SPM package. To load plans from Automatic Workload Repository (AWR), load the plans stored in AWR snapshots into a SQL tuning set before using the LOAD_PLANS_FROM_SQLSET function as described in this section. To load plans from the shared SQL area, use the LOAD_PLANS_FROM_CURSOR_CACHE function of the DBMS_SPM package.

QUESTION 2

Which two statements about workload capture and replay operations are true? (Choose two.)
A. The clients must be created manually on the test machines to perform more realistic testing.
B. Restart the database in RESTRICTED mode before beginning workload replay to enable a clean state for workload replay.
C. Restart the database in RESTRICTED mode before beginning workload capture to enable a clean state for capturing the workload.
D. The application state of the capture system must be identical to the application state of the replay system when the workload replay begins.

Answer: CD

参考

QUESTION 3

View the Exhibit exhibit1 to examine the series of SQL commands

Paste_Image.png

View the Exhibit exhibit2 to examine the plans available in the SQL plan baseline.

Paste_Image.png

The baseline in the first row of the Exhibit is created when OPTIMIZER_MODE was set to FIRST_ROWS.
Which statement is true if the SQL query in exhibit1 is executed again when the value of
OPTIMIZER_MODE is set to FIRST_ROWS?
A. The optimizer uses a new plan because none of the plans in the exhibit2 are fixed plans.
B. The optimizer uses the plan in the second row of the exhibit2 because it is an accepted plan.
C. The optimizer uses the plan in the first row of the exhibit2 because it is the latest generated plan.
D. The optimizer uses the plan in the first row of the exhibit2 because OPTIMIZER_MODE was set to
FIRST_ROW during its creation.
Answer: B

解析:Oracle 在执行SQL语句时,有两种优化方法:即基于规则的RBO和基于代价的CBO。 在SQL执教的时候,到底采用何种优化方法,就由Oracle参数 optimizer_mode 来决定。

SQL> show parameter optimizer_mode
NAME                                  TYPE         VALUE
 ------------------------------------ ----------- -----------------------------
 optimizer_mode                        string       CHOOSE

optimizer_mode 参数值共有以下四个:
第一:CHOOSE
这个是Oracle的默认值。采用这个值时,Oracle即可以采用基于规则RBO,也可以采用基于代价的CBO,到底使用那个值,取决于当前SQL的被访问的表中是不是有可以使用的统计信息。
如果有多个被访问的表,其中有一个或多个有统计信息,那么Oralce会对没有统计信息的表进行采样统计(即不全部采样),统计完成后,使用基于代价的优化方法CBO。
如果所有被访问的表都没有统计信息,Oracle就会采用基于规则的优化方法RBO。
第二:ALL_ROWS
不管是不是有统计信息,全部采用基于成本的优化方法CBO。
第三:FIRST_ROWS_n
FIRST_ROWS_n后面的n值可以为1,100,1000
不管是不是有统计信息,全部采用基于成本的优化方法CBO,并以最快的速度,返回前N行记录。
第四:FIRST_ROWS
使用成本和试探法相结合的方法,查找一种可以最快返回前面少数行的方法;这个参数主要用于向后兼容。
第五:RULE
这个参数正好和ALL_ROWS相反,不管是不是统计信息,全部采用基于规则的优化方法。
如何更改 optimizer_mode 的参数呢?可以用以下的方法。

SQL> alter session set optimizer_mode='RULE';
会话已更改。

参考oracle 11g新特性之执行计划管理

QUESTION 4

Which statement describes the effect of table redefinition on the triggers attached to the table?
A. All triggers on the table remain valid.
B. All triggers on the table are invalidated and are automatically revalidated with the next DML execution on
the table.
C. All triggers on the table are invalidated and must be manually recompiled before the next DML execution
on the table.
D. Only triggers that are affected by the changes to the structure of the table are invalidated and
automatically revalidated with the next DML execution on the table.
Answer: B

参考

  1. OCP 1Z0 053 109
  2. 在线重定义表

QUESTION 5

USER_DATA is a nonencrypted tablespace that contains a set of tables with data. You want to convert all existing data in the USER_DATA tablespace and the new data into the encrypted format. Which methods would you use to achieve this? (Choose all that apply.)
A. Use Data Pump to transfer the existing data to a new encrypted tablespace.
B. Use ALTER TABLE..MOVE to transfer the existing data to a new encrypted tablespace.
C. Use CREATE TABLE AS SELECT to transfer the existing data to a new encrypted tablespace.
D. Enable row movement for each table to be encrypted and then use ALTER TABLESPACE to encrypt the tablespace.
E. Encrypt the USER_DATA tablespace using the ALTER TABLESPACE statement so that all the data in the tablespace is automatically encrypted.
Answer: ABC

QUESTION 6

Evaluate the following block of code:

BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (acl => 'mycompany-com-permissions.xml',
principal => 'ACCT_MGR',
is_grant => TRUE,
privilege => 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (acl => 'mycompany-com-permissions.xml',
host => '*.mycompany.com');
END;

What is the outcome of the above code?
A. It produces an error because a fully qualified host name needs to be specified.
B. It produces an error because the range of ports associated with the hosts has not been specified.
C. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT and RESOLVE privileges.
D. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT privilege but not the RESOLVE privilege.

Answer: C

参考:http://blog.csdn.net/rlhua/article/details/15029727
创建访问控制列表(ACL)。
ACL 是在XML 文件中保存的用户和权限的列表。以acl参数命名的XML 文档与XML DB中的/sys/acl/文件夹相关。在题中例中,ACCT_MGR被授予connect权限。ACL 中的用户名区分大小写,而且必须与会话的用户名相匹配。只有resolve和connect权限,connect权限包含resolve权限。可选参数可以指定这些权限的开始和结束时间戳。要将更多用户和权限添加到此ACL 中,可使用ADD_PRIVILEGE过程。

QUESTION 7

Which steps are mandatory to enable Direct NFS?
Mount all required file systems using the kernel NFS driver.
Create an oranfstab file containing the attributes for each NFS server to be accessed using Direct NFS.
Replace the ODM library libodm11.so_stub with libodm11.so. A. 2 and 3
B. 1 and 3
C. 1 and 2
D. 1, 2 and 3

Answer: B

解析:
参考:http://czmmiao.iteye.com/blog/1965839
Enabling Direct NFS
You must follow these steps to enable Direct NFS:

  1. You must mount all NFS mount points with your kernel NFS client. You must make sure you mount any file systems you plan on using through ODM NFS and make the file systems available to Oracle over regular NFS mounts.
  2. If you want to specify Oracle-specific options to Direct NFS, you’ll need an oranfstab file. This is an optional step. The oranfstab file must have the following attributes so the database can access all NFS servers through Direct NFS:
  3. You must replace the standard ODM library, libnfsodm10.so, with the ODM NFS library, as shown here:
    $ cd $ORACLE_HOME/lib
    $ cp libodmll.so libodmll.so_stub
    $ ln -s libnfsodm11.so libodm11.so
    You can disable the Direct NFS client by using any of the following three methods.
    Delete the oranfstab file.
    Replace the ODM NFS library with the stub libodm11.so file.
    Modify the oranfstab file by deleting the specific NFS server or the network paths to the NFS server.
    If the database can’t open the NFS server using Direct NFS, it will use the operating system kernel client instead.

QUESTION 8

Which statements are true regarding the concept of problems and incidents in the fault diagnosability infrastructure for Oracle Database 11g? (Choose all that apply.)
A. The problem key is the same as the incident number.
B. Every problem has a problem key, which is a text string that describes the problem.
C. The database makes an entry into the alert log file when problems and incidents occur.
D. The database sends an incident alert to the Oracle Enterprise Manager Database Home page.
E. Only the incident metadata and dumps are stored in the Automatic Diagnostic Repository (ADR).

Answer: BCD

解析:
http://docs.oracle.com/cd/B28359_01/server.111/b28310/diag001.htm#ADMIN11008

QUESTION 9

You are managing an Oracle Database 11g database. You want to take a backup on tape drives of the USERS tablespace that has a single data file of 900 MB. You have tape drives of 300 MB each. To accomplish the backup, you issued the following RMAN command:

RMAN>BACKUP 
SECTION SIZE 300M 
TABLESPACE users; 

What configuration should be effected to accomplish faster and optimized backups by using the above command?
A. The SBT channel must be configured, with the MAXPIECESIZE set to 300 MB.
B. The SBT channel must be configured, with the parallelism(平行) setting for the SBT device set to 3.
C. The COMPATIBLE initialization parameter for the database instance must be set to at least 10.0.
D. The SBT channel must be configured, with the default parallelism setting for the SBT device set to 1.

Answer: B

解析:
参考:

  1. 官方文档说明
  2. Oracle 11g New 使用RMAN 增强功能

根据Note: You cannot use SECTION SIZE with MAXPIECESIZE or with INCREMENTAL LEVEL 1.这句话,说明A错误

根据RMAN channels can process each step independently and in parallel,应该选择B,可以并行备份。

Oracle 数据文件最大为128 TB。
在以前的版本中,RMAN 备份的最小单位是整个文件。这对于如此大的文件不适用。在Oracle Database 11g中,将在多个并行服务器进程之间分配各个文件的工作量。如果指定了SECTION SIZE选项,则RMAN 可以将一个大文件分解为多个部分,然后独立备份和还原这些部分。
换句话说,RMAN 可以对每个文件使用多个通道。每个通道备份一个文件部分。每个文件部分都是文件中一系列连续的块。可按串行或并行方式独立处理每个文件部分。以多个单独部分的形式备份文件,既可以提高性能又可以重新启动大型文件备份。多部分备份作业可生成一个多片段备份集。每个片段都包含一个文件部分。多部分备份的所有部分的大小都相同(最后一部分可能除外)。每个文件最多有256 个部分。提示:在备份驻留在少量磁盘上的大型文件时,不宜使用很高的并行度。此功能已内置到RMAN 中。除Oracle Database 11g的常规安装外,不需要其它安装。因为早期版本无法还原多部分备份,所以必须至少将COMPATIBLE设置为11.0。

Paste_Image.png

QUESTION 10

When executing a SQL workload, you choose to generate execution plans only, without collecting execution statistics.
Which two statements describe the implications of this? (Choose two.)
A. It produces less accurate results of the comparison analysis.
B. It automatically calls the SQL Tuning Advisor for recommendations.
C. It shortens the time of execution and reduces the impact on system resources.
D. Only the changes in the execution plan, and not performance regression, are detected.

Answer: AC

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,053评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,527评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,779评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,685评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,699评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,609评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,989评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,654评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,890评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,634评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,716评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,394评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,976评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,950评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,191评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,849评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,458评论 2 342

推荐阅读更多精彩内容

  • 一、源题QUESTION 36Your database is open and the LISTENER lis...
    猫猫_tomluo阅读 1,209评论 0 2
  • 大千世界大舞台 芸芸众生演戏来 自己的剧本自己编 自己的角色自安排 是否出彩靠自己 同台的缘份要珍爱 相互合作灵犀...
    风起龙飞阅读 391评论 6 7
  • 以前觉得自己接受不了爱情降温的落差 那就应该在最开始的时候不要那么灼热 因为一切总会归于平淡被鸡毛蒜皮和事无巨细淹...
    萱萱_萱阅读 430评论 0 3