oracle11g OCP 认证 1Z0-053考试笔记3

202.In which two aspects 方面 does hot patching 热补丁differ from conventional常规的 patching? (Choose two.) A. It consumes more memory compared with conventional patching 与常规补丁比较消耗更多的内存 D. It does not require down time to apply or remove unlike conventional patching. 不须要停机时间 Answer: AD 常规补丁和热补丁 常规补丁基本上要求关闭数据库实例。 热补丁不须要任何停机时间。在安装热补丁时,应用程序能够继续运行。一样的,无需停机即可卸载已安装的热补丁程序 常规补丁程序和热补丁程序 热补丁注意事项 • 可能不是全部平台上都有热补丁程序。当前在如下平台上有热补丁程序: – Linux x86  – Linux x86-64  – Solaris SPARC64  • 要消耗一些额外的内存。 – 确切的内存数取决于: — 补丁程序的大小 — 当前运行的Oracle 进程数 – 最小内存数:每一个Oracle 进程大约占一个OS 页面 203.Which statement about the enabling of table compression in Oracle Database 11g is true? D. Compression can be enabled at the table, tablespace, or partition level for both direct loads and conventional DML. Answer: D 直接路径拼数据块 常规路径转成SQL 204.You are tuning RMAN to optimize performance. You want tape I/O to be asynchronous异步的 when you perform tape backups. Which action should you take? B. Set the BACKUP_TAPE_IO_SLAVES parameter to TRUE. 执行备份时,磁盘置于异步模式, 设置。。。为TRUE 205.You specify a nonzero value for the MEMORY_TARGET initialization parameter, but do not set the PGA_AGGREGATE_TARGET or the SGA_TARGET parameters. You restart your database instance. Which statement about the result is true? B. The database instance starts, and Oracle automatically tunes memory and allocates 60 percent to the SGA and 40 percent to the PGA. 自动内存管理,非零值 重启实例  SGA 60%  PGA 40% 206.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 207.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. C. The execution plan and execution statistics are computed for each SQL statement in the STS. 你要在测试数据库中使用SQL性能分析器分析SQL调优集( STS)。关于在SQL调优集中  SQL测试执行的活动,哪两个描述是真实的? A.在SQL调优集中每一个SQL语句被认为是只执行一次。C.  C.为SQL调优集中的每一个SQL语句计算执行计划和执行统计 208.You want to enable resumable space allocation at the instance level. Which two actions would enable resumable space allocation at the instance level? (Choose two.) C. modifying the RESUMABLE_TIMEOUT initialization parameter to a nonzero value D. issuing the ALTER SYSTEM SET RESUMABLE_TIMEOUT=<nonzero value>; statement Answer: CD 一.Resumable Space Allocation 可恢复空间分配 说明 从9i开始,Oracle提供了一种避免由于space Error而致使事务异常的操做: resumable spaceallocation. 在Oracle 10g的OCP 考试中有考resumable session 的这个知识点。 官网对Resumable的解释:    --当咱们执行一个事务操做,若是使用了resumable space allocation,那么若是遇到space空间不够的状况,事务不会中断,而是生成一条alert log 发送给DBA,当DBA 解决这个问题以后,事务自动恢复运行。 在Oracle 10g中对resumable session功能作了加强,这些新特性在MOS的文档上有说明: 10g NEW FEATUREon RESUMABLE TIMEOUT [ID 240991.1] 10g中加强的内容有: 1)增长了一个resumable_timeout的参数    该参数能够在system和session level级都可以修改.对RAC db,每一个instance能够单独设置. 而9i中只能在session一级中设置。 --设置resumable_timeout 以后,在指定的timeout 时间内会自动恢复,若是超过这个时间没有解决问题,事务操做仍是会被中断。 2)对分布式事务的支持 3)增长了一个监控的视图 在10g中,咱们也能够经过DBA_OUTSTANDING_ALERTS来监控resumablesession. 209.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. 11gr2开始,可使用下面类型的操做来收集优化器统计信息: 1.             自动发布收集的统计信息在收集操做结束之后(默认选项publish) 2.             保存新的统计信息,而且待定(暂不发布pending) 这个特性能够将新收集的统计信息置为待定状态,因此能够先验证新统计信息的有效性而后再发布。 可使用下面的命令来查看是否默认发布新的统计信息。 sys@DAVID> SELECTDBMS_STATS.GET_PREFS('PUBLISH') PUBLISH FROM DUAL; PUBLISH ---------------------------------------------------------------------------------------------------- TRUE 返回为true或者false。True表示新的统计信息收集后即发布,也就是说优化器会使用新的统计信息来生查询计划,False表示收集的统计信息会被放入USER_TAB_PENDING_STATS和USER_IND_PENDING_STATS,而且不会马上被优化器使用,为待定状态。 210.The Database Resource Manager is automatically enabled in the maintenance window that runs the Automated Maintenance Task. What is the reason for this? 数据库资源管理器自动使能维护窗口运行自动维护任务, 缘由是? D. to prevent the Automated Maintenance Tasks from consuming消耗 excessive过多的 amounts of system resources Answer: D 组织过分消耗系统资源 211.You want to disable resumable space allocation for all sessions. Which value should be assigned to the RESUMABLE_TIMEOUT parameter to disable resumable space allocation for all sessions? A. 0 212.Note the following parameters settings in your database: SGA_MAX_SIZE = 1024M SGA_TARGET = 700M DB_8K_CACHE_SIZE = 124M LOG_BUFFER = 200M You issued the following command to increase the value of DB_8K_CACHE_SIZE: SQL> ALTER SYSTEM SET DB_8K_CACHE_SIZE=140M; What would happen? D. It will fail because an increase in the DB_8K_CACHE_SIZE cannot be accommodated  使适应within SGA_MAX_SIZE Answer: D 由于总的SGA_MAX_SIZE为1024M,若是把DB_8K_CACHE_SIZE 设置为140M,则700M+200M+140M=1040M,超过了1024M,会报错。 213.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? C. The command produces an error because the ADVISE FAILURE command has not been executed before the REPAIR FAILURE command. 214.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. 本地管理表空间与字典管理表空间相比大大提升了管理效率和数据库性能,其优势以下: 1.减小了递归空间管理 本地管理表空间是本身管理分配,而不是象字典管理表空间须要系统来管理空间分配,本地表空间是经过在表空间的每一个数据文件中维持一个位图来跟踪在此文件中块的剩余空间及使用状况。并及时作更新。这种更新只对表空间的额度状况作修改而不对其余数据字典表作任何update操做,因此不会产生任何回退信息,从而大大减小了空间管理,提升了管理效率。同时因为本地管理表空间能够采用统一大小分配方式(UNIFORM),所以也大大减少了空间管理,提升了数据库性能。 2.系统自动管理extents大小或采用统一extents大小 本地管理表空间有自动分配(AUTOALLOCATE)和统一大小分配(UNIFORM)两种空间分配方式,自动分配方式(AUTOALLOCATE)是由系统来自动决定extents大小,而统一大小分配(UNIFORM)则是由用户指定extents大小。这两种分配方式都提升了空间管理效率。 3.减小了数据字典之间的竞争 由于本地管理表空间经过维持每一个数据文件的一个位图来跟踪在此文件中块的空间状况并作更新,这种更新只修改表空间的额度状况,而不涉及到其余数据字典表,从而大大减小了数据字典表之间的竞争,提升了数据库性能。 4.不产生回退信息 由于本地管理表空间的空间管理除对表空间的额度状况作更新以外不修改其它任何数据字典表,所以不产生回退信息,从而大大提升了数据库的运行速度。 5.不需合并相邻的剩余空间 由于本地管理表空间的extents空间管理会自动跟踪相邻的剩余空间并由系统自动管理,于是不须要去合并相邻的剩余空间。同时,本地管理表空间的全部extents还能够具备相同的大小,从而也减小了空间碎片。 6.减小了空间碎片 7.对临时表空间提供了更好的管理 215.Which two statements regarding the Flashback Table feature are correct? (Choose two.) B. Flashback Table operation does not shrink the segments. D. Flashback Table operation acquires exclusive data manipulation language (DML) locks. Answer: BD 答案:(B、D) 解析: A(X),不能对系统表、远程表和fixed table 执行闪回表操做 C(X),闪回表操做使用undo还原数据,不须要用logminer来挖掘redo_sql和undo_sql 一,Flashback Table功能描述 将数据表恢复到以前的一个时间点或SCN号。 注意:该功能将改变当前表及附属对象统一闪回到以前的一个状态。 二,须要修改的系统参数 undo_management,参数须要是“AUTO”,保证回滚段使用模式是SMU mode undo_retention,单位是秒,调整可回滚的时间范围 确认系统的相关参数 三,原理 闪回表(Flashback table)与闪回查询(Flashback query)的原理大体相同,也是利用undo信息来恢复表对象到之前的某一个时间点(一个快照),所以也要确 保AUM(automatic undo management)有足够的Retention值。Flashback  table技术是以Undo segment中的内容为基础的, 所以受限于UNDO_RETENTON参数。要 使用flashback 的特性,必须启用自动撤销管理表空间。 但闪回表不等于闪回查询,其区别以下: 闪回查询只是查询之前的一个快照而已,并不改变当前表的状态。 闪回表则是将恢复当前表及附属对象一块儿回到之前的时间点。 四,特性: 1.  在线操做 2.  恢复到指定的时间点(或者SCN)的任何数据 3.  自动恢复相关属性 4.  知足分布式的一致性 5.  数据的一致性,全部相关对象将自动一致。 五,语法:  SQL> flashback table flashback_table_test to timestamp to_timestamp('2012-12-29 16:44:17', 'yyyy-mm-dd hh24:mi:ss');  SQL> flashback table flashback_table_test to scn 662421;  SQL> flashback table flashback_table_test to timestamp to_timestamp('2012-12-29 16:44:17', 'yyyy-mm-dd hh24:mi:ss') enable triggers; 六,运用闪回表前提   1,普通用户中须要有Flashback any table的系统权限。命令如:   2.,有该表的select、insert、delete、alter权限。   3,必须保证该表有row movement(行移动)。      1.当闪回删除操做以前,若是某个键值如主键被重用,将致使违反主键约束,闪回失败。 2.若闪回所须要的UNDO信息不存在,将引起ORA-08180:no snapshot found based on specified time(未找到基于指定时间的快照)错误 3.若是受闪回影响的记录被其它用户锁定,将引起ORA-00054:resource busy and acquire with NOWAIT specified (资源忙碌)错误 4.表定义在闪回期间不能发生变化,不然致使ORA-01466:unable to read data - table definition has changed(表定义已变化)错误 5.闪回前未启用row movement,将收到ORA-08189: cannot flashback the table because row movement is not enabled 错误 6.对于存在参照关系的状况,建议将主表等一块儿实施闪回,不然,将收到ORA-02091: transaction rolled back,ORA-02291错误 7.SYS 模式中的表不能使用表闪回技术 216.Which three elements can a job chain process involve? (Choose three) A. an event B. a schedule C. a program D. another chain E. a lightweight job Answer: BDE program只是Job的组成部分 Defining Chain Steps After creating a chain object, you define one or more chain steps. Each step can point to one of the following: A Scheduler program object (program)--包含 lightweight job Another chain (a nested chain) An event schedule, inline event, or file watcher The following PL/SQL block creates a lightweight job. Lightweight jobs must reference a program, and the program type must be 'PLSQL_BLOCK' or 'STORED_PROCEDURE'. In addition, the program must be already enabled when you create the job. BEGIN   DBMS_SCHEDULER.CREATE_JOB (    job_name         =>  'my_lightweight_job1',    program_name     =>  'polling_prog_n2',    repeat_interval  =>  'FREQ=SECONDLY;INTERVAL=10',    end_date         =>  '30-APR-09 04.00.00 AM Australia/Sydney',    job_style        => 'LIGHTWEIGHT',    comments         => 'Job that polls device n2 every 10 seconds'); END; / Oracle CHAIN,也就是链,是将一串须要完成的做业连在一块儿,根据每个步骤完成的不一样结果来肯定下面的哪个动做须要被完成。实际上也就是if .. then ..else。好比,可能有以下的定义,step 1成功执行,执行step 2,若是step 1执行失败,执行step 3,若是step 2或step 3 执行成功,退出整个chain,若是step 2 或step 3执行失败,发送邮件并退出。CHAIN的主要步骤包括定义程序(作什么)、定义CHAIN步骤(总步骤),以及CHAIN的规则(如何作)。 217.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? 10g升级到11g  更新结束后执行脚本 utlrp.sql 的意义  编译无效对象 --编译无效对象脚本utlrp.sql $ sqlplus '/as sysdba' @?/rdbms/admin/utlrp.sql utlrp.sql脚本能够在数据库运行的状态下执行以编译、数据库中的invalid对象.  oracle建议在对数据库进行迁移、升级、降级后都运行一遍utlrp.sql以编译无效对象 C. It performs parallel recompilation of any stored PL/SQL as well as Java code. utlrp.sql PL/SQL SYS Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types. Run the utlrp.sql script after creating or upgrading a database. This script recompiles all PL/SQL modules that may be in an INVALID state, including packages, procedures, types, and so on. This step is optional, but recommended so that the performance cost of recompilation is incurred during the installation rather than in the future. Note: There should be no other data definition language (DDL) statements running on the database while the script is running, and packages STANDARD and DBMS_STANDARD must be valid. Start SQL*Plus: DRIVE_LETTER:\> sqlplus /nolog Connect to the database with the SYS account: SQL> CONNECT SYS AS SYSDBA Enter password: SYS_password Start the database (if necessary): SQL> STARTUP Run the utlrp.sql script, which by default is located in ORACLE_HOME\rdbms\admin\utlrp.sql. For example: SQL> @?\rdbms\admin\utlrp.sql 218.Your database is running in ARCHIVELOG mode. You are performing a user-managed backup of the DATA1 tablespace. You place the DATA1 tablespace in backup mode by issuing the following statement: ALTER TABLESPACE data1 BEGIN BACKUP; While you are performing the backup, an error occurs that causes the instance to terminate abnormally. Which statement about the DATA1 tablespace is true? D. If you restart the database, the database will not be opened. Answer: D D,没法open,须要先把该表空间end backup 咱们在对数据库进行热备份的时候,须要将表空间置于脱机或backup命令后,对其数据文件进行拷贝。可是为何须要在热备份以前须要alter tablespace … begin backup呢?这里牵扯到一个SCN的概念。 首先咱们强制进行检查点进程 SQL> alter system checkpoint; System altered 在这里先明确一个概念 v$database → checkpoint_change# ,表示系统检查点SCN,存放在控制文件里 v$datafile →checkpoint_change#,表示数据文件检查点SCN,存放在控制文件里 →last_change#,终止SCN,存放在控制文件里 v$datafile_header → checkpoint_change#,启动SCN,start SCN,存放在数据文件头里 当检查点SCN,datafile SCN和start SCN都一致时,数据库不须要进行介质恢复。至于终止SCN,数据库在打开的情况下值为NULL,当咱们正常关闭数据库时才会有数值。若是数据库是abort关闭的,那么此时终止SCN为空,因而数据库从新开启会根据这个终止SCN为空而判断出须要进行介质恢复。 此时,咱们经过SQL语句select b.NAME,a.checkpoint_change# database_scn,b.checkpoint_change# datafile_scn,c.CHECKPOINT_CHANGE# start_scn,b.last_change# shut_scn from v$database a, v$datafile b, v$datafile_header c where b.FILE# = c.FILE#;查看当前的4类SCN   能够看到当前系统SCN为830445 如今咱们将要备份的其中一个表空间置于begin backup模式: SQL> alter tablespace test begin backup; Tablespace altered 再查看下SCN:   此时test表空间下的test1和test2数据文件的datafile SCN和start SCN变成了830645 咱们再作一次checkpoint (alter system checkpoint)   这时候咱们发现begin backup的tablespace下的数据文件SCN并无变化 这样带来的好处是,咱们拷贝数据文件是个漫长的过程,咱们不能保证数据文件头必定是首先被拷贝到备份里去的。在这过程当中,数据库有可能会发生变化,假如已经产生变化的数据块以前已经被拷贝到备份里了,而没有置于begin backup的话其数据文件头里的SCN也将会产生变化,以后,数据文件头被拷贝到备份。若是以后的某个时间数据库须要进行恢复,将备份拷贝过来,从数据文件头的SCN开始进行介质恢复,那么从前面热备份操做时开始拷贝到文件产生变化的这段时间内的数据不在备份里,而介质恢复也不会去重作它,就将致使数据丢失。 换回来说,若是在热备份时数据文件头的SCN被冻结了,能够保证在进行介质恢复时从830645开始进行恢复,而热备须要大量的日志空间,咱们能够猜测从begin backup到end backup这短期,数据库将相应的变化信息并非和平时同样简简单单的记录在日志文件中,或许这种状态是将变化的数据块的镜像彻底拷贝到日志文件中,在进行介质恢复时,这段时间的信息或许是将变化的数据块(SCN大于datafile SCN)从新覆盖而不是简简单单的redo。 alter tablespace test end backup 219.You executed the following PL/SQL block successfully: VARIABLE tname VARCHAR2(20) BEGIN dbms_addm.insert_finding_directive (NULL, DIR_NAME=>'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 NSERT_PARAMETER_DIRECTIVE Procedure This procedure creates a directive to prevent ADDM from creating actions to alter the value of a specific system parameter. The directive can be created for a specific task (only when the task is inINITIAL status), or for all subsequently created ADDM tasks (such as a system directive). 220.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 哪些语句描述“数据库管理系统网络访问控制列表管理”套件的功能?      221.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? B. A workload工做量 needs to be associated with the task. 222.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? D. The command succeeds and retrieves检索 information by scanning the disk headers based on an ASM_DISKSTRING value. Answer: D 命令执行成功,经过基于ASM_DISKSTRING值来扫描diskheader信息。 ASM实例的初始化参数形式上与数据库的初始化参数相同,也分spfile和pfile,操做方式也彻底相同,只不过具体的参数及参数值略有差别,大多数数据库的初始化参数在这里也能见到,而且某些参数意义都彻底相同,一样也有一些参数虽然见到了,不过并不须要设置,这个能够理解,毕竟asm只有实例,相对比数据库的初始化参数要简单的多了,还有一些参数则是数据库初始化参数中没有的。好比ASM开头的那几个初始化参数。  ASM实例在内存占用这块仍是比较轻量级的,基本上有个100m空间就很充足了,所以内存这块相关参数就不说了,下面说说几个ASM实例特别须要的参数。  首先,初始化参数中的INSTANCE_TYPE,该参数必须被设置为ASM,如:  INSTANCE_TYPE=ASM  标识要启动的实例是ASM,而不是数据库实例(数据库实例对应类型为RDBMS)。  与ASM相关的初始化参数有三个:  ASM_POWER_LIMIT:指定磁盘rebalance的程度,有0-11个级别,默认值为1,指定的级别越高,则rebalance的操做就会越快被完成(固然这也意味着这个时间段内将占用更多的资源),指定级别较低的话,虽然rebalance操做会耗时更久,但对当前系统的IO及负载影响会更少,这中间的度须要DBA根据实际状况衡量。另外,这个参数指定的只是一个默认值,在操做过程当中,便可以随便动态修改,也能够在语句级命令行时指定power,覆盖该默认值。  提示:关于rebalance操做,若是你没接触过,还不明白是什么意思,不要紧,继续往下看!  ASM_DISKSTRING:用最简单的话说,就是设置ASM启动时检查的磁盘,该选项能够同时指定多个值,而且支持通配符。好比说,只检查/dev/dsk/下的设备,能够设置该参数以下:/dev/dsk/*,默认状况下该参数为空,为空的话,表示ASM将查找系统中全部ASM拥有读写权限的设备。  ASM_DISKGROUPS:指定实例启动或alter diskgroup all mount语句时要加载的磁盘组,若是为空的话,那么实际就仅启动到NOMOUNT状态了。若是是使用SPFILE的话,该参数通常不须要手动修改,ASM可以自动更新该初始化参数中的值。  修改ASM实例初始化参数文件的命令规则与数据库初始化参数彻底相同,好比说:  223.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. 224.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? 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 INTERVAL 是11G新增的自动分区特性 该语句创建p一、p2两个分区,其后的数据按月自动进行分 C.它建立了两个不一样的范围的范围分区。对于数据超出’1-1-2007,它建立多个分区,每一个分区  一个月的广度 225.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结果? C. The PL/SQL block produces an error because the my_instance_analysis_mode_task task has not been reset to its initial state. 使用DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE 使用这个过程建立一个指令阻止ADDM针对特定的段建立一个操做来"run Segment Advisor" 这个指令能够针对特定的任务来建立(只有当该任务处于INITIAL状态); 也能够针对全部后面建立的ADDM任务。 This procedure creates a directive to prevent ADDM from creating actions to "run Segment Advisor" for specific segments. The directive can be created for a specific task (only when the task is in INITIAL status), or for all subsequently created ADDM tasks (such as a system directive). 226.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? B. It is loaded with the ACCEPTED status. SQL 计划管理是一种随Oracle Database 11g 引入的新功能,经过维护所谓的“SQL 计划基线(SQL plan baseline(11g))”来使系统可以自动控制SQL 计划演变。启用此功能后,只要证实新生成的SQL 计划与SQL 计划基线相集成不会致使性能回归,就能够进行此项集成。所以,在执行某个SQL 语句时,只能使用对应的SQL 计划基线中包括的计划。可使用SQL 优化集自动加载或植入SQL 计划基线。 SQL 计划管理功能的主要优势是系统性能稳定,不会出现计划回归。此外,该功能还能够节省DBA 的许多时间,这些时间一般花费在肯定和分析SQL 性能回归以及寻找可用的解决方案上。 SPM经过几个标记来实现对执行计划的控制: (1)Enabled (控制活动):   + YES (活动的,但不必定会被使用)   + NO (能够理解为被标记删除) (2)Accepted(控制使用):   + YES (只有 “Enabled” 而且“Accepted” 的计划才会被选择使用)   + NO (若是是“Enabled” 那么只有被evolve成“Accepted”才有可能被执行) (3)Fixed(控制优先级):   + YES (若是是“Enabled”而且“Accepted”,会优先选择这个计划,这个计划会被视为不须要改变的)   + NO (普通的计划,无需优先) (4)Reproduced(有效性):   + YES (优化器可使用这个计划)   + NO (计划无效,好比索引被删除)   导入的baseline都会被自动标记为ACCEPTED,  Oralce提供六种方式把计划导入到sql plan baseline中: (1)从 SQL Tuning Set STS 导入:DBMS_SPM.LOAD_PLANS_FROM_SQLSET (2)从Cursor Cache中装载:DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (3)从Stored Outlines中导入: DBMS_SPM.MIGRATE_STORED_OUTLINE (4)从内存中存在的计划中导入:DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE; (5)从staging table表中导入:dbms_spm.create_stgtab_baseline (6)经过staging table从另一个系统中移植:       DBMS_SPM.CREATE_STGTAB_BASELINE       DBMS_SPM.PACK_STGTAB_BASELINE       DBMS_SPM.UNPACK_STGTAB_BASELINE 227.You plan to control idle sessions that are blocking other sessions from performing transactions. Your requirement is to automatically terminate these blocking sessions when they remain idle for a specified amount of time. 自动终结  阻塞的会话  保持长时间空闲的阻塞会话 How would you accomplish this task? B. Implement Database Resource Manager Resource Manager 提供了一种优化数据库资源分配的有效办法,相对于在OS层面进行资源分配,Resource Manager 拥有更精细的控制粒度,以及更小的资源消耗,而且解决了一些OS层面没法解决的资源分配问题。 (228)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('01-apr-2007', 'dd-mon-yyyy'),   PARTITION Q2 VALUES LESS THAN(TO_DATE('01-jul-2007', 'dd-mon-yyyy'),   PARTITION Q3 VALUES LESS THAN(TO_DATE('01-oct-2007', 'dd-mon-yyyy'),   PARTITION Q4 VALUES LESS THAN(TO_DATE('01-jan-2008', 'dd-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.) 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. Creating Reference-Partitioned Tables To create a reference-partitioned table, you specify a PARTITION BY REFERENCE clause in the CREATE TABLE statement. This clause specifies the name of a referential constraint and this constraint becomes the partitioning referential constraint that is used as the basis for reference partitioning in the table. The referential constraint must be enabled and enforced. As with other partitioned tables, you can specify object-level default attributes, and you can optionally specify partition descriptors that override the object-level defaults on a per-partition basis. Example 4-9 creates a parent table orders which is range-partitioned on order_date. The reference-partitioned child table order_items is created with four partitions, Q1_2005, Q2_2005, Q3_2005, and Q4_2005, where each partition contains the order_items rows corresponding to orders in the respective parent partition. 子表的分区并无指定名称,因此就继承父表的名称,选C 229.Which statements are true regarding SecureFile LOBs? (Choose all that apply.) C. Fragmentation is minimized by using variable-sized chunks dynamically. D. SecureFile encryption allows for random reads and writes of the encrypted datA. Oracle Database 11 g 将LOB 数据类型做为Oracle SecureFiles  进行了彻底从新设计,显著改进了应用程序开发的性能、可管理性和易用性。新实施也提供了下一代高级功能,如智能压缩和透明加密。 使用SecureFiles  时,块大小介于Oracle  数据块大小到64 MB 之间。Oracle DB 尝试使数据集中在磁盘的相邻物理位置,从而将内部碎片降到最低。经过使用可变的块大小,SecureFiles  避免对没必要要的大型LOB 数据块进行版本化。 SecureFiles  还提供了新的客户机/ 服务器网络层,从而容许在支持更高读写性能的服务器和客户机之间进行高速数据传输。SecureFiles  自动肯定生成重作和还原的最有效方法,于是不须要用户定义参数。SecureFiles  自动肯定是仅为更改生成重作和还原,仍是经过生成完整的重作记录建立新版本。 因为SecureFiles  须要维护各类内存中统计信息以帮助有效地分配内存和空间,因此将其设计为可自适应的智能工具。这样,因为减小了很难使用不可预测的负荷进行优化的可优化参数数量,可管理性有所提升。 SecureFiles:高级功能 Oracle SecureFiles  实施也提供了下一代高级功能,如智能压缩和透明加密。压缩功能支持显式压缩SecureFiles 。SecureFiles  仅为随机读取或写入访问透明解压缩所需的数据块集,从而自动维护未压缩和已压缩的偏移量之间的映射。若是将压缩级别从MEDIUM 更改成HIGH,则映射会自动进行更新以反映新的压缩算法。取消重复可自动检测重复的SecureFile LOB  数据,并经过仅存储一个副原本节省空间-减小磁盘存储空间、I/O  和重作事件记录。可在表级别或分区级别指定取消重复,但不能跨越分区的LOB 。取消重复须要使用高级压缩选项。 如今能够在适当位置存储加密的LOB 数据,并对其进行随机读取和写入,于是提升了数据的安全性。只能按列加密SecureFile LOB  (与透明数据加密相同)。将使用相同的加密算法对LOB 列中的全部分区进行加密。没法对BasicFiles 数据进行加密。SecureFiles  支持行业标准加密算法:3DES168 、AES12八、AES192(默认)和AES256。加密是高级安全选项的一部分。 注:必须将COMPATIBLE初始化参数设置为11.0.0.0.0 或更高,才能使用SecureFiles 。在11.1.0.0.0 兼容性下BasicFiles(之前的LOB)格式仍然受支持。设置11.0.0.0.0 后不会出现功能下降。 230.You plan to use Flashback Drop feature to recover a dropped table SALES_EMP. No other table with the same name exists in the schema. You query RECYCLEBIN and find multiple entries for the SALES_EMP table as follows: You then issue the following statement to recover the table: SQL> FLASHBACK TABLE sales_emp TO BEFORE DROP; What would be the outcome of the precedent statement? A. It retrieves the latest version of the table from the recycle bin 231.You upgraded Oracle Database 10g to Oracle Database 11g. How would this affect the existing users' passwords? B. All passwords remain non-case-sensitive till they are changed. 232.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 233.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 C. Capture the plans from the previous version using STS and then load them into SQL Management Base (SMB). 。能够捕获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 中。 此方法提供了计划植入进程的最佳形式,由于它有助于在保留数据库升级所带来的性能改进的同时,防止性能回归 在Oracle 11g,SMB是SPM的控制端,SMB是数据字典的一部分,SMB存储在sysaux表空间,SMB存储SQL语句日志,Plan Histories,以及SQL Profiles等,SMB容许每周清除一次未使用的SQL Plan & Log,SMB已经配置了自动存储空间管理。  SMB默承认以使用sysaux表空间的10%,SMB被容许使用sysaux的存储范围是1%-50%,每周有后台进程来测量SMB使用sysaux的空间,若是SMB超过了容许的范围,就会在al*.log中写入一条警告,能够经过dbms_spm的configure过程设置SMB容许使用存储空间的范围。    234.Which type of backup contains only the blocks that have changed since the last level 0 incremental backup? 仅仅包含级别0增量备份 改变的块 A. a cumulative累积 level 1 backup B. a differential差量 level 1 backup C. a full backup D. a whole backup Answer: A 235.The ORACLE_SID environment variable is set to +ASM. ASMLIB is not used in the configuration. You executed the following command to startup the Automatic Storage Management (ASM) instance. SQL> STARTUP; Which two activities are performed during a successful start up operation? (Choose two.) B. The disk groups are mounted as per the ASM_DISKGROUPS initialization parameter C. ASM starts the Oracle Cluster Synchronization Services (CSS) daemon if it is not started ASM启动时会加载磁盘组。 ASM是依赖于CSS守护进程的,所以在启动ASM实例前要确保css守护进程已经启动  。  CSS(Cluster Synchronization Services) 守护进程用来维持ASM 及客户端数据库实例间的一致性同步,若是是经过dbca建库的话,那么CSS守护进程默认即会启动(跟随系统reboot)。 ASM启动时会加载磁盘组。 ASM是依赖于CSS守护进程的,所以在启动ASM实例前要确保css守护进程已经启动  。  CSS(Cluster Synchronization Services) 守护进程用来维持ASM 及客户端数据库实例间的一致性同步,若是是经过dbca建库的话,那么CSS守护进程默认即会启动(跟随系统reboot)。 ASM实例启动是装载磁盘组,而ASM_DISKGROUPS是ASM 实例启动时或使用ALTER DISKGROUP ALL MOUNT命令时,ASM 实例要装载的磁盘组的名称列表。若是为空的话,那么实际就仅仅启动到nomount状态。若是使用SPFILE的话,该参数通常不须要手动修改,ASM可以自动更新该初始化参数中的值。 Oracle Restart 会装载列为相关磁盘组的磁盘组,即便这些磁盘组未与ASM_DISKGROUPS参数列在一块儿也是如此。该参数没有默认值。 如:ASM_DISKGROUPS = DATA2, FRA ASM是依赖于CSS守护进程的,所以在启动ASM实例前要确保css守护进程已经启动 。 CSS(Cluster Synchronization Services) 守护进程用来维持ASM 及客户端数据库实例间的一致性同步,若是是经过dbca建库的话,那么CSS守护进程默认即会启动(跟随系统reboot)。 236.Your database is running in ARCHIVELOG mode, and the database is open. You execute an RMAN backup and specify the KEEP clause. Which components are backed up when this option is specified D. the control file, current SPFILE file, data files, and archived redo logs Answer:  237.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. advise failure: Displays information for all CRITICAL and HIGH priority failures recorded in the automatic diagnostic repository. You can only use ADVISE FAILURE with no options when a LIST FAILURE command was previously executed in the current session. Note:If a new failure has been recorded in the diagnostic repository since the last LIST FAILURE command in the current RMAN session,then RMAN issues a warning before advising on CRITICAL and HIGH failures. 238.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 239.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. Answer: A SecureFile功能是oracle 11g中对大对象(LOB)存储格式的彻底从新设计实现,原来的LOB存储格式如今通称为BASIXFILE,它仍然是默认的存储方法,可是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'; System altered. SQL> ALTER SYSTEM SET db_securefile = 'PERMITTED'; System altered. 240.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? C. all disks that are not currently in OFFLINE mode 241.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.归档日志随着数据文件一块儿备份 D. The command creates a restore point named FY06Q4 to match the SCN at which this backup is consistent. 命令建立一个还原点 FY06Q4 匹配SCN   这个备份是一致的 Answer: AD Creating a Consistent Database Backup for Archival Purposes This example uses a keepOption to create an archival backup set that cannot be considered obsolete for one year. The example backs up the database, archives the redo in the current online logs to ensure that this new backup is consistent, and backs up only those archived redo log files needed to restore the data file backup to a consistent state. The BACKUP command also creates a restore point to match the SCN at which this backup is consistent. The FORMAT parameter must be capable of creating multiple backup pieces in multiple backup sets. BACKUP DATABASE   FORMAT '/disk1/archival_backups/db_%U.bck'   TAG quarterly   KEEP UNTIL TIME 'SYSDATE + 365'   RESTORE POINT Q1FY06;      242.You want to create the Recovery Manager (RMAN) Virtual Private Catalog (VPC) to maintain a separation of responsibilities along with a consolidation of RMAN repository. Which condition must be met before you create the VPC? A. A base catalog exists 在建立VPC时,首先是目录全部者来建立基本目录,故选A。 建立 Virtual Private Catalog(虚拟用户目录)(Oracle 11g) 说明: 一个 catalog  能够注册多个数据库: 而注册多个 target  数据库之后,能够分给不一样的用户进行管理,VPC< virtual private catalog > 实验操做如: 一、注册 target 数据库 PROD1 到 catalog [Oracle@catalog ~]$ rman catalog catowner/password@catalog_ORCL target sys/123123@PROD1_orcl RMAN> create catalog;  -- 若是已建立,则  prompt 恢复目录已经存在;   RMAN> register database; 二、注册 target 数据库 PROD2  到 catalog [oracle@catalog ~]$ rman catalog catowner/password@catalog_ORCL target sys/123123@PROD2_orcl RMAN> create catalog;  -- 若是已建立,则  prompt 恢复目录已经存在;   RMAN> register database; 三、建立 用户(做为虚拟用户) ,并给 虚拟用户 分配须要维护的 target 数据库; SQL> create user vpc1 identified by password default tablespace rmancatalog_tablespace;  SQL> GRANT recovery_catalog_owner TO vpc1; RMAN> CONNECT CATALOG catowner/password@catalog_ORCL; RMAN> GRANT CATALOG FOR DATABASE prod1 TO vpc1; RMAN> CONNECT CATALOG vpc1/password@catalog_ORCL; RMAN> CREATE VIRTUAL CATALOG; 243.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 D. failures due to loss of connectivity-for example, an unplugged disk cable Answer: AD 244.Which two statements are true regarding the starting of the database instance using the following command? (Choose two.) SQL>STARTUP UPGRADE B. It allows only SYSDBA connections D. It sets system initialization parameters to specific values that are required to enable database upgrade scripts to be run. Answer: BD UPGRADE解析:以OPEN UPGRADE方式打开实例,而且设定特定参数值,使得可以运行upgrade脚本。只有在第一次打开一个新版本的数据库时才可以使用UPGRADE选项。当使用该选项时,运行upgrade脚本可将当前安装的数据库版本升级为一个更新的版本。完成upgrade后,数据库需关闭和正常重启。 在9i,不管升级/降级 数据库都是startup migrate 10g后增长了upgrade参数,升级可直接用startup upgrade,降级还是startup migrate. --打完patch(OUI升级,中间须要用root执行一个脚本)后,重建数据字典视图脚本catpatch.sql 为了保证系统的的数据词典的完整性和有效性,最好的打patch后在migrate状态下运行catpatch.sql sql> shutdown immediate sql> startup migrate (10g为startup upgrade) sql> @?/rdbms/admin/catpatch.sql (10g为@?/rdbms/admin/catupgrd.sql ) sql> shutdown immediate sql> startup 为加快速度,可临时调大这2个参数: show parameter shared_pool_size show parameter large_pool_size 重建完数据字典视图后的提示 DOC>####################################################################### DOC>####################################################################### DOC> DOC>   The above PL/SQL lists the SERVER components in the upgraded DOC>   database, along with their current version and status. DOC> DOC>   Please review the status and version columns and look for DOC>   any errors in the spool log file. If there are errors in the spool DOC>   file, or any components are not VALID or not the current version, DOC>   consult the Oracle Database Upgrade Guide for troubleshooting DOC>   recommendations.   DOC>   Next shutdown immediate, restart for normal operation, and then DOC>   run utlrp.sql to recompile any invalid application objects.   DOC>####################################################################### DOC>####################################################################### --执行完catpatch.sql,没有错误后,重启数据库,再编译无效对象,脚本utlrp.sql $ sqlplus '/as sysdba' @?/rdbms/admin/utlrp.sql utlrp.sql脚本能够在数据库运行的状态下执行以编译、数据库中的invalid对象. oracle建议在对数据库进行迁移、升级、降级后都运行一遍utlrp.sql以编译无效对象。 245.Which statements are true regarding system-partitioned tables? (Choose all that apply.) 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.传统的分区修剪和智能化分区链接不支持这些表。 246.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.) optimizer_use_plan_baselines参数设置为true。优化器产生一个SQL语句的计划,但不能发现一个匹配计划(在SQL计划基线中)。在这个场景中,由优化器执行的两个操做是? A. The optimizer adds the new plan to the plan history.  优化器添加新的计划到计划历史中。 E. The optimizer costs each of the accepted plans in the SQL plan baseline and picks the one with the lowest cost. 优化器估算在SQL计划基线中的每个可接受的计划和挑选成本最低的一个。 Answer: AE      Selecting SQL Plan Baselines During the SQL plan baseline selection phase, Oracle Database detects plan changes based on the stored plan history, and selects plans to avoid potential performance regressions for a set of SQL statements. Each time the database compiles a SQL statement, the optimizer does the following: Uses a cost-based search method to build a best-cost plan Tries to find a matching plan in the SQL plan baseline Does either of the following depending on whether a match is found: If found, then the optimizer proceeds using the matched plan If not found, then the optimizer evaluates the cost of each accepted plan in the SQL plan baseline and selects the plan with the lowest cost 247.Which two statements about Oracle Direct Network File System (NFS) are true? (Choose two.) A. It bypasses绕过 the OS file system cache. E. Oracle Disk Manager can manage NFS on its own, without using the operating system kernel NFS driver. Answer: AE 248.You want the ability to recovery any time within the last seven days and therefore you configured the recovery window retention policy using the command: RMAN> CONFIGURE RETENTIOH POLICY TO RKCOVFRY WINDOW OF 7 DAYS; After configuring the recovery window, you performed the database backup as follows: D. On 20th Jan when the log sequence number was 18112 you realize that there Is a need to a point in time at the beginning of the recovery window. You have all an hived redo log files to date. Answer: D 语句不通 249.Evaluate the following command and its output: SQL>SELECT * FROM dba_temp_free_space; TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE LMTEMP 250609664 101048576 149561088 Which two statements correctly interpret the output? (Choose two.) D. ALLOCATED_SPACE indicates代表 both the space currently allocated and used, and the space that is available for reuse. E. FREE_SPACE indicates both the space that is currently allocated and available for reuse, and the space that is currently unallocated. Answer: DE 250.You want to schedule a job to rebuild all indexes on the SALES table after the completion of a bulk load operation. The bulk load operation must also be a scheduled job 调度做业that executes as soon as the first file that contains data arrives on the system. How would you create these jobs? D. Create a job to rebuild indexes by using events arised by the Scheduller and then create another job to perform bulk load批量加载 by using events raised by the application 应用程序引起的事件 Answer: D 从如下可知,bulk load是File arrival events raised by a file watcher,rebuild indexes是Events raised by your application,An application can raise an event to be consumed by the Scheduler. 两个都是基于事件的。 你要安排一份做业,在一个大容量的批量加载操做完成后,从新安排销售表的全部索引。  批量加载操做还必须是一个计划的做业,它将在系统中包含数据的第一个文件到达时执行。  你如何建立这些做业?   关于事件 一个事件是一个应用程序或系统进程发送的消息,以指示某些动做或事件已被检测到。事件由一个应用程序或进程(发送)提出,并由一个或多个应用程序或进程(接收)消耗。 有2种事件消耗的调度程序: ? 由您的应用程序引起的事件 ? 文件监视器引起的文件到达事件 251.You are working on a CATDB database that contains an Oracle Database version 11.1 catalog schema owned by the user RCO11. The INST1 database contains an Oracle Database version 10.1 catalog schema owned by the user RCAT10. You want the RMAN to import metadata for database IDs 1423241 and 1423242, registered in RCAT10, into the recovery catalog owned by RCO11. You executed the following RMAN commands: RMAN> CONNECT CATALOG rco11/password@catdb RMAN> IMPORT CATALOG rcat10/oracle@inst1; What happens when you execute the above commands? (Choose all that apply.) A. They deregister all databases registered in the RCAT10 catalog. B. They import metadata for all registered databases in the RCAT10 database. C. They register all the RCAT10-catalog registered databases in the RCO11 catalog. Answer: ABC 252.Which three are the valid statements in relation to SQL plan baselines? (Choose three.) A. The plans can be manually loaded to the SQL plan baseline. B. The plans in the SQL plan baseline are verified and accepted plans. C. The plans generated for every SQL statement are stored in the SQL plan baseline by default. D. The plan baselines are stored temporarily in the memory as long as the database instance is running. E. For the SQL plan baselines to be accessible to the optimizer, the SYSAUX tablespace must be online. Answer: ABE  253.You run the SQL Tuning Advisor (STA) to tune a SQL statement that is part of a fixed SQL plan baseline. The STA generates a SQL profile for the SQL statement, which recommends that you accept the profile. Which statement is true when you accept the suggested SQL profile? C. The tuned plan is added to the fixed SQL plan baseline as a nonfixed plan. 调整计划添加到固定的SQL计划基线做为一个非固定的计划 15.4 Using Fixed SQL Plan Baselines A SQL plan baseline is fixed when it contains at least one enabled plan whose FIXED attribute is set to YES. You can use fixed SQL plan baselines to fix the set of possible plans (usually one plan) for a SQL statement, or migrate an existing stored outline by loading the "outlined" plan as a fixed plan. If a fixed SQL plan baseline also contains non-fixed plans, then the optimizer gives preference to fixed plans over non-fixed ones. Thus, the optimizer picks the fixed plan with the least cost even though a non-fixed plan may have an even lower cost. If none of the fixed plans is reproducible, then the optimizer picks the best non-fixed plan. The optimizer does not add new plans to a fixed SQL plan baseline. Because the optimizer does not automatically add new plans, the database does not evolve a fixed SQL plan baseline when you execute DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE. However, you can evolve a fixed SQL plan baseline by manually loading new plans into it from the shared SQL area or a SQL tuning set. When you tune a SQL statement with a fixed SQL plan baseline using SQL Tuning Advisor, a SQL profile recommendation has special meaning. When the SQL profile is accepted, the database adds the tuned plan to the fixed SQL plan baseline as a non-fixed plan. However, as described above, the optimizer does not use the tuned plan when a reproducible fixed plan is present. Therefore, the benefit of SQL tuning may not be realized. To enable the use of the tuned plan, manually alter the tuned plan to a fixed plan by setting its FIXED attribute to YES.      254.Which three statements correctly describe the features of the I/O calibration process? (Choose three.) A. Only one I/O calibration process can run at a time. B. It automates the resource allocation for the Automated Maintenance Tasks. C. It improves the performance of the performance-critical sessions while running. D. It can be used to estimate the maximum number of I/Os and maximum latency time for the system. E. The latency time is computed only when the TIMED_STATISTICS initialization parameter is set to TRUE. Answer: ADE 11g新特性之IO校准(IO Calibration) IO校准(IO Calibration)特性能够帮助咱们了解存储系统的真实性能,以进一步判断I/O性能问题是由数据库仍是存储系统自身引发的。I/O校准特性(IO Calibration)经过对Oracle数据文件的随机I/O访问存储介质,其结论值更符合数据库IO性能的真实状况。 在使用该特性前,咱们要确保知足如下条件: 调用该存储过程须要用到SYSDBA权限 TIME_STATISTICS 参数为true: SQL> show parameter timed_statistics; NAME TYPE VALUE ———————————— ———– —————————— timed_statistics boolean TRUE 必须打开异步IO;注意在使用文件系统时,FILESYSTEMIO_OPTIONS需设为SETALL或ASYNC,不然Oracle不会启用异步IO。 能够经过如下查询检验是否启用了异步IO: SQL> SELECT NAME, ASYNCH_IO 2    FROM V$DATAFILE F, V$IOSTAT_FILE I 3   WHERE F.FILE# = I.FILE_NO 4     AND FILETYPE_NAME = 'Data File';  DBMS_RESOURCE_MANAGER.CALIBRATE_IO (disk_count,max_latency , iops, mbps, lat);   7     DBMS_RESOURCE_MANAGER.CALIBRATE_IO (2, 15, iops, mbps, lat);         255.Which two statements about the SQL Management Base (SMB) are true? (Choose two.) C. It is part of the data dictionary and stored in the SYSAUX tablespace. E. It contains the statement log, the plan history, plan baselines, and SQL profiles. Answer: CE The SQL management base (SMB) 是存储于SYSAUX的数据字典的一部分。声明日志(statement logs)、执行计划历史(plan histories)以及计划基线(SQL plan baselines)、SQL档案(SQL profiles)都存储在SQL管理库(SMB)中。 256.Sales details are being stored on a daily basis in the SALES_2007 table. A large amount of data is added to the table daily. To save disk space, you issued the following command: ALTER TABLE sales_2007 COMPRESS FOR ALL OPERATIONS; What would be the outcome of this command? 节省空间   C. It compresses all data added or modified henceforth从今之后 but the existing data in the table is not compressed immediately Answer: C In earlier releases, OLTP table compression was enabled using COMPRESS FOR ALL OPERATIONS. This syntax has been deprecated. If you specify COMPRESS FOR OLTP, then chained rows are not compressed unless the header for the row remains in the original block and all row columns are moved to another block. If the row chaining results in leaving just the row header in the block and moving all of the row's columns to the next block, and they all fit in the next block, then the columns can be compressed. 257.Which client requests to the database can be captured as a part of the workload capture? (Choose all that apply.) 哪些客户端请求可以被数据库捕获做为工做量的一部分 C. logging in and logging out of sessions D. all DDL statements having bind variables   Answer: CD 258.Which two statements are true regarding the SQL Repair Advisor? (Choose two.)   B. The SQL Repair Advisor can be invoked even when the incident is not active for a SQL statement crash.  . D. The DBA can invoke the SQL Repair Advisor when he or she receives an alert generated when a SQL statement crashes and an incident is created in the ADR. Answer: BD Support Workbench不只是将诊断数据上传给Oracle Support的一个工具,还能够经过Support workbench运行最新的SQL Repair Advisor工具,在Oracle Database 11g中,能够运行SQL Repair Advisor来处理失败的SQL语句,此顾问一般建议应用一个补丁来处理失败的语句,若是采纳了建议并应用了SQL补丁,优化程序将选择一个替代执行路径,SQL代码将成功执行,不须要更改原来的SQL语句,若是SQL Repair Advisor不能给出一个使SQL工做的建议,能够用Support Workbench打包意外事件文件和相关数据,发送给Oracle SQL Repair Advisor When a SQL statement failure results in a critical error, the new SQL Repair Advisor analyzes the statement and in many cases recommends a patch to fix the failed statement. The fix is usually in the form of a recommendation to apply a SQL patch to bypass the failure, without changing the SQL statement itself. Applying the recommended patch leads the query optimizer to select an alternate execution plan for the problem statement. The SQL Repair Advisor tries to recommend a SQL patch when it’s unable to find a fix for the problem SQL statement(s). A SQL patch is very similar to a SQL profile, but it’s used mostly as a workaround to fix a failing SQL statement. There are two ways you can invoke the SQL Repair Advisor. The first way is to use the Support Workbench to launch the SQL Repair Advisor. You can also use the new DBMS_SQLDIAG package to invoke the SQL Repair Advisor.   259.Which setting enables the baselines by default in Oracle Database 11g?   A. setting the STATISTICS_LEVEL parameter to TYPICAL statistics_level 参数是oracle9.2开始引入的一个控制系通通计参数收集的一个开关.一共有三个值:basic,typical,all.支持alter session,alter system 动态修改.若是要用statspack或者AWR收集系统性能统计数据.那么这个参数的值必须为typical或all.一般all是一个全面收集,包括 OS以及sql执行路径方面的一些统计信息,除非碰见很是严重的性能问题或在一些特殊的性能挣断方面才会用到statistics_level=all, 日常statistics_level=typeical已经足够诊断99%的性能问题了.  example: seting statistics_level  alter system set statistics_level=basic;  alter system set statistics_level=typical;  alter system set statistics_level=all;  or  alter session set statistics_level=basic;  alter session set statistics_level=typical;  alter session set statistics_level=all;  statistics_level=basic的状况下,oracle关闭了全部性能数据的收集,也就是若是要关闭AWR或statspack收集,只要设置alter system set statistics_level=basic;就好了;  statistics_level=typical的时  候,除了plan_executetion_statistics和OS Statistics不能收集外,其余的均可以收集,如要要收集这个两项,必须设置statistics_level=all;  若是当statistics_level=ALL,系统收集全部的统计信息. 260.Which two activities are NOT supported by the Data Recovery Advisor? (Choose two.) C. Diagnose and repair failures on a standby database. D. Recover from failures in the Real Application Cluster (RAC) environment. Answer: CD 261.In which cases is reference partitioning effective in enhancing performance?  在哪一种状况下 引用分区 有效的 提升性能 D. It is effective in both partition pruning修剪 as well as partitionwise joins irrespective of 不考虑 whether the query predicates谓词 are different from or identical to the partitioning key. Answer: D 在哪些状况下是涉及分区有效地提升了性能? D.它在分区修剪以及智能化分区链接都是有效 的,不管是否查询谓词(判断) 同分区键是不一样或彻底相同 262.In Oracle 11g, which recommendations does the SQL Access Advisor generate? (Choose all that apply.) A. partitioning recommendations  分区$$$$$ B. statistics collection recommendations C. index creation recommendations  索引 D. materialized view recommendations 物化视图 E. materialized view log recommendations  物化视图日志 Answer: ACDE 263.Which statement is true for enabling Enterprise Manager Support Workbench in Oracle Database 11g to upload the physical files generated by Incident Packaging Service (IPS) to MetaLink? E. Select the Enable option in the Oracle Configuration Manager Registration window during the installation of the Oracle Database 11g software, provide valid MetaLink credentials and select license agreement. Answer: E 264.Using the LIST command in Recovery Manager (RMAN), which two pieces of information in the RMAN repository can be listed? (Choose two.) A. stored scripts in the recovery catalog B. backups that can be deleted from disk C. backup sets and image copies are obsolete D. backups that do not have the AVAILABLE status in the RMAN repository Answer: AD 排除法:BC所表达的意思都是list命令能列出在磁盘上能被删除的备份集等。即obsolete状态。而obsolete状态是用report obsolete列出的。 LIST Purpose To display information about backup sets, proxy copies, and image copies recorded in the repository. The LIST command displays the files against which you can run CROSSCHECK and DELETE commands. Use this command to list: Backups and copies that do not have the status AVAILABLE in the RMAN repository Backups and copies of datafiles that are available and can possibly be used in a restore operation Specified archived logs, backup sets, backup pieces, control file copies, datafile copies, and proxy copies Backups and copies restricted by tag, completion time, recoverability, or device Incarnations of a specified database or of all databases known to the repository Stored scripts in the recovery catalog RMAN records the output to either standard output or the message log, but not to both at the same time. You can control how the output is organized (BYBACKUP or BY FILE) as well as the level of detail in the output (VERBOSE or SUMMARY). 265.View the Exhibit for the object interdependency diagram. The PRODUCTS table is used to create the PRODCAT_VW view. PRODCAT_VW is used in the GET_DATA procedure. GET_DATA is called in the CHECK_DATA function. A new column PROD_QTY is added to the PRODUCTS table. How does this impact the status of the dependent objects? 逐级调用 全部依赖对象任然有效 A. All dependent objects remain valid. 266.View the Exhibit to examine the parameters set for your database instance. You execute the following command to perform I/O calibration after the declaration of bind variables in the session that are used in the command: SQL> EXECUTE dbms_resource_manager.calibrate_io( num_physical_disks=>1, - max_latency=>50, -max_iops=>:max_iops, -max_mbps=>:max_mbps, - actual_latency=>:actual_latency); Which statement describes the consequence?、  A. The command produces an error. 先题目有问题:当statistics_level != basic时,timed_statistics必须 = true 运行 I/O 校准须要保证如下条件: ?  sysdba 权限; ?  filesystemio_options=[asynch | setall]; ?  timed_statistics=true ; filesystemio_options=[none | directio] 会遇到 ORA-56708,timed_statistics = false 会遇到 ORA-56709 267.You plan to control the sessions performing a huge number of I/O operations. Your requirement is to kill the session when it exceeds a specified number of I/Os. Which statement describes a solution to the above? D. Implement the database resource manager to add the SWITCH_IO_REQS and SWITCH_GROUP directives. Answer: D SWITCH_IO_REQS Specifies the number of I/O requests that a session can execute before an action is taken. Default is UNLIMITED. The action is specified by SWITCH_GROUP. SWITCH_GROUP Specifies the consumer group to which a session is switched if switch criteria are met. If the group name is 'CANCEL_SQL', then the current call is canceled when switch criteria are met. If the group name is 'KILL_SESSION', then the session is killed when switch criteria are met. Default isNULL. If the group name is 'CANCEL_SQL', the SWITCH_FOR_CALL parameter is always set to TRUE, overriding the user-specified setting. 268.You are using Recovery Manager (RMAN) for backup and recovery operations with a recovery catalog. You have been taken database backups every evening. On November 15, 2007, at 11:30 AM, you were informed that the USER_DATA tablespace was accidentally dropped. On investigation, you found that the tablespace existed until 11:00 AM, and important transactions were done after that. So you decided to perform incomplete recovery until 11:00 AM. All the archive logs needed to perform recovery are intact. In NOMOUNT state you restored the control file that has information about the USER_DATA tablespace from the latest backup. Then you mounted the database. Identify the next set of commands that are required to accomplish the task? A.RMAN> run { SET UNTIL TIME 'Nov 15 2007 11:00:00'; RESTORE DATABASE; RECOVER DATABASE; } B 270.Which tasks are run automatically as part of the Automated Maintenance Task by default? (Choose all that apply.) A. Segment Advisor  段指导 B. SQL Access Advisor C. Optimizer statistics gathering 优化信息收集 D. Automatic SQL Tuning Advisor  自动SQL调试指导 E. Automatic Database Diagnostics Monitor Answer: ACD 271.  You verified that no table named SALES_TAB exists in the schema. Then you executed the following command to purge the objects in the recycle bin: SQL> PURGE TABLE sales_tab; What would be the outcome of this command? B. Only the table with the oldest DROPSCN is purged 272.You issue the following RMAN command to set a retention policy on a database: RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 2; What will be the outcome of issuing this command?   D. If the RMAN repository has records of two or more recent backups of a file, then older backups will be marked obsolete. 保留两个备份集 Answer: D 273.Which statements are true regarding the system-defined moving window baseline in Oracle Database 11g? (Choose all that apply.)   B. Adaptive threshold functionalities use it by default to compute statistics. 自适应阈值 功能  计算统计 C. It is created by default with the window size being equal to the AWR retention time. 默认窗口大小等于awr的保留时间  . Answer: BC 移动窗口基线(Moving Window Baseline) 移动窗口基线至关于AWR保留期间内存在的全部AWR数据。在使用自适应阈值时,这将颇有用处,由于数据库可使用AWR保留期间的全部AWR数据来计算出度量阈值。oracle数据库自动维护一个系统定义的移动窗口基线。系统定义的移动窗口基线的默认窗口大小等于当前AWR保留的时间,默认为8天。若是你要使用自适应阈值,能够考虑使用更大的移动窗口,例如30天,能够更精确地计算出阈值。你能够改变移动窗口的大小,这个值要等于或小于AWR保留天数。所以若你须要增大移动窗口的大小,首先须要增长AWR的保留时间。 274.The SQL Tuning Advisor has been configured with default configurations in your database instance. Which recommendation is automatically implemented without the DBA's intervention after the SQL Tuning Advisor is run as part of the AUTOTASK framework? B. SQL profile recommendations 275.You have enabled resumable space allocation in your database by setting the RESUMABLE_TIMEOUT parameter set to a nonzero value. Which three statements about resumable space allocation are true? (Choose three.) A. Even with resumable space allocation enabled for your database, you can disable resumable space allocation for a single session. B. A resumable statement is suspended only if an out of space error occurs. C. When a resumable statement is suspended, the transaction that contains the statement is also suspended. D. A resumable statement can only be suspended and resumed once during the execution of the statement. E. You can query the V$SESSION_WAIT dynamic performance view to identify the statements that are suspended for a session. Answer: ACE 276  EXPIRATION=>NULL); Which statement is true about the effect of the above command? A. It creates a baseline template that never expires. 277.The BOOKINGS table contains online booking information. When a booking is confirmed, the details are transferred to an archival table BOOKINGS_HIST and deleted from the BOOKINGS table. 在线订阅表确认后进入历史表  There is no fixed time interval between each online booking and its confirmation.交互时间不固定 Because sufficient space is not always available from the delete operations the high-water mark (HWM) is moved up and many rows are inserted below the HWM of the table. The BOOKINGS table has Automatic Segment Space Management (ASSM) and row movement enabled. The table is accessible in 24x7 mode. What is the most efficient method to reclaim回收再利用 the space released by the delete operations in the BOOKINGS table? B. Shrink the BOOKINGS table by using the ALTER TABLE... SHRINK SPACE command 使用SQL 收缩段 由于在按堆组织的段中,收缩操做可能会致使ROWID发生更改,因此在该段上执行收缩操做以前,必须在相应段上启用行移动。默认状况下,在段级别上行移动处于禁用状态。 要启用行移动,须要使用CREATE TABLE或ALTER TABLE命令的ENABLE ROW MOVEMENT子句。 使用ALTER命令能够针对对象调用段收缩。对象能够是下列类型之一:表(按堆组织的表或索引表)、分区、子分区、LOB(数据和索引段)、索引、实体化视图或实体化视图日志。 使用SHRINK          SPACE子句能够收缩段中的空间。若是指定了CASCADE,则收缩行为将级联到全部支持收缩操做的从属段,但实体化视图、LOB 索引和IOT(索引表)映射表例外 278.You issued the following command: CREATE GLOBAL TEMPORARY TABLE admin_work_area (startdate DATE, enddate DATE, class CHAR(20)) ON COMMIT DELETE ROWS TABLESPACE tbs_t1; An index is then created on the ADMIN_WORK_AREA temporary table. Which two statements are true regarding the TBS_T1 tablespace in the above command? (Choose two.) B. It stores both the temporary table as well as its indexes. D. It can be a default or nondefault temporary tablespace for the database. 279.Identify the activities performed as part of the Automatic SQL Tuning process in the maintenance window? (Choose all that apply.) 识别出能活动  作为自动SQL调试程序的一部分 在维护窗口 A. generating the SQL profile  生成SQL配置 B. testing and accepting the SQL profile  测试和接受SQL配置 C. generating a list of candidate SQLs for tuning  生成候选SQL调试列表 D. adding tuned SQL plans into the SQL plan baseline E. tuning each SQL statement in the order of importance   调试每条SQL语句  重要性顺序 F. generating baselines that include candidate SQLs for tuning Answer: ABCE 280.View the Exhibit to examine the replay settings for replay parameters. What is the implication for setting the values for replay parameters? (Choose all that apply.) A. The COMMIT order in the captured workload is preserved during replay. C. The value 100 in the CONNECT_TIME_SCALE parameter attempts to connect all sessions as captured. D. The value 100 in the THINK_TIME_SCALE parameter attempts to match the captured user think time while replaying. 281.You are working on a 24X7 database. You want to design a backup strategy for your database that uses user managed backups. You want to be able to perform all backups while the database remains online. Which statement about performing user-managed backups in a 24x7 environment is true? C. To back up a tablespace, it must be in backup mode 282.You are managing an Oracle 11g database with ASM storage, for which the COMPATIBLE initialization parameter is set to 11.1.0. In the ASM instance, the COMPATIBLE.RDBMS attribute for the disk group is set to 10.2 and the COMPATIBLE.ASM attribute is set to 11.1. Which two statements are true in this scenario for the features enabled for ASM? (Choose two.) A. The ASM-preferred mirror read feature is enabled. B. The ASM supports variable sizes for extents of 1, 8, and 64 allocation units. 283.You set the following parameters in the parameter file and restarted the database: MEMORY_MAX_TARGET=0 MEMORY_TARGET=500M PGA_AGGREGATE_TARGET=90M SGA_TARGET=270M Which two statements are true regarding these parameters after the database instance is restarted? (Choose two.) A. The MEMORY_MAX_TARGET parameter is automatically set to 500 MB. D. The lower bounds of PGA_AGGREGATE_TARGET and SGA_TARGET parameters are set to 90 MB and 270 MB, respectively. Answer: AD 284.Evaluate the following SQL statement used to create the PRODUCTS table: CREATE TABLE products (product_id NUMBER(3) PRIMARY KEY, product_desc VARCHAR2(25), qty NUMBER(8,2), rate NUMBER(10,2), total_value AS ( qty * rate))  PARTITION BY RANGE (total_value) (PARTITION p1 VALUES LESS THAN (100000),  PARTITION p2 VALUES LESS THAN(150000),  PARTITION p3 VALUES LESS THAN (MAXVALUE)) COMPRESS FOR ALL OPERATIONS; Which statement is true regarding this command? D. It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions. Answer: D 评估用来建立产品表的下面的SQL语句: D.它成功执行,但TOTAL_VALUE列中的值不会被物理地存储在分区里。 285.View the Exhibit to examine the error while executing the REPAIR FAILURE command in an RMAN session. What is the reason for this error? A. Another repair session is running concurrently. 286.The Oracle Database 11g database is running in the ARCHIVELOG mode. The archived redo log files are stored on three locations. The Flash Recovery Area is one of the locations. The details are given below: LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive' LOG_ARCHIVE_DEST_2 = 'SERVICE = stdb1' DB_RECOVERY_FILE_DEST = '/u01/oradata' Examine the following RMAN command issued to set the deletion policy for archived log files: RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO sbt; Which statement is true regarding what this command accomplishes? D. All archived redo log files in local archiving destinations and the flash recovery area backed up at least twice to tape are eligible  for 有资格的 deletion. Answer: D 287.Evaluate the following command: SQL> CREATE TABLE design_data (id NUMBER,doc CLOB) LOB(doc) STORE AS SECUREFILE(DEDUPLICATE); Which statement is true regarding the above command? D. All LOB data that is identical彻底相同的相同的 in two or more rows in a LOB column share the same data blocks. Answer: D   LOB重复消除   SecureFile的DEDUPLICATE选项容许在表或分区一级上的一个LOB内消除重复数据,正如你预料的那样,这个技术与预防重写致使系统开销增大,KEEP_DUPLICATE选项明确地阻止重复消除,下面的例子对比了普通的SecureFile和重复消除SecureFile的空间使用状况。 288.You are maintaining the SALES database. You have added a new disk to a disk group. Automatic Storage Management performs the rebalancing activity. You want to speed up the rebalancing activity. Which parameter should you specify to control the speed of the rebalancing activity? A. ASM_POWER_LIMIT 289.You are managing the APPPROD database as a DBA which is not using the Oracle-managed files. You plan to duplicate this database in the same system with the name DUPDB.You want to create the same directory structure for duplicate database files as of the target database. You executed the following RMAN commands: RMAN> CONNECT TARGET sys/sys@APPPROD RMAN> CONNECT AUXILIARY sys/sys@DUPDB RMAN> DUPLICATE TARGET DATABASE TO dupdb FROM ACTIVE DATABASE PASSWORD FILE SPILE NOFILENAMECHECK; What are the implications of this command? B. It overwrites data files of the target database because a different location for data files is not mentioned for the duplicate database. Answer: B 它覆盖目标数据库的数据文件,由于不一样的地方 NOFILENAMECHECK Prevents RMAN from checking whether the data files and online redo logs files of the source database are in use when the source database files share the same names as the duplicate database files. You are responsible for determining that the duplicate operation does not overwrite useful data 290.What are the recommendations for Oracle Database 11g installation to make it Optimal Flexible Architecture (OFA)-compliant? (Choose all that apply.) A. ORACLE_BASE should be set explicitly. B. An Oracle base should have only one Oracle home created in it. C. Flash recovery area and data file location should be on separate disks. D. Flash recovery area and data file location should be created under Oracle base in a non-Automatic Storage Management (ASM) setup. Answer: ACD 291.ENCRYPT_TS is an encrypted tablespace that contains tables with data. Which statement is true regarding the effect of queries and data manipulation language (DML) statements on the encrypted data in the tables? 加密表   C. The data remains encrypted when it is stored in the redo logs. To maximize security, data from an encrypted tablespace is automatically encrypted when written to the undo tablespace, to the redo logs, and to any temporary tablespace. There is no need to explicitly create encrypted undo or temporary tablespaces, and in fact, you cannot specify encryption for those tablespace type 292.You decided to use Direct NFS configuration in a non-RAC Oracle installation and created the oranfstab file in /etc. Which two statements are true regarding this oranfstab file? (Choose two.) C. It is globally available to all Oracle 11g databases on the machine. D. It contains file systems that have been mounted by the kernel NFS system. Answer: CD 293.Observe the following warning in an RMAN session of your database instance: WARNING: new failures were found since last LIST FAILURE command Which statement describes the scenario that must have produced this warning? C. The ADVISE FAILURE command has detected new failures recorded in the Automatic Diagnostic Repository (ADR) since the last LIST FAILURE. 294.Which tuning tool recommends how to optimize materialized views so that these views can take advantage of the general query rewrite feature? B. SQL Access Advisor 295.Which statement about using RMAN stored scripts is true? A. To create and execute an RMAN stored script, you must use a recovery catalog. 296.You perform the following activities during the database upgrade from Oracle Database 10g to Oracle Database 11g:你执行如下活动,在数据库从10g升级到11g时。 Capture plans for a SQL workload into a SQL Tuning Set (STS) before upgrade. 升级前捕获一个sql工做负载的计划到一个sql 调优集中Load these plans from the STS into the SQL plan baseline immediately after the upgrade.升级完成后,将STS中的计划导入到SQL计划基线中当即。 What is the reason for performing these activities? A. to minimize plan regression due to the use of a new optimizer version 最小化计划衰退,由于使用一个全新的优化器版本。 297.View the Exhibit for some of the parameter settings. You start a session and issue the following command: SQL>CREATE INDEX emp_ename ON emp(ename) TABLESPACE users INVISIBLE; What is the outcome of the above command? A. The index is not used by the optimizer but is maintained during DML operations. 索引不能被优化器所使用,可是能够被DML操做所维护    当你在批量加载数据的时候,想要改变性能或者测试删除索引后的性能,可使用unusable index 或者是 invisible index 那么 unusable index 和invisible  index 有什么区别呢 unusable index (1)unusable index 是被优化器所忽略,而且不被dml操做维护。可是unusable index 能够改变批量加载的性能  (2) 任何现有的索引变成unusable后,索引段都会被删除 (3)因为unusable index 是不会被dml操做维护,索引变成unusable index后必须经过rebuild index 或者drop index  and create index (4)当参数  SKIP_UNUSABLE_INDEXES =true时 dml操做时针对表的操做,对于索引是不会维护的。 惟一约束使用的索引变成unusable,dml操做会报错。 对于非分区索引,对于select 语句,优化器不考虑任何unusable index   ,除非明确指明使用 index hint强调       对于分区索引,一个或者多个分区能够unusable,, the optimizer does not consider the index if it cannot determine at query compilation time if any of the index partitions can be pruned  ,除非明确指明使用 index hint强调  .     (5)当参数SKIP_UNUSABLE_INDEXES =FALSE   当 unusable index 或者分区unusable index ,在dml操做更新索引时,会遇到错误 当 select 语句遇到  unusable index 或者分区 unusable index 时,优化器不会考虑使用它,可是若是优化器使用了unusable index 就会报错  (6)建立分区unusable index    hr@PROD> CREATE INDEX i_emp_ename ON employees_part (employee_id) 2 LOCAL (PARTITION p1_i_emp_ename UNUSABLE, PARTITION p2_i_emp_ename); Index created.  (7) 现有索引变成unusable索引              ALTER INDEX emp_email_uk UNUSABLE; invisible index    (1)从11g开始,就有了invisible index    (2)invisible index会被优化器所忽略,可是dml操做仍然会维护索引,批量提交数据不会提示性能    (3)若是在session或者system级别使用参数OPTIMIZER_USE_INVISIBLE_INDEXES=true,那么优化器会考虑使用invisible index   (4)你可使一个分区索引变成invisible index,可是你不能使单个分区变成invisible index,而其余分区visible   (5)invisible index只是让优化器不可见,索引段中的数据仍是存在的,而且dml操做维护索引,因此visible index后,不须要重建索引     (6)建立 invisible index       CREATE INDEX emp_ename ON emp(ename) TABLESPACE users STORAGE (INITIAL 20K NEXT 20k) INVISIBLE;                  (7) 现有索引变成invisible index                        ALTER INDEXindex INVISIBLE 298.While tuning a SQL statement, the SQL Tuning Advisor finds an existing SQL profile for the statement that has stale陈旧 statistics统计 available. What would the optimizer do in this situation? B. It makes the statistics information available to GATHER_STATS_JOB. Actions represent the jobs that are performed by a module. For example, the DBMS_SCHEDULER module can run the GATHER_STATS_JOB action to gather statistics on all database objects. If a single action is using the majority of the wait time, then you should investigate it. 299.In your database, the LDAP_DIRECTORY_SYSAUTH initialization parameter has been set to YES and the users who need to access the database as DBAs have been granted SYSDBA enterprise role in Oracle Internet Directory (OID). SSL and the password file have been configured. A user SCOTT with the SYSDBA privilege tries to connect to the database instance from a remote machine using the command: $ SQLPLUS scott/tiger@DB01 AS SYSDBA where DB01 is the net service name. Which authentication method would be used first? A. authentication by password file 从$ SQLPLUS scott/tiger@DB01 AS SYSDBA,是使用密码验证的,明显看到scott帐户的密码就是tiger LDAP_DIRECTORY_SYSAUTH enables or disables directory-based authorization for SYSDBA and SYSOPER. 300.The following databases are registered in the base recovery catalog: PROD1, PROD2, and PROD3. The database user CATOWNER owns the base recovery catalog. You want a new user VPC1 to have access to only the PROD1 database and create a virtual private catalog. Given below are some of the commands required to achieve this: 1.SQL> GRANT recovery_catalog_owner TO vpc1; 2.RMAN> CONNECT CATALOG vpc1/password@catdb; 3.RMAN> GRANT CATALOG FOR DATABASE prod1 TO vpc1; 4.RMAN> CONNECT CATALOG catowner/password@catdb; 5.RMAN> CREATE VIRTUAL CATALOG; What is the correct sequence in which the commands have to be executed? B. 1, 4, 3, 2, 5 道题考建立虚拟专用目录以及受权限制VPC1用户只能访问PROD1 步骤以下: 如下是使用rman虚拟专用目录步骤: 1. 建立RMAN 基本目录: RMAN> CONNECT CATALOG catowner/oracle@catdb RMAN> CREATE CATALOG; 2. 将RECOVERY_CATALOG_OWNER授予给VPC 全部者: SQL> CONNECT SYS/oracle@catdb AS SYSDBA SQL> GRANT RECOVERY_CATALOG_OWNER to vpcowner; 3a.将REGISTER授予给VPC 全部者: RMAN> CONNECT CATALOG catowner/oracle@catdb RMAN> GRANT REGISTER DATABASE TO vpcowner; 3b.或将CATALOG FOR DATABASE授予给VPC 全部者: RMAN>GRANT CATALOG FOR DATABASE db10g TO vpcowner; 4a.为11g客户机建立虚拟目录: RMAN> CONNECT CATALOGvpcowner/oracle@catdb RMAN> CREATE VIRTUAL CATALOG; 4b.或者为11g以前的客户机建立虚拟目录: SQL> CONNECT vpcowner/oracle@catdb SQL> exec catowner.dbms_rcvcat.create_virtual_catalog; 5. 在目录中注册新数据库: RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb RMAN> REGISTER DATABASE; 6. 使用虚拟目录: RMAN> CONNECT TARGET / CATALOG vpcowner/oracle@catdb; RMAN> BACKUP DATABASE; 能够为数据库组和用户组建立虚拟专用RMAN 目录。 1. 目录全部者将建立基本目录。 2. 目录数据库的DBA 能够建立拥有虚拟专用目录(VPC) 的用户,并授予其RECOVERY_CATALOG_OWNER权限。 3. 基本目录的全部者可为VPC 全部者授予访问先前注册的数据库的权限或授予REGISTER权限。GRANT CATALOG命令以下: GRANT CATALOG FOR DATABASE prod1, prod2 TO vpcowner; GRANT REGISTER命令以下: GRANT REGISTER DATABASE TO vpcowner; 而后,虚拟目录全部者可链接到特定目标的目录,或者注册一个目标数据库。配置完VPC 以后,VPC 全部者可像使用标准基本目录同样使用该目录。 4. 建立虚拟专用目录。 a. 若是目标数据库是Oracle Database 11g数据库而且RMAN 客户机是11g客户机,则可以使用RMAN 命令: CREATE VIRTUAL CATALOG; b. 若是目标数据库是Oracle Database 10g发行版2 或更早版本(使用兼容客户机),则必须从SQL*Plus 执行提供的过程: BASE_CATALOG_OWNER.DBMS_RCVCAT.CREATE_VIRTUAL_CATALOG; 5. 使用VPC 全部者登陆名链接到该目录,将其做为常规目录使用。 6. 虚拟目录全部者只能查看其有访问权限的那些数据库。对于大多数RMAN 操做,你还须要针对目标数据库的SYSDBA或SYSOPER权限。 301.Which command is used to configure RMAN to perform a compressed backup for every backup executed? C. CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET