成都银河教育中心
您现在的位置: 成都银河教育中心 > OCP课程 > 焦点问答 > 正文
 OCP真题解析
来源:精英银河教育 人气:
上一篇→ 下一篇→没有了

 

You are working on a new OracleDatabase 11g server, where only the software is installed and no database iscreated. You plan to create a database on this server using the DatabaseConfiguration Assistant (DBCA).

Some of the requirements set foryour database creation task are:

1. Configure the database tooperate in shared server mode.

2. Disable automatic maintenancetasks such as optimizer statistics collection.

3. Configure a naming method tohelp the remote user connect to the database instance.

4. Use Automatic StorageManagement (ASM) for storing the database files.

5. Configure daily database backupto flash recovery area.

6. Configure Enterprise ManagerDatabase Control to manage the database.

Which of these requirements canbe met while creating the database?

A. 4 and 6

B. 2, 3, 4, and 6

C. 1, 2, 4, 5,and 6

D. 1, 2, 3, 4, 5, and 6

Correct Answer: C

【考点分析】DBCA建库过程

【题意简述】题目中列出的一些任务,哪些可以在DBCA建库过程中配置?

【原理概念】

DBCA建库过程:

(1)Database Configuration Assistant:Welcome 欢迎页面

(2)Operations选择Create a Database

(3)Database Templates 选择General Purpose or Transaction Processing

(4)Database Identification 填写Global Database Name和SID

(5) Management Options 选择Enterprise Manager和Automatic Maintenance Tasks

(6)Database Credentials 填写密码

(7)Network Configuration 选择监听器

(8)Database File Locations 选择文件存储位置ASM或文件系统

(9)Recovery Configuration是否配置快速恢复区和归档模式

(10)Database Content 是否创建样例用户Sample Schemas

(11)Initialization Parameters 包括Memory,Sizing,Character Sets,Connection配置

(12)password manage 用户密码配置

QUESTION 96

Examine the following output:

Which two statements about theabove index are true? (Choose two.)

A. It is ignoredby the query optimizer.

B. It is notused while the index is being rebuilt.

C. The index cannot be rebuilt,and has to be re-created.

D. The index is automaticallyrebuilt when used the next time.

Correct Answer: AB

【考点分析】失效索引

【题意简述】关于失效索引描述正确的是?

【原理概念】

DBA_INDEXES中的STATUS表示索引状态,UNUSABLE代表索引不可用

STATUS Indicates whether a nonpartitioned index is VALID or UNUSABLE

UNUSABLE

When an index in the UNUSABLE state,it is ignored by the optimizer and is not maintained by DML.An unusable index must be rebuilt, or dropped and re-created, before it can be used.

【实验参考】

[oracle@enmoedu ~]$ sqlplus enmoedu/enmoedu

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jan 31 13:56:25 2015

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

ENMOEDU@ENMOEDU> create table t_objs as select * from all_objects;

Table created.

ENMOEDU@ENMOEDU> create index EIND on t_objs(object_id);

Index created.

ENMOEDU@ENMOEDU> select count(*) from t_objs;

COUNT(*)

----------

56386

ENMOEDU@ENMOEDU> select index_name, status from user_indexes where index_name = 'EIND';

INDEX_NAME STATUS

------------------------------ --------

EIND VALID

ENMOEDU@ENMOEDU> set autotrace on explain

ENMOEDU@ENMOEDU> set lin 160 pages 1000

ENMOEDU@ENMOEDU> select object_id, object_name from t_objs where object_id = 76832;

OBJECT_ID OBJECT_NAME

---------- ------------------------------

76832 TEST

Execution Plan

----------------------------------------------------------

Plan hash value: 1287883499

-------------------------------------------------------------------------------

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

---------------------------------------------------------------------------

| 0 | SELECT STATEMENT | | 1 | 30 | 2 (0)| 00:00:01 |

| 1 | TABLE ACCESS BY INDEX ROWID| T_OBJS | 1 | 30 | 2 (0)| 00:00:01 |

|* 2 | INDEX RANGE SCAN | EIND | 1 | | (0)| 00:00:01

-------------------------------------------------------------------------------

Predicate Information (identified by operation id):

---------------------------------------------------

2 - access("OBJECT_ID"=76832)

Note

-----

- dynamic sampling used for this statement (level=2)

ENMOEDU@ENMOEDU> alter index EIND unusable;

Index altered.

ENMOEDU@ENMOEDU> select index_name, status from user_indexes

where index_name = 'EIND';

INDEX_NAME STATUS

------------------------------ --------

EIND UNUSABLE

ENMOEDU@ENMOEDU> select object_id, object_name from t_objs where object_id = 76832;

OBJECT_ID OBJECT_NAME

---------- ------------------------------

76832 TEST

Execution Plan

----------------------------------------------------------

Plan hash value: 2166726803

----------------------------------------------------------------------------

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

----------------------------------------------------------------------------

| 0 | SELECT STATEMENT | | 9 | 270 | 229 (1)| 00:00:03 |

|* 1 | TABLE ACCESS FULL | T_OBJS | 9 | 270 | 229 (1)| 00:00:03 |

----------------------------------------------------------------------------

Predicate Information (identified by operation id):

---------------------------------------------------

1 - filter("OBJECT_ID"=76832)

Note

-----

- dynamic sampling used for this statement (level=2)

ENMOEDU@ENMOEDU> alter index EIND rebuild online;

Index altered.

ENMOEDU@ENMOEDU> select index_name, status from user_indexes where index_name = 'EIND';

INDEX_NAME STATUS

------------------------------ --------

EIND VALID

ENMOEDU@ENMOEDU> select object_id, object_name from t_objs where object_id = 76832;

OBJECT_ID OBJECT_NAME

---------- ------------------------------

76832 TEST

Execution Plan

----------------------------------------------------------

Plan hash value: 1287883499

-------------------------------------------------------------------------------

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

----------------------------------------------- ------------------------------------------------------------------------------

| 0 | SELECT STATEMENT | | 1 | 30 | 2 (0)| 00:00:01 |

| 1 | TABLE ACCESS BY INDEX ROWID| T_OBJS | 1 | 30 | 2 (0)| 00:00:01 |

|* 2 | INDEX RANGE SCAN | EIND | 1 | | 1 (0)| 00:00:01

-------------------------------------------------------------------------------

Predicate Information (identified by operation id):

---------------------------------------------------

2 - access("OBJECT_ID"=76832)

Note

-----

- dynamic sampling used for this statement (level=2)

ENMOEDU@ENMOEDU>

【答案剖析】

A: 正确,失效索引会被优化器忽略

B: 正确,索引在rebuilt过程中不能使用

C: 错误,索引可以rebuilt

D: 错误,索引不会自动rebuilt

 

上一篇→ 下一篇→没有了
发表评论
网名: * 打分: 1分 2分 3分 4分 5分
评论:
验证码: *