首页 技术 正文
技术 2022年11月15日
0 收藏 805 点赞 3,717 浏览 51323 个字

QUESTION 13

View the Exhibit.
1Z0-050
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以后可以让你将多个依赖程度很高列合并成一个组,然后对该组收集统计信息。具体如何实现,则可以看下面的例子。

  1. 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视图来查看列组合的统计信息。

  1. exec dbms_stats.gather_table_stats('Schema_name','Table_name');

如果你要对组合列收集直方图,则可以如下所示:

  1. exec dbms_stats.gather_table_stats('Schema_name','Table_name',
  2. method_opt=>'for columns (C1,C2) size AUTO');

参考:050解析

QUESTION 14

View the Exhibit to examine the parameter values.
1Z0-050
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

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:

  1. RMAN> CONNECT target sys/sys@APPPROD
  2. RMAN> DUPLICATE TARGET DATABASE
  3. TO dupdb
  4. FROM ACTIVE DATABASE
  5. DB_FILE_NAME_CONVERT '/oracle/oradata/prod/',
  6. '/scratch/oracle/oradata/dupdb/'
  7. SPILE
  8. PARAMETER_VALUE_CONVERT '/oracle/oradata/prod/',
  9. '/scratch/oracle/oradata/dupdb/'
  10. SET SGA_MAX_SIZE = '300M'
  11. SET SGA_TARGET = '250M'
  12. 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.

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 information

LONGP_POLICY默认值是8760小时,即365天,1年,其控制如下三种文件的保留时间:

(1) Incident information
(2) Incident dumps
(3) Alert logs

修改ADR的保留策略:

  1. adrci> set control (SHORTP_POLICY = 360)
  2. adrci> set control (LONGP_POLICY = 2160)
  3. adrci> show control
  4. ADR Home =/u01/app/oracle/diag/rdbms/dave/dave:
  5. *************************************************************************
  6. ADRID SHORTP_POLICY LONGP_POLICY
  7. -------------------- ----------------------------------------
  8. 3642307927 360 2160
  9. 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:

  1. SQL>CREATE TABLESPACE securespace
  2. DATAFILE '/home/user/oradata/secure01.dbf'
  3. SIZE 150M
  4. ENCRYPTION USING '3DES168'
  5. 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,则加密列不可访问:

  1. SQL> select * from eygle.tde;
  2. select * from eygle.tde
  3. *
  4. ERROR at line 1:
  5. ORA-28365: wallet is not open
  6. SQL> alter system set encryption wallet close identified by "eygle";
  7. System altered.
  8. SQL> select * from eygle.tde;
  9. select * from eygle.tde
  10. *
  11. ERROR at line 1:
  12. ORA-28365: wallet is not open
  13. SQL> desc eygle.tde
  14. Name Null? Type
  15. ----------------------------------------------------------------- -------- -------------------------------
  16. ID NUMBER(10)
  17. DATA VARCHAR2(50) ENCRYPT
  18. SQL> select id from eygle.tde;
  19. ID
  20. ----------
  21. 0
  22. 5
  23. 34
  24. 9
  25. 31
  26. 30
  27. 32
  28. 14
  29. 21
  30. 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 页面

http://blog.csdn.net/rlhua/article/details/16574625

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#ADFNS1010

Configuring 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 并行备份和还原 在备份单一大型数据文件时,现在可以使用多个并行服务器进程和“通道”来有效地分配工作量。这种使用多个部分的方法改善了备份的性能。
1Z0-050
使用 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:

  1. SQL> ALTER SESSION SET OPTIMIZER_USE_PENDING_STATISTICS = false;
  2. SQL> EXECUTE DBMS_STATS.SET_TABLE_PREFS('SH', 'CUSTOMERS', 'PUBLISH','false');
  3. SQL> EXECUTE
  4. 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开始,可以使用下面类型的操作来收集优化器统计信息:

  1. 自动发布收集的统计信息在收集操作结束以后(默认选项publish)
  2. 保存新的统计信息,并且待定(暂不发布pending)
    这个特性可以将新收集的统计信息置为待定状态,所以可以先验证新统计信息的有效性然后再发布。

参考:http://blog.csdn.net/renfengjun/article/details/8204228

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.
1Z0-050
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.
1Z0-050
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、首先来看下各个文件的位置。

  1. sys@TEST0910> select FILE_ID,FILE_NAME,TABLESPACE_NAME from dba_data_files;
  2. FILE_ID FILE_NAME TABLESPACE_NAME
  3. ---------- -------------------------------------------------- ------------------------------
  4. 4 /u01/app/oracle/oradata/test0910/users01.dbf USERS
  5. 3 /u01/app/oracle/oradata/test0910/undotbs01.dbf UNDOTBS1
  6. 2 /u01/app/oracle/oradata/test0910/sysaux01.dbf SYSAUX
  7. 1 /u01/app/oracle/oradata/test0910/system01.dbf SYSTEM
  8. 5 /u01/app/oracle/oradata/test0910/example01.dbf EXAMPLE

2、先用rman备份users表空间,用作恢复。

  1. RMAN> backup tablespace users;
  2. Starting backup at 13-SEP-13
  3. using target database control file instead of recovery catalog
  4. allocated channel: ORA_DISK_1
  5. channel ORA_DISK_1: SID=67 device type=DISK
  6. channel ORA_DISK_1: starting full datafile backup set
  7. channel ORA_DISK_1: specifying datafile(s) in backup set
  8. input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf
  9. channel ORA_DISK_1: starting piece 1 at 13-SEP-13
  10. channel ORA_DISK_1: finished piece 1 at 13-SEP-13
  11. piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_13/o1_mf_nnndf_TAG20130913T111426_936byprm_.bkp tag=TAG20130913T111426 comment=NONE
  12. channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
  13. Finished backup at 13-SEP-13

3、操作系统删除users.dbf文件

  1. [oracle@rtest ~]$ rm -rf /u01/app/oracle/oradata/test0910/users01.dbf
  2. [oracle@rtest ~]$ ls /u01/app/oracle/oradata/test0910/users01.dbf
  3. ls: /u01/app/oracle/oradata/test0910/users01.dbf: No such file or directory

4、shutdown abort模拟数据库宕机并startup,发现错误与题目一样

  1. sys@TEST0910> shutdown abort;
  2. ORACLE instance shut down.
  3. sys@TEST0910> startup
  4. ORACLE instance started.
  5. Total System Global Area 2505338880 bytes
  6. Fixed Size 2230952 bytes
  7. Variable Size 553649496 bytes
  8. Database Buffers 1929379840 bytes
  9. Redo Buffers 20078592 bytes
  10. Database mounted.
  11. ORA-01157: cannot identify/lock data file 4 - see DBWR trace file
  12. ORA-01110: data file 4: '/u01/app/oracle/oradata/test0910/users01.dbf'

5、进入rman,修复失败。

  1. RMAN> repair failure ;
  2. using target database control file instead of recovery catalog
  3. RMAN-00571: ===========================================================
  4. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  5. RMAN-00571: ===========================================================
  6. RMAN-03002: failure of repair command at 09/13/2013 11:20:04
  7. 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命令。

  1. RMAN> advise failure;
  2. RMAN-00571: ===========================================================
  3. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  4. RMAN-00571: ===========================================================
  5. RMAN-03002: failure of advise command at 09/13/2013 11:20:59
  6. RMAN-07211: failure option not specified

为什么也报错呢?原因为在advise failure之前,要先运行list failure,列出所要修复的错误,所以先list failure。
7、运行LIST–>ADVISE–>REPAIR 命令

  1. RMAN> list failure;
  2. List of Database Failures
  3. =========================
  4. Failure ID Priority Status Time Detected Summary
  5. ---------- -------- --------- ------------- -------
  6. 122 HIGH OPEN 13-SEP-13 One or more non-system datafiles are missing
  7. RMAN> advise failure;
  8. List of Database Failures
  9. =========================
  10. Failure ID Priority Status Time Detected Summary
  11. ---------- -------- --------- ------------- -------
  12. 122 HIGH OPEN 13-SEP-13 One or more non-system datafiles are missing
  13. analyzing automatic repair options; this may take some time
  14. allocated channel: ORA_DISK_1
  15. channel ORA_DISK_1: SID=189 device type=DISK
  16. analyzing automatic repair options complete
  17. Mandatory Manual Actions
  18. ========================
  19. no manual actions available
  20. Optional Manual Actions
  21. =======================
  22. 1\. If file /u01/app/oracle/oradata/test0910/users01.dbf was unintentionally renamed or moved, restore it
  23. Automated Repair Options
  24. ========================
  25. Option Repair Description
  26. ------ ------------------
  27. 1 Restore and recover datafile 4
  28. Strategy: The repair includes complete media recovery with no data loss
  29. Repair script: /u01/app/oracle/diag/rdbms/test0910/test0910/hm/reco_3910127882.hm

advise failure命令对记录在自动诊断信息库中的所有故障给出建议。默认时,此命令只列出具有critical或high优先级的那些故障。除了产生所有输入故障的摘要外,此命令还对每个故障提供一个建议修复选项。通常,advise failure命令同时给出自动和手动修复选项。在advisefailure命令输出结束时,RMAN生成一个脚本,列出建议的修复选项的细节。如果你想自己进行修复,可以直接使用这个脚本,或者对它进行修改。

  1. RMAN> repair failure;
  2. Strategy: The repair includes complete media recovery with no data loss
  3. Repair script: /u01/app/oracle/diag/rdbms/test0910/test0910/hm/reco_3910127882.hm
  4. contents of repair script:
  5. # restore and recover datafile
  6. restore datafile 4;
  7. recover datafile 4;
  8. sql 'alter database datafile 4 online';
  9. Do you really want to execute the above repair (enter YES or NO)? Y
  10. executing repair script
  11. Starting restore at 13-SEP-13
  12. using channel ORA_DISK_1
  13. channel ORA_DISK_1: starting datafile backup set restore
  14. channel ORA_DISK_1: specifying datafile(s) to restore from backup set
  15. channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test0910/users01.dbf
  16. 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
  17. 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
  18. channel ORA_DISK_1: restored backup piece 1
  19. channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
  20. Finished restore at 13-SEP-13
  21. Starting recover at 13-SEP-13
  22. using channel ORA_DISK_1
  23. starting media recovery
  24. media recovery complete, elapsed time: 00:00:09
  25. Finished recover at 13-SEP-13
  26. sql statement: alter database datafile 4 online
  27. repair failure complete
  28. Do you want to open the database (enter YES or NO)? YES
  29. 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 这个过程的作用是创建一个对指定类型做报告限制的指令

参考:http://blog.csdn.net/rlhua/article/details/16856177

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:

  1. BEGIN
  2. dbms_advisor.create_task(dbms_advisor.sqlaccess_advisor,'TASK1'); END;
  3. /
  4. BEGIN
  5. dbms_advisor.set_task_parameter('TASK1','ANALYSIS_SCOPE','ALL'); dbms_advisor.set_task_parameter('TASK1','MODE','COMPREHENSIVE'); END;
  6. /
  7. BEGIN
  8. dbms_advisor.execute_task('TASK1');
  9. dbms_output.put_line(dbms_advisor.get_task_script('TASK1')); END;
  10. /

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:

  1. CREATE TABLE purchase_interval
  2. PARTITION BY RANGE (time_id)
  3. INTERVAL (NUMTOYMINTERVAL(1,'month')) STORE IN (tbs1,tbs2,tbs3) (
  4. PARTITION p1 VALUES LESS THAN(TO_DATE('1-1-2005', 'dd-mm-yyyy')), PARTITION p2 VALUES
  5. LESS THAN(TO_DATE('1-1-2007', 'dd-mm-yyyy'))) AS
  6. SELECT *
  7. FROM purchases
  8. 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;
1Z0-050
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

实验验证:

  1. sys@TEST1107> VAR tname VARCHAR2(60);
  2. sys@TEST1107> BEGIN :tname := 'my_instance_analysis_mode_task';
  3. 2 DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,'Sg_directive','SCOTT');
  4. 3 END;
  5. 4 /
  6. PL/SQL procedure successfully completed.
  7. sys@TEST1107> SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;
  8. ERROR:
  9. ORA-13631: The most recent execution of task my_instance_analysis_mode_task contains no results.
  10. ORA-06512: at "SYS.PRVT_ADVISOR", line 3189
  11. ORA-06512: at "SYS.DBMS_ADVISOR", line 590
  12. ORA-06512: at line 1
  13. no rows selected

DBMS_ADDM.ANALYZE_INST缺少分析,会报错。
1Z0-050
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.

  1. var tname VARCHAR2(60);
  2. BEGIN
  3. DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(NULL,
  4. 'my Segment directive',
  5. 'SCOTT');
  6. :tname := 'my_instance_analysis_mode_task';
  7. DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);
  8. END;

To see a report containing all actions regardless of the directive:

  1. 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.
1Z0-050
View the Exhibit exhibit2 to examine the output of the query.
1Z0-050
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:

  1. CREATE TABLE purchase_orders
  2. (po_id NUMBER(4),
  3. po_date TIMESTAMP,
  4. supplier_id NUMBER(6),
  5. po_total NUMBER(8,2),
  6. CONSTRAINT order_pk PRIMARY KEY(po_id))
  7. PARTITION BY RANGE(po_date)
  8. (PARTITION Q1 VALUES LESS THAN (TO_DATE(?1-apr-2007?d-mon-yyyy?), PARTITION Q2 VALUES
  9. LESS THAN (TO_DATE(?1-jul-2007?d-mon-yyyy?), PARTITION Q3 VALUES LESS THAN (TO_DATE(?1-
  10. oct -2007?d-mon-yyyy?), PARTITION Q4 VALUES LESS THAN (TO_DATE(?1-jan-2008?d-mon-yyyy?));
  1. CREATE TABLE purchase_order_items
  2. (po_id NUMBER(4) NOT NULL,
  3. product_id NUMBER(6) NOT NULL,
  4. unit_price NUMBER(8,2),
  5. quantity NUMBER(8),
  6. CONSTRAINT po_items_fk
  7. FOREIGN KEY (po_id) REFERENCES purchase_orders(po_id)) PARTITION BY REFERENCE
  8. (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.
1Z0-050
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

http://blog.csdn.net/jgmydsai/article/details/37650647

QUESTION 57

View the Exhibit to observe the error.
1Z0-050
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 启动的,所有实例只需要一个ABPMMON进程将监视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.
1Z0-050
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存储格式。

  1.   CREATE TABLE bf_tab (
  2.   id NUMBER,
  3.   clob_data CLOB
  4.   )
  5.   LOB(clob_data) STORE AS BASICFILE;
  6.   INSERT INTO bf_tab VALUES (1, 'My CLOB data');
  7.   COMMIT;
  8.   CREATE TABLE sf_tab (
  9.   id NUMBER,
  10.   clob_data CLOB
  11.   )
  12.   LOB(clob_data) STORE AS SECUREFILE;
  13.   INSERT INTO sf_tab VALUES (1, 'My CLOB data');
  14.   COMMIT;

LOB重复消除

  SecureFile的DEDUPLICATE选项允许在表或分区一级上的一个LOB内消除重复数据,正如你预料的那样,这个技术与预防重写导致系统开销增大,KEEP_DUPLICATE选项明确地阻止重复消除,下面的例子对比了普通的SecureFile和重复消除SecureFile的空间使用情况。

  1.   CREATE TABLE keep_duplicates_tab (
  2.   id NUMBER,
  3.   clob_data CLOB
  4.   )
  5.   LOB(clob_data) STORE AS SECUREFILE keepdup_lob(
  6.   KEEP_DUPLICATES
  7.   );
  8.   CREATE TABLE deduplicate_tab (
  9.   id NUMBER,
  10.   clob_data CLOB
  11.   )
  12.   LOB(clob_data) STORE AS SECUREFILE dedup_lob (
  13.   DEDUPLICATE
  14.   );
  15.   DECLARE
  16.   l_clob CLOB := RPAD('X', 10000, 'X');
  17.   BEGIN
  18.   FOR i IN 1 .. 1000 LOOP
  19.  INSERT INTO keep_duplicates_tab VALUES (i, l_clob);
  20.   END LOOP;
  21.   COMMIT;
  22.   FOR i IN 1 .. 1000 LOOP
  23.   INSERT INTO deduplicate_tab VALUES (i, l_clob);
  24.   END LOOP;
  25.   COMMIT;
  26.   END;
  27.   /
  28.   EXEC DBMS_STATS.gather_table_stats(USER, 'keep_duplicates_tab');
  29.   EXEC DBMS_STATS.gather_table_stats(USER, 'deduplicate_tab');
  30.   COLUMN segment_name FORMAT A30
  31.   SELECT segment_name, bytes
  32.   FROM user_segments
  33.   WHERE segment_name IN ('KEEPDUP_LOB', 'DEDUP_LOB');
  34.   SEGMENT_NAME BYTES
  35.   ------------------------------ ----------
  36.   DEDUP_LOB 262144
  37.   KEEPDUP_LOB 19267584
  38.   2 rows selected.
  39.   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.
1Z0-050
1Z0-050
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.

Answer: ABC

来自为知笔记(Wiz)

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,104
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,581
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,428
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,835
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,918