hoyong

导航

ocp1Z0-053

1.While deploying a new application module, the software vendor ships the application software along with appropriate SQL plan baselines for the new SQLs being introduced. Which two statements describe the consequences? (Choose two.)

A. The plan baselines can be evolved over time to produce better performance.

B. The newly generated plans are directly placed into the SQL plan baseline without being verified.

C. The new SQL statements initially run with the plans that are known to produce good performance under standard test configuration.

D. The optimizer does not generate new plans for the SQL statements for which the SQL plan baseline has been imported.

 

Answer: AC

答案解析:

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

当部署一个新的应用模块时,软件供应商与用于被引入的新SQL的适当的SQL计划基线一起运送应用软件。哪两个语句描述了后果? 

A, 计划基线可以随着时间的推移演变,产生更好的性能。

C,新的SQL语句最初与计划一起运行,该计划在标准测试配置下已知能产生良好的性能。

 新应用程序部署:部署新的应用程序模块意味着在系统中引入新的 SQL 语句。软件供应商可以将应用程序软件与新引入的SQL 语句的相应SQL 计划基线一起提供。由于存在计划基线,新的SQL 语句最初将与已知在标准测试配置下具有良好性能的计划一起运行。但是,如果客户系统配置与测试配置有很大的差异,则计划基线可随时间演化以产生更好的性能。

 

2.You plan to have a larger moving window size for the default system-defined moving window baseline because you want to use the adaptive threshold. Which statement factors in this consideration while increasing the size of the moving window.?

A. The collection level for the AWR should be set to BASIC.

B. The moving window size must be less than Undo Retention.

C. The moving window size should be greater than the Automatic Workload Repository (AWR) retention period.

D. The moving window size should be equal to or less than the Automatic Workload Repository (AWR) retention period.

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94178

Moving Window Baseline

A moving window baseline corresponds to all AWR data that exists within the AWR retention period. This is useful when using adaptive thresholds because the database can use AWR data in the entire AWR retention period to compute metric threshold values.

Oracle Database automatically maintains a system-defined moving window baseline. The default window size for the system-defined moving window baseline is the current AWR retention period, which by default is 8 days. If you are planning to use adaptive thresholds, consider using a larger moving window—such as 30 days—to accurately compute threshold values. You can resize the moving window baseline by changing the number of days in the moving window to a value that is equal to or less than the number of days in the AWR retention period. Therefore, to increase the size of a moving window, you must first increase the AWR retention period accordingly.

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

移动窗口基线

Oracle Database 会自动维护一个系统定义的移动窗口基线。系统定义的移动窗口基线的默认窗口大小为当前的AWR 保留期(默认为八天)。如果计划使用自适应阈值,则可考虑使用较大的移动窗口(如30 天),以便精确地计算阈值。通过将移动窗口中的天数更改为等于或小于AWR 保留期中的天数的值,可以调整移动窗口基线的大小。因此,要增加移动窗口的大小,需要先相应地增加AWR 保留期。

这种系统定义的基线提供了一个现成的默认基线,EM 的性能屏幕可对照当前的数据库性能对性能进行比较。

注:在Oracle Database 11g中,快照数据的默认保留期已经从七天更改为八天,以确保捕获整周的性能数据。

 

3.Your database is in ARCHIVELOG mode. You have two online redo log groups, each of which contains one redo member. When you attempt to start the database, you receive the following errors:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: 'D:\REDO01.LOG'

You discover that the online redo log file of the current redo group is corrupted.

Which statement should you use to resolve this issue?

A. ALTER DATABASE DROP LOGFILE GROUP 1;

B. ALTER DATABASE CLEAR LOGFILE GROUP 1;

C. ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 1;

D. ALTER DATABASE DROP LOGFILE MEMBER 'D:\REDO01.LOG';

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90052

Table 30-4 Recovering After the Loss of an Online Redo Log Group

If the Group Is...

Then...

And You Should...

Inactive

It is not needed for crash recovery

Clear the archived or unarchived group.

Active

It is needed for crash recovery

Attempt to issue a checkpoint and clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

Current

It is the redo log that the database is currently writing to

Attempt to clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

 

你的数据库在归档记录模式。你有两个在线重做日志组,其中每个都包含一个重做成员。当您尝试启动数据 库时,您会收到以下错误:

ORA-00313:线程1日志组1成员打开失败 

ORA-00312:联机日志1线程1:'D:\ REDO01.LOG

你发现当前的重做组联机重做日志文件被损坏。你应该使用哪种说法来解决这个问题?

Clearing Inactive, Unarchived Redo

SQL> STARTUP MOUNT

Clear the log using the UNARCHIVED keyword.

SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 2;

 

4.Which three components does the Scheduler use for managing tasks within the Oracle environment? (Choose three.)

A. a job

B. a program

C. a schedule

D. a PL/SQL procedure

 

Answer: ABC

答案解析:

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

在Oracle环境调度程序为管理任务使用哪三个组件?

A. a job作业

B. a program程序

C. a schedule调度

核心组件和主要步骤

一个作业包含两个必需组件:需要执行的操作,操作的发生时间或调度。“操作”是由命令区域和作业属性中的job_type和job_action参数表示的。“时间”是在调度中表示的,调度可以基于时间或事件,或者从属于其它作业的结果。

调度程序使用以下基本组件:

• “作业”指定要执行的操作。它可以是PL/SQL 过程、纯二进制可执行文件、Java 应用程序或Shell 脚本。可以将程序(内容)和调度(时间)指定为作业定义的一部分,也可以改用现有的程序或调度。可以使用作业的参数来定制其运行时行为。

• “调度”指定作业的执行时间和次数。调度可以基于时间或事件。可以为作业定义调度,方法是使用一系列日期、一个事件,或两者相结合,以及表示重复间隔的附加说明。可以单独存储作业的调度,然后对多个作业使用同一个调度。

• “程序”是有关特定可执行文件、脚本或过程的元数据集合。自动作业将执行某个任务。使用程序,无需修改作业本身即可修改作业任务或者“内容”。可以定义程序的参数,使用户可以修改任务的运行时行为。

 

5.Examine the section of the Health Check report given below:

DBMS_HM.GET_RUN_REPORT('HM_RUN_1061')

Run Name : HM_RUN_1061 

Run Id : 1061 

Check Name : Data Block Integrity Check 

Mode :REACTIVE 

Status : COMPLETED 

Start Time : 2007-05-12 22:11:02.032292 -07:00 

End Time :  2007-05-12 22:11:20.835135 -07:00 

Error Encountered : 0

Source Incident Id : 7418

Number of Incidents Created :0

Which two statements are true regarding the Health Check report? (Choose two.)

A. Health Check was performed manually.

B. Health Check was performed to check the disk image block corruptions.

C. Health Check was performed to check interblock and intersegment corruption.

D. Health Check was performed to verify the integrity of database files and report failures.

E. Health Check was performed by the Health Monitor automatically in response to a critical error.

 

Answer: AB

 

6.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 also want to deregister them from the catalog after import.You executed the following commands to achieve this:

RMAN> CONNECT CATALOG rco11/password@catdb

RMAN> IMPORT CATALOG rcat10/oracle@inst1 DBID=1423241,1423242;

What happens if the RCO11 catalog has scripts with the same name as that of the scripts in RCAT10 catalog?

A. The scripts in the RCO11 catalog are overwritten.

B. RMAN renames the local stored scripts in the RCO11 catalog.

C. The RMAN session in which the command is executed aborts.

D. RMAN renames the global scripts that are imported from the RCAT10 catalog.

 

Answer: D

题目解答:全局重命名

 

7.You need to configure fine-grained access control to external network resources from within your database. You create an access control list (ACL) using the DBMS_NETWORK_ACL_ADMIN package. Which statement is true regarding the ACL created?

A. It is a list of remote database links stored in the XML file that are available to the users of the database.

B. It is a list of users and network privileges stored in the XML file according to which a group of users can connect to one or more hosts.

C. It is a list of users and network privileges stored in the data dictionary according to which a group of users can connect to one or more hosts.

D. It is the list of the host names or the IP addresses stored in the data dictionary that can connect to your database through PL/SQL network utility packages such as UTL_TCP.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/network.112/e36292/authorization.htm#DBSEG99983

 

The DBMS_NETWORK_ACL_ADMIN package provides the interface to administer the network Access Control List (ACL).

 

 

9.Which statement describes the information returned by the DBMS_SPACE.SPACE_USAGE procedure for LOB space usage?

A. It returns space usage of only BasicFile LOB chunks.

B. It returns space usage of only SecureFile LOB chunks.

C. It returns both BasicFile and SecureFile LOB space usage for only nonpartitioned tables.

D. It returns both BasicFile and SecureFile LOB space usage for both partitioned and nonpartitioned tables.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_space.htm#ARPLS68116

感觉这道题有歧义,如果题目指定为SECUREFILE LOB space usage,则B是正确的。

 

10.Consider the following scenario for your database:

-Backup optimization is enabled in RMAN. The recovery window is set to 7 days in RMAN. The most recent backup to disk for the TOOLS tablespace was taken on November 3, 2007.

The TOOLS tablespace is read-only since November 4, 2007.On November 23, 2007, you issue the RMAN command to back up the database to disk. Which statement is true regarding the backup of the TOOLS tablespace?

A. The RMAN backup fails because the TOOLS tablespace is read-only

B. The RMAN skips the backup of the tablespace because backup optimization is enabled

C. The RMAN makes backup because optimization can be enabled only for backups to disk

D. The RMAN makes the backup because no backup of the tablespace exists within the seven day window

 

Answer: D

答案解析:

参考:备份优化:http://blog.csdn.net/rlhua/article/details/12312463

备份优化是指:通过跳过未更改的文件(如已经备份的只读和脱机数据文件)优化整个数据库备份。

启用了备份优化:RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

参考:指定保留策略: http://blog.csdn.net/rlhua/article/details/12308231

保留恢复到指定天数内任意时间的状态所需的备份(时间点恢复)

可以使用下列命令语法配置恢复窗口保留策略:

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF <天数>DAYS;

本题设置为7天。

RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

题意:最近的一次TOOLS表空间是 November 3, 2007,November 4, 2007变为只读,November 23, 2007执行RMAN备份。

仅当符合保留策略的备份不存在时,备份优化才会让RMAN 备份只读表空间。

根据备份优化,如果在November 3, 2007之后的7天内备份,则在rman备份时跳过只读表空间,即TOOLS表空间。

如果超过7天,即之前保留的备份已经没有了,再次执行RMAN命令时,此时的TOOLS表空间并没有备份,则执行RMAN命令时,TOOLS表空间也要被备份。

故选D。tools这个只读表空间在7天的时间窗口没有备份。

 

11.View the Exhibit to examine the metrics with a threshold. Which statement is true regarding the Number of Transactions (per second) metric?


A. Oracle uses statistical relevance to determine when an adaptive threshold has been breached for the metric.
B. The statistics for the metric values observed over the baseline time period are not examined to determine threshold values.
C. Oracle determines when an adaptive threshold has been breached based on the maximum value captured by the baseline.
D. The total concurrent number of threshold violations, which must occur before an alert is raised for the metric, has been set to zero.

Answer: A
题目解答: B 要检查 C 基线最大值无关与统计信息有关 D 与必须无关 只有 A 正确

 

12.You performed the RMAN database backup having a backupset key number 231 with the KEEP FOREVER option.After some days, you want to change the status of the database backup and you issued the following command:

RMAN>CHANGE BACKUPSET 231 NOKEEP;

What is the implication of this command?

A. The backup is deleted.

B. The backup is marked unavailable.

C. The backup overrides the backup retention policy.

D. the backup becomes eligible for deletion according to the existing retention policy

 

Answer: D

答案解析

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsubcl011.htm#RCMRF90453

你执行RMAN数据库备份带一个键号231的、永远保持选项的备份集。过了些日子,你要更改的数据库备份的状态,并发出以下命令:

RMAN>CHANGE BACKUPSET 231 NOKEEP;

D,备份变为适合根据已有的保持策略来进行删除

 

NOKEEP

Specifies that any KEEP attributes no longer apply to the backup. Thus, the backup is a normal backup that is subject to the configured backup retention policy. This is the default behavior if no KEEP option is specified.

 

13.View the Exhibit that sets the threshold for the Current Open Cursors Count metric. Why is the Significance Level  threshold type not available in the threshold setting?

 

 

A. because AWR baseline is not enabled

B. because Current Open Cursors Count is not a basic metric

C. because the STATISTICS_LEVEL parameter is set to BASIC

D. because the AWR baseline is a system-defined moving window baseline

 

Answer: B

答案解析:

significance level  显著性水平。

这道题是问,为什么阈值类型没有显著性水平?

 

 

点击编辑阈值后

 

 

14.Which two statements are true regarding hot patching? (Choose two.)

A. It requires relinking of the Oracle binary.

B. It does not require database instance shutdown.

C. It can detect conflicts between two online patches.

D. It is available for installing all patches on all platforms.

E. It works only in a single database instance environment.

 

Answer: BC

答案解析:

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

 

安装热补丁程序

• 应用热补丁程序不需要关闭实例、重新链接Oracle二进制文件或重新启动实例。

• OPatch 可用于安装或卸载热补丁程序。

• OPatch 可以检测两个热补丁程序之间以及热补丁程序与常规补丁程序之间的冲突。

 

15.You are in the process of creating a virtual private catalog in your Oracle Database 11g database. The PROD1, PROD2, and PROD3 Oracle Database 10g databases are registered in the base recovery catalog. The database user who owns the base recovery catalog is CATOWNER. CATOWNER executes the following command to grant privileges to a new user VPC1 using Oracle Database 11g RMAN executables:

RMAN> GRANT CATALOG FOR DATABASE prod1, prod2 TO vpc1;

Then you issue the following commands:

RMAN> CONNECT CATALOG vpc1/oracle@catdb;

RMAN> SQL "EXEC catowner.dbms_rcvcat.create_virtual_catalog;"

What is the outcome of the above commands?

A. They execute and create a virtual catalog for pre-Oracle 11g clients.

B. They produce an error because PROD1 and PROD2 databases belong to the older version.

C. They produce an error because you need to connect as CATOWNER to execute this packaged

procedure.

D. They produce an error because you need to connect to the target database to execute this packaged procedure.

 

Answer: A

答案解析:

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

以下是使用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权限。

 

 

 

16.Because of a logical corruption in your production database, you wanted to perform Tablespace Point in Time Recovery (TSPITR). But before you start the recovery, you queried the

TS_PITR_OBJECTS_TO_BE_DROPPED view and realized that there are a large number of objects that would be dropped when you start the recovery by using this method. You want to preserve these objects.

Which option must you use to perform TSPITR and preserve the object?

A. Perform Export before TSPITR and Import after TSPITR

B. Move objects to another schema that has the same tablespace assigned

C. Perform Incomplete Recovery before TSPITR with the Log Sequence Number (LSN)

D. Perform Incomplete Recovery before TSPITR with the System Change Number (SCN)

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV89795

When you perform RMAN TSPITR on a tablespace, objects created after the target recovery time are lost. You can preserve such objects after they are identified by exporting them before TSPITR with the Data Pump Export utility and reimporting them afterward with Data Pump Import.

To determine which objects are lost in TSPITR, query the TS_PITR_OBJECTS_TO_BE_DROPPED view on the primary database.

 

17.The INV_HISTORY table is created using the command:

SQL>CREATE TABLE INV_HISTORY (inv_no NUMBER(3), inv_date DATE, inv_amt NUMBER(10,2))

partition by range (inv_date) interval (numtoyminterval(1,'month'))

 (partition p0 values less than (to_date('01-01-2005','dd-mm-yyyy')), 

partition p1 values less than (to_date('01-01-2006','dd-mm-yyyy')));

 

The following data has been inserted into the INV_HISTORY table :

INV_NO INV_DATE INV_AMT 

1 30-dec-2004 1000 

2 30-dec-2005 2000 

3 1-feb-2006 3000 

4 1-mar-2006 4000 

5 1-apr-2006 5000

You would like to store the data belonging to the year 2006 in a single partition and issue the command:

SQL> ALTER TABLE inv_history MERGE PARTITIONS

FOR(TO_DATE('15-feb-2006','dd-mon-yyyy')), FOR(TO_DATE('15-apr-2006')) INTO PARTITION sys_py;

What would be the outcome of this command?

A. It executes successfully, and the transition point is set to '1-apr-2006'.

B. It executes successfully, and the transition point is set to '15-apr-2006'.

C. It produces an error because the partitions specified for merging are not adjacent.

D. It produces an error because the date values specified in the merge do not match the date values stored in the table.

 

Answer: C

答案解析:

参考实验:

sys@TEST1107> CREATE TABLE INV_HISTORY (inv_no NUMBER(3), inv_date DATE, inv_amt NUMBER(10,2))

  2  partition by range (inv_date) interval (numtoyminterval(1,'month'))

  3  (partition p0 values less than (to_date('01-01-2005','dd-mm-yyyy')),

  4  partition p1 values less than (to_date('01-01-2006','dd-mm-yyyy')));

 

Table created.

sys@TEST1107> insert into INV_HISTORY values (1,'30-dec-2004',1000);  

1 row created.

sys@TEST1107> insert into INV_HISTORY values (2,'30-dec-2005',2000);

1 row created.

sys@TEST1107> insert into INV_HISTORY values (3,'1-feb-2006',3000);

1 row created.

sys@TEST1107> insert into INV_HISTORY values (4,'1-mar-2006',4000);

1 row created.

sys@TEST1107> insert into INV_HISTORY values (5,'1-apr-2006',5000)

1 row created.

sys@TEST1107> select * from INV_HISTORY;

    INV_NO INV_DATE              INV_AMT

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

         1 30-DEC-04                1000

         2 30-DEC-05                2000

         3 01-FEB-06                3000

         4 01-MAR-06                4000

         5 01-APR-06                5000

sys@TEST1107> select * from INV_HISTORY partition(p0);

    INV_NO INV_DATE              INV_AMT

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

         1 30-DEC-04                1000

 

sys@TEST1107> select * from INV_HISTORY partition(p1);

    INV_NO INV_DATE              INV_AMT

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

         2 30-DEC-05                2000

sys@TEST1107> ALTER TABLE inv_history MERGE PARTITIONS

  2  FOR(TO_DATE('15-feb-2006','dd-mon-yyyy')), FOR(TO_DATE('15-apr-2006')) INTO PARTITION sys_py;

ALTER TABLE inv_history MERGE PARTITIONS

*

ERROR at line 1:

ORA-14274: partitions being merged are not adjacent

INTERVAL Clause

Use this clause to establish interval partitioning for the table. Interval partitions are partitions based on a numeric range or datetime interval. They extend range partitioning by instructing the database to create partitions of the specified range or interval automatically when data inserted into the table exceeds all of the range partitions.

 

18.You create a new Automatic Database Diagnostic Monitor (ADDM) task:
instance_analysis_mode_task. To view the ADDM report, you use the following command:
SQL> SELECT dbms_addm.get_report('my_instance_analysis_mode_task') FROM dual;
You want to suppress ADDM output relating to Segment Advisor actions on user SCOTT's segments.
What would you do to achieve this?
A. Add a finding directive for the ADDM task.
B. Add a segment directive for the ADDM task.
C. Add a parameter directive for the ADDM task.
D. Disable the Segment Advisor from the Automatic Maintenance Task.

Answer: B
题目解答:使用 DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE 之后就可以得到需要的段信息了

 

19.A PL/SQL procedure queries only those columns of a redefined table that were unchanged by the online table redefinition. What happens to the PL/SQL procedure after the online table redefinition?
A. It remains valid.
B. It becomes invalid for all options of online table redefinition but automatically gets revalidated the next time it is used.
C. It becomes invalid for all options of online table redefinition and is automatically recompiled during online redefinition of the table.
D. It becomes invalid only if the storage parameters have been modified and it automatically gets revalidated the next time it is used.

Answer: A
题目解答: 表又没丢失联机定义后自然是正常的。

 

20.View the Exhibit and examine the resource consumption details for the current plan in use by the database instance.Which two statements are true based on the output? (Choose two.)

Exhibit:

 

A. An attempt to start a new session by the user belonging to DSS_QUERIES fails with an error

B. A user belonging to DSS_QUERIES can log in to a new session but the session will be queued

C. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to resource management

D. The CPU_WAIT_TIME column indicates the total time that sessions in the consumer group waited for the CPU due to resource management, I/O waits, and latch or enqueue contention

Answer: BC 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_2157.htm#REFRN30214

 

V$RSRC_CONSUMER_GROUP:包含所有活动组统计信息的视图

下面简要描述了此视图中的部分列:

• name:使用者组的名称。

• active_sessions:此使用者组中的当前活动会话数。

• execution_waiters:等待时间片断的活动会话数。

• requests:此使用者组中累计执行的请求数。

QUEUE_LENGTH:Number of sessions waiting in the queue:在队列中等待的会话数。

CPU_WAIT_TIME:Cumulative amount of time that sessions waited for CPU because of resource management. This does not include waits due to latch or enqueue contention, I/O waits, and so on.:因为资源理,会话等待CPU累积大量时间。这不包括锁存或排队争用,I/ O等待等等。

会话等待CPU 的累计时间。

• consumed_cpu_time:所有会话累计消耗的CPU 时间。

 

21.You are managing an Oracle Database 11g instance. You want to create a duplicate database for testing purpose. What are the prerequisites for performing the active database duplication? (Choose all that apply.)

A. The source database backup must be copied over the net for test database.

B. The source database must be run in ARCHIVELOG mode if the database is open.

C. The source database must be shut down cleanly if the database is in mounted state.

D. A net service name should be set up and a listener configured with the target as well as the source database.

 

Answer: BCD

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90152

 

 

通过使用Oracle Enterprise Manager 或RMAN DUPLICATE命令的FROM ACTIVE DATABASE子句,可以指示源数据库直接将映像副本和归档日志副本复制到辅助实例。

此操作不需要使用备份。RMAN 作为TARGET连接到源数据库实例并作为AUXILIARY连接到辅助实例。

通过实例间的网络连接将数据库文件从源数据库复制到目标数据库或辅助实例。RMAN 随后使用“内存脚本”(仅包含在内存中)完成恢复并打开数据库。

Active duplication:RMAN duplicates the files directly from either an open or mounted database.

A,从活动数据库复制,不需要拷贝备份。错误。

B,源数据库必须是归档模式,正确。

C,如果数据库是mount状态,那么源数据库一定是shut down cleanly。正确。

D,需要建立网络服务名和配置监听。正确。

Prerequisites Specific to Active Database Duplication

 

 

22.An index called ORD_CUSTNAME_IX has been created on the CUSTNAME column in the ORDERS table using the following command:

SQL>CREATE INDEX ord_custname_ix ON orders(custname);

The ORDERS table is frequently queried using the CUSTNAME column in the WHERE clause. You want to check the impact on the performance of the queries if the index is not available. You do not want the index to be dropped or rebuilt to perform this test.

Which is the most efficient method of performing this task?

A. disabling the index

B. making the index invisible

C. making the index unusable

D. using the MONITORING USAGE clause for the index

 

Answer: B

Creating an Invisible Index

An invisible index is an index that is ignored by the optimizer unless you explicitly set the OPTIMIZER_USE_INVISIBLE_INDEXES initialization parameter to TRUE at the session or system level.

To create an invisible index: 

Use the CREATE INDEX statement with the INVISIBLE keyword.

The following statement creates an invisible index named emp_ename for the ename column of the emp table:

CREATE INDEX emp_ename ON emp(ename)

      TABLESPACE users

      STORAGE (INITIAL 20K

      NEXT 20k) INVISIBLE;

 

隐藏索引

scott@TESTDB> create index emp_ename_i on emp(ename) invisible;

 

scott@TESTDB> select index_name,VISIBILITY from user_indexes; 

 

INDEX_NAME           VISIBILIT

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

PK_EMP               VISIBLE

EMP_SAL_F            VISIBLE

EMP_COMM_I           VISIBLE

EMP_ENAME_I          INVISIBLE

PK_DEPT              VISIBLE

 

scott@TESTDB> select * from emp where ename='KING';

 

 

 

没有走索引

 

切换到系统用户,修改参数

sys@TESTDB> alter session set optimizer_use_invisible_indexes=true;

Session altered.

sys@TESTDB> select * from scott.emp where ename='KING';

 

 

 

隐藏索引变正常索引或反之

sys@TESTDB> alter index scott.emp_ename_i visible;

 Index altered.

 scott@TESTDB>  select index_name,VISIBILITY from user_indexes;

 INDEX_NAME                     VISIBILIT

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

PK_EMP                         VISIBLE

EMP_SAL_F                      VISIBLE

EMP_COMM_I                     VISIBLE

EMP_ENAME_I                    VISIBLE

PK_DEPT                        VISIBLE

  

多个索引,把慢的索引隐藏点,让他走快的索引

  scott@TESTDB> alter index emp_ename_i visible;

 Index altered.

 

23.Which tasks can be accomplished using the DBMS_LOB. SETOPTIONS procedure?
A. only encryption and compression settings for all SecureFile LOBs
B. only encryption and deduplication settings for only SecureFile CLOBs
C. deduplication, encryption, and compression settings for all SecureFile LOBs
D. deduplication, encryption, and compression settings only for SecureFile CLOBs

Answer: C
解析:

参考DBMS_LOB.SETOPTIONS过程

这个过程在per-LOB基础上开启或禁用CSCE功能, 覆盖默认的LOB列的设置.

DBMS_LOB包中常量的定义:

COMPRESS_OFF, COMPRESS_ON

DEDUPLICATE_OFF, DEDUPLICATE_ON

ENCRYPT_OFF, ENCRYPT_ON

 

24.Which of the following information will be gathered by the SQL Test Case Builder for the problems pertaining to SQL-related problems? (Choose all that apply.)

A. ADR diagnostic files

B. all the optimizer statistics

C. initialization parameter settings

D. PL/SQL functions, procedures, and packages

E. the table and index definitions and actual data

 

Answer: BCE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_overview.htm#PFGRF16001

此题答案有误,E错误,不包含actual data。

正确答案应该为BCD

Building SQL Test Cases

For many SQL-related problems, obtaining a reproducible test case makes it easier to resolve the problem. Starting with the 11g Release 2 (11.2), Oracle Database contains the SQL Test Case Builder, which automates the somewhat difficult and time-consuming process of gathering and reproducing as much information as possible about a problem and the environment in which it occurred.

SQL Test Case Builder captures information pertaining to a SQL-related problem, along with the exact environment under which the problem occurred, so that you can reproduce and test the problem on a separate database. After the test case is ready, you can upload the problem to Oracle Support to enable support personnel to reproduce and troubleshoot the problem.

The information gathered by SQL Test Case Builder includes the query being executed, table and index definitions (but not the actual data), PL/SQL functions, procedures, and packages, optimizer statistics, and initialization parameter settings.

 

25.You enabled Flashback Data Archive on the INVENTORY table. Which DDL operation is supported on the table after enabling Flashback Data Archive?

A. Drop the table.

B. Partition the table

C. Truncate the table.

D. Add a column to the table.

E. Rename a column in the table.

 

Answer: D

 

答案解析:

根据D50081CN11 Oracle Database 11g:面向管理员的新增功能文档

 

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

官方参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS640

 

DDL Statements on Tables Enabled for Flashback Data Archive

Flashback Data Archive supports only these DDL statements:

ALTER TABLE statement that does any of the following:

Adds, drops, renames, or modifies a column

Adds, drops, or renames a constraint

Drops or truncates a partition or subpartition operation

TRUNCATE TABLE statement

RENAME statement that renames a table

Flashback Data Archive does not support DDL statements that move, split, merge, or coalesce partitions or subpartitions, move tables, or convert LONG columns to LOB columns.

For example, the following DDL statements cause error ORA-55610 when used on a table enabled for Flashback Data Archive:

ALTER TABLE statement that includes an UPGRADE TABLE clause, with or without an INCLUDING DATA clause

ALTER TABLE statement that moves or exchanges a partition or subpartition operation

DROP TABLE statement

If you must use unsupported DDL statements on a table enabled for Flashback Data Archive, use theDBMS_FLASHBACK_ARCHIVE.DISASSOCIATE_FBA procedure to disassociate the base table from its Flashback Data Archive. To reassociate the Flashback Data Archive with the base table afterward, use the DBMS_FLASHBACK_ARCHIVE.REASSOCIATE_FBA procedure.

 

根据官方文档,此题可选CDE,可根据D50081CN11文档,只能选D,且没有提到C是否支持。

综合一下,如果考试时单选则选D,如果多选则选CDE

 

26.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 commands:

RMAN> CONNECT CATALOG rco11/password@catdb

RMAN> IMPORT CATALOG rcat10/oracle@inst1 NO UNREGISTER;

Which two statements are true regarding the tasks accomplished with these commands? (Choose two.)

A. They import all metadata from the RCAT10 catalog.

B. They unregister the database from the RCAT10 catalog.

C. They do not register the databases registered in the RCAT10 catalog.

D. They register all databases registered in the RCAT10 catalog.

 

Answer: AD

答案解析:

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

使用IMPORT CATALOG命令可将元数据从一个恢复目录方案导入至其它目录方案中。如果创建了不同版本的目录方案来存储多个目标数据库的元数据,则使用此命令可以为所有数据库维护单个目录方案。

IMPORT CATALOG <connectStringSpec>

[DBID = <dbid> [, <dbid>,…]]

[DB_NAME=<dbname>[, <dbname,…]]

[ NO UNREGISTER ];

<connectStringSpec>是源恢复目录连接字符串。源恢复目录方案的版本必须等于RMAN 可执行文件的当前版本。如果需要,将源目录升级到当前RMAN 本版。

DBID:你可以指定数据库ID 的列表,数据库ID 的元数据应从源目录方案导入。未指定列表时,RMAN 将所有数据库ID 的元数据从源目录方案合并到目标目录方案中。如果已在恢复目录方案中注册了合并元数据的数据库,RMAN 就会发出错误消息。

 

DB_NAME:可以指定应导入其元数据的数据库的名称列表。如果数据库名称不明确,RMAN 就会发出错误消息。

NO UNREGISTER:默认情况下,导入的数据库ID 在成功导入后从源恢复目录方案中注销。使用NO UNREGISTER选项,可以强制RMAN 将导入的数据库ID 保留在源目录方案中。

 

RMAN> CONNECT CATALOG rco11/password@catdb

RMAN> IMPORT CATALOG rcat10/oracle@inst1 NO UNREGISTER;

RMAN 将数据库inst1的元数据导入到catdb 数据库中的rco11方案。而NO UNREGISTER说明,在rcat10方案中注册的数据库将不会注销,继续注册在rcat10用户目录中。

 

27.You are using the flash recovery area (fast recovery area in 11g Release 2) to store backup related files in your database. After regular monitoring of space usage in the Mash recovery area. You realize that the flash recovery area is (jetting filled up very fast and it is running out of space. Your database flash recovery area is low on specie and you have no more room on disk. Proactively, which two options could you use to make more space available in the flash recovery [Choose two]

A. Change the RMAN archived log deletion policy.

B. Use the RMAN CROSSCHECK command to reclaim the archived log space.

C. Change the RMAN retention policy to retain backups for a shorter period of time.

D. Use OS command to move files from the flash recovery area to some other location

 

Answer: BD

答案解析:

 您正在使用闪回恢复区(11g第2版中的快速恢复区)在你的数据库中存储与备份相关的文件。在定期监测在糊状恢复区的空间使用情况之后。你会意识到,闪回恢复区被喷射似地非常快地填充起来且运行空间不足, 你的数据库闪回恢复区空间不足,你没有更多的空间在磁盘上。

你可以主动使用哪两个选项以在闪回恢复区上腾出更多可用空间

B. Use the RMAN CROSSCHECK command to reclaim the archived log space.  使用RMAN交叉检查命令回收归档记录空间。(自动)

D. Use OS command to move files from the flash recovery area to some other location使用操作系统命令将文件从闪回恢复区移动到其他位置

 

Use the CROSSCHECK command to synchronize the physical reality of backups and copies with their logical records in the RMAN repository.

 

The CROSSCHECK command does not delete the repository records of the files that it does not find, but updates their repository records to EXPIRED. You can run DELETE EXPIRED to remove the repository records for expired files and any existing physical files whose status is EXPIRED.

 

 

使用OS命令来移动备份文件,再使用CROSSCHECK 来检查物理与逻辑备份是否一致,如果出现EXPIRED 状态,则通过DELETE EXPIRED删除过期的备份,即在物理磁盘上没有备份文件。这样就可以个FRA腾出更多的空间。

EXPIRED 

 

28.You have a range-partitioned table in your database. Each partition in the table contains the sales data for a quarter. The partition related to the current quarter is modified frequently and other partitions undergo fewer data manipulations. The preferences for the table are set to their default values. You collect statistics for the table using the following command in regular intervals:

SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS('SH','SALES',GRANULARITY=>'GLOBAL');

You need statistics to be collected more quickly. What can you do to achieve this?

A. Set DYNAMIC_SAMPLING to level 4.

B. Set the STATISTICS_LEVEL parameter to BASIC. 

C. Set the INCREMENTAL value to TRUE for the partition table.

D. Increase the value of STALE_PERCENT for the partition table.

 

Answer: C 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68595

 

Oracle will update the global table statistics by scanning only the partitions that have been changed instead of the entire table if the following conditions hold:

INCREMENTAL value for the partitioned table is set to TRUE

PUBLISH value for the partitioned table is set to TRUE;

User specifies AUTO_SAMPLE_SIZE for ESTIMATE_PERCENT and AUTO for GRANULARITY when gathering statistics on the table

If the INCREMENTAL value for the partitioned table was set to FALSE (default value), a full table scan is used to maintain the global statistics which is a much more resource intensive and time-consuming operation for large tables.

 

默认情况下INCREMENTAL 为false,如果将其设置为true,那么在搜集信息时,oracle只扫描改变的分区,这样搜集信息就会变得更快。故选C,正确

 

SQL> select dbms_stats.get_prefs('PUBLISH','SYS','T_PART') from dual;

DBMS_STATS.GET_PREFS('PUBLISH'
--------------------------------------------------------------------------------
TRUE

SQL> select dbms_stats.get_prefs('INCREMENTAL','SYS','T_PART') from dual;

DBMS_STATS.GET_PREFS('INCREMEN
--------------------------------------------------------------------------------
FALSE

SQL> select dbms_stats.get_prefs('GRANULARITY','SYS','T_PART') from dual;

DBMS_STATS.GET_PREFS('GRANULAR
--------------------------------------------------------------------------------
AUTO

 

 

GET_PREFS Function

This function returns the default value of the specified preference.

Syntax

DBMS_STATS.GET_PREFS (

   pname     IN   VARCHAR2,

   ownname   IN   VARCHAR2 DEFAULT NULL,

   tabname   IN   VARCHAR2 DEFAULT NULL)

RETURN VARCHAR2;

Parameters

Table 142-50 GET_PREFS Function Parameters

Parameter

Description

pname

Preference name. The default value for following preferences can be retrieved:

AUTOSTATS_TARGET

CASCADE

DEGREE

ESTIMATE_PERCENT

METHOD_OPT

NO_INVALIDATE

GRANULARITY

PUBLISH

INCREMENTAL

STALE_PERCENT

 

AUTOSTATS_TARGET - This preference is applicable only for auto statistics collection. The value of this parameter controls the objects considered for statistics collection. It takes the following values:

'ALL' - Statistics collected for all objects in system

'ORACLE' - Statistics collected for all Oracle owned objects

'AUTO' - Oracle decides on which objects to collect statistics

.

CASCADE - Determines whether or not index statistics are collected as part of gathering table statistics.

.

DEGREE - Determines degree of parallelism used for gathering statistics.

.

ESTIMATE_PERCENT - Determines the percentage of rows to estimate. The valid range is [0.000001,100]. Use the constant DBMS_STATS.AUTO_SAMPLE_SIZE to have Oracle determine the appropriate sample size for good statistics. This is the default.

.

METHOD_OPT - Controls column statistics collection and histogram creation. It accepts either of the following options, or both in combination:

FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause]

FOR COLUMNS [size clause] column [size_clause] [,column [size_clause]...]

size_clause is defined as size_clause := SIZE {integer | REPEAT | AUTO | SKEWONLY}

column is defined as column := column_name | extension name | extension


- integer : Number of histogram buckets. Must be in the range [1,254].
- REPEAT : Collects histograms only on the columns that already have histograms.
- AUTO : Oracle determines the columns on which to collect histograms based on data distribution and the workload of the columns.
- SKEWONLY : Oracle determines the columns on which to collect histograms based on the data distribution of the columns.
- column_name : name of a column
- extension : can be either a column group in the format of (column_name, colume_name [, ...]) or an expression

The default is FOR ALL COLUMNS SIZE AUTO.The default value can be changed using theSET_DATABASE_PREFS ProcedureSET_GLOBAL_PREFS ProcedureSET_SCHEMA_PREFS Procedure andSET_TABLE_PREFS Procedure.

.

NO_INVALIDATE - The value controls the invalidation of dependent cursors of the tables for which statistics are being gathered. Does not invalidate the dependent cursors if set to TRUE. The procedure invalidates the dependent cursors immediately if set to FALSE. Use DBMS_STATS.AUTO_INVALIDATE to have Oracle decide when to invalidate dependent cursors. This is the default.

.

GRANULARITY - Determines granularity of statistics to collect (only pertinent if the table is partitioned).

'ALL' - Gathers all (subpartition, partition, and global) statistics

'AUTO'- Determines the granularity based on the partitioning type. This is the default value.

'DEFAULT' - Gathers global and partition-level statistics. This option is obsolete, and while currently supported, it is included in the documentation for legacy reasons only. You should use the 'GLOBAL AND PARTITION' for this functionality. Note that the default value is now 'AUTO'.

'GLOBAL' - Gathers global statistics

'GLOBAL AND PARTITION' - Gathers the global and partition level statistics. No subpartition level statistics are gathered even if it is a composite partitioned object.

'PARTITION '- Gathers partition-level statistics

'SUBPARTITION' - Gathers subpartition-level statistics.

.

PUBLISH - Determines whether or not newly gathered statistics will be published once the gather job has completed. Prior to Oracle Database 11g, Release 1 (11.1), once a statistic gathering job completed the new statistics were automatically published into the dictionary tables. The user now has the ability to gather statistics but not publish them immediately. This allows the DBA to test the new statistics before publishing them.

.

INCREMENTAL - Determines whether or not the global statistics of a partitioned table will be maintained without doing a full table scan. With partitioned tables it is very common to load new data into a new partition. As new partitions are added and data loaded, the global table statistics need to be kept up to date. Oracle will update the global table statistics by scanning only the partitions that have been changed instead of the entire table if the following conditions hold:

INCREMENTAL value for the partitioned table is set to TRUE

PUBLISH value for the partitioned table is set to TRUE;

User specifies AUTO_SAMPLE_SIZE for ESTIMATE_PERCENT and AUTO for GRANULARITY when gathering statistics on the table

If the INCREMENTAL value for the partitioned table was set to FALSE (default value), a full table scan is used to maintain the global statistics which is a much more resource intensive and time-consuming operation for large tables.

.

STALE_PERCENT - This value determines the percentage of rows in a table that have to change before the statistics on that table are deemed stale and should be regathered. The valid domain for stale_percent is non-negative numbers. The default value is 10%.

ownname

Owner name

tabname

Table name

 

29.Which two statements are true regarding the Automatic Diagnostic Repository (ADR) in Oracle Database 11g? (Choose two.)

A. A single ADR can support multiple ADR homes for different database instances.

B. The alert files are stored in XML file format in the TRACE directory of each ADR home.

C. If the environmental variable ORACLE_BASE is set, then DIAGNOSTIC_DEST is set to

$ORACLE_BASE.

D. The BACKGROUND_DUMP_DEST initialization parameter overrides the DIAGNOSTIC_DEST

initialization parameter for the location of the alert log file.

 

Answer: AC

 

关于Oracle数据库11g中的自动诊断信息库(ADR)哪两个陈述是真实

A. A single ADR can support multiple ADR homes for different database instances.  

单个的自动诊断信息库可以支持多个用于不同的数据库实例的自动诊断信息库家目录。

C. If the environmental variable ORACLE_BASE is set, then DIAGNOSTIC_DEST is set to $ORACLE_BASE.  

如果ORACLE_BASE环境变量已设置,则DIAGNOSTIC_DEST被设置为$ORACLE_BASE

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN11008

 

30.Which two statements are true with respect to the maintenance window? (Choose two.)
A. A DBA can enable or disable an individual task in all maintenance windows.
B. A DBA cannot change the duration of the maintenance window after it is created.
C. In case of a long maintenance window, all Automated Maintenance Tasks are restarted every four hours.
D. A DBA can control the percentage of the resource allocated to the Automated Maintenance Tasks in each window.

Answer: AD
题目解答: b 能改 C 错误说法
31.Which two statements are correct about database transportation? (Choose two.)
A. The source and target platforms must be the same
B. Redo logs, control files and temp files are also transported
C. The transported database must have the same database identifier (DBID) as the source database and cannot be changed
D. The COMPATIBLE parameter must be set to 10.0.0.0 or higher and the database must be opened in read only mode before being transported
E. Recovery Manager (RMAN) is used to convert the necessary data files of the database if the target platform is different and has different endian format


Answer: DE
题目解答:平台不同可以 convert 转 A 错 B 中都不需要传输 C 说法错误

 

32.In your production database, you:
-Are using Recovery Manager (RMAN) with a recovery catalog to perform the backup operation at regular intervals Set the control file autobackup to "on"
-Are maintaining image copies of the database files
You have lost the server parameter tile (SPFILE) and the control file. Which option must you consider before restoring the SPFILE: and the control file by using the control file autobackup?
A. setting DBID for the database
B. using the RMAN SWITCH command
C. using the RMAN SWITCH command
D. starting up the database Instance In the NOMOUNT state

Answer: C
题目解答:恢复 spfile 之前需要启动实例到 nomount 才行。 考试选启动到 nomount 的选项即可
如果 c 是启动到 nomunt 选 C 如果 d 是启动到 nomunt 选 D
本题是题库抄录异常 正题为后面的 698 题

 

33.You want to perform the following operations for the DATA ASM disk group:

-Verify the consistency of the disk.

-Cross-check all the file extent maps and allocation tables for consistency. heck whether the alias metadata directory and file directory are linked correctly.

-Check that ASM metadata directories do not have unreachable allocated blocks.

Which command accomplishes these tasks?

A. ALTER DISKGROUP data CHECK;

B. ALTER DISKGROUP data CHECK DISK;

C. ALTER DISKGROUP data CHECK FILE;

D. ALTER DISKGROUP data CHECK DISK IN FAILURE GROUP 1;

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#SQLRF52644

 

ALTER DISKGROUP  data CHECK [ REPAIR | NOREPAIR ]

check_diskgroup_clause

The check_diskgroup_clause lets you verify the internal consistency of Oracle ASM disk group metadata. The disk group must be mounted. Oracle ASM displays summary errors and writes the details of the detected errors in the alert log.

The CHECK keyword performs the following operations:

Checks the consistency of the disk.

Cross checks all the file extent maps and allocation tables for consistently.

Checks that the alias metadata directory and file directory are linked correctly.

Checks that the alias directory tree is linked correctly.

Checks that Oracle ASM metadata directories do not have unreachable allocated blocks.

 

34.Examine the following RMAN command:

BACKUP DATABASE

TAG TESTDB

KEEP UNTIL 'SYSDATE+1'

RESTORE POINT TESTDB06;

Which two statements are true regarding the backup taken by using the above RMAN command?

(Choose two.)

A. Only data files and the control file are backed up.

B. Archived redo logs are backed up only if the database is open during the backup.

C. The backup is deleted after one day, regardless of the default retention policy settings.

D. The backup becomes obsolete after one day, regardless of the default retention policy settings.

Answer: BD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90048

 

keepOption

Overrides any configured retention policy for this backup so that the backup is not considered obsolete, as shown in Example 2-26.

You can use the KEEP syntax to generate archival database backups that satisfy business or legal requirements. The KEEP setting is an attribute of the backup set (not individual backup piece) or image copy.

Note: You cannot use KEEP with BACKUP BACKUPSET.

With the KEEP syntax, you can keep the backups so that they are considered obsolete after a specified time (KEEP UNTIL), or make them never obsolete (KEEP FOREVER). As shown in Example 2-27, you must be connected to a recovery catalog when you specify KEEP FOREVER.

Note: You can use CHANGE to alter the status of a backup generated with KEEP.

See Also: keepOption for more information about backups made with the KEEP option

 

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.

 

Example 2-26 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;

 

35.You want the Automatic SQL Tuning process to stop accepting and implementing the recommended SQL profiles automatically. Which action would you perform to achieve this?

A. Edit the automatic maintenance window group configuration.

B. Set the CURSOR_SHARING parameter to EXACT for the database instance.

C. Use the DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETERS procedure to set ACCEPT_SQL_PROFILES to FALSE.

D. Set the SQLTUNE_CATEGORY parameter to DEFAULT for the database instance.

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF94849

 

if want to stop accepting and implementing the recommended SQL profiles automatically

set ACCEPT_SQL_PROFILES to FALSE.

 

ACCEPT_SQL_PROFILE

Specifies whether to accept SQL profiles automatically.

To configure automatic SQL tuning: 

Start SQL*Plus, and connect to the database with DBA privileges (or connect as SYS if you plan to run EXECUTE_AUTO_TUNING_TASK).

Run the DBMS_AUTO_SQLTUNE.SET_AUTO_TUNING_TASK_PARAMETER procedure.

The following example configures the automatic SQL tuning task to automatically accept SQL profiles recommended by SQL Tuning Advisor:

BEGIN

  DBMS_AUTO_SQLTUNE.SET_AUTO_TUNING_TASK_PARAMETER(

    parameter => 'ACCEPT_SQL_PROFILES', value => 'TRUE');

END;

/

 

36.Which two statements are true regarding the functionality of the remap command in ASMCMD? (Choose two.)

A. It repairs blocks that have read disk I/O errors.

B. It checks whether the alias metadata directory and the file directory are linked correctly.

C. It repairs blocks by always reading them from the mirror copy and writing them to the original location.

D. It reads the blocks from a good copy of an ASM mirror and rewrites them to an alternate location on disk if the blocks on the original location cannot be read properly.

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asm_util004.htm#OSTMG01644

remap

Relocates data in a range of physical blocks on a disk.

 

remap

Purpose

Marks a range of blocks as unusable on the disk and relocates any data allocated in that range.

Syntax and Description

remap diskgroup disk block_range

Table 12-45 lists the syntax options for the remap command.

Table 12-45 Options for the remap command

Option

Description

diskgroup

Disk group name in which a disk must have data relocated.

disk

Name of the disk that must have data relocated. The name must match the NAME column in the V$ASM_DISKview.

block_range

Range of physical blocks to relocate in the format start_range_number-end_range_number.

 

The remap command only relocates blocks. It does not correct or repair blocks that contain corrupted contents. The command uses a physical block size based on the SECTOR_SIZE disk group attribute.

Examples

The first example remaps blocks 5000 through 5999 for disk DATA_0001 in disk group DATA. The second example remaps blocks 6230 through 6339 for diskFRA_0002 in disk group FRA

Example 12-49 Using the ASMCMD remap command

ASMCMD [+] > remap DATA DATA_0001 5000-5999

 

ASMCMD [+] > remap FRA FRA_0002 6230-6339

A错误,D正确

 

37.During the installation of Oracle Database 11g, you do not set ORACLE_BASE explicitly. You selected the option to create a database as part of the installation. How would this environment variable setting affect the installation?

A. The installation terminates with an error.
B. The installation proceeds with the default value without warnings and errors.
C. The installation proceeds with the default value but it would not be an OFA-compliant database.
D. The installation proceeds with the default value but a message would be generated in the alert log file.


Answer: D
题目解答 只有 D

38.The SQL Tuning Advisor configuration has default settings in your database instance. Which

recommendation is automatically implemented after the SQL Tuning Advisor is run as part of the

automatic maintenance task?

A. statistics recommendations

B. SQL Profile recommendations

C. Index-related recommendations

D. restructuring of SQL recommendations

 

Answer: B

题目解答: sql 概要文件

39.View the Exhibit to examine the Automatic SQL Tuning result details. Which action would you suggest for the selected SQL statement in the Exhibit?

 

A. Accept the recommended SQL profile.

B. Collect statistics for the related objects.

C. Run the Access Advisor for the SQL statement.

D. Run the Segment Advisor for recommendations.

Answer: C

答案解析:

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

 

SQL 优化指导会分别考察指导任务中包括的每个SQL 语句。创建一个新索引可能会对查询有帮助,但也可能增加DML 的响应时间。因此,应使用SQL 访问指导检查建议的索引或其它对象对工作量(一组SQL 语句)的影响,以确定性能是否有净提高。

40.Evaluate the following code:

SQL>VARIABLE task_name VARCHAR2(255); 

SQL>VARIABLE sql_stmt VARCHAR2(4000);

SQL>BEGIN :sql_stmt := 'SELECT COUNT(*) FROM customers WHERE cust_state_province =''CA''';

:task_name := 'MY_QUICKTUNE_TASK';

DBMS_ADVISOR.QUICK_TUNE(DBMS_ADVISOR.SQLACCESS_ADVISOR,

:task_name, :sql_stmt);

END;

What is the outcome of this block of code?

A. It creates a task and workload, and executes the task.

B. It creates a task and workload but does not execute the task.

C. It produces an error because a template has not been created.

D. It produces an error because the SQL Tuning Set has not been created.

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF94911

 

Performing a Quick Tune

To tune a single SQL statement, the QUICK_TUNE procedure accepts as its input a task_name and a SQL statement. The procedure creates a task and workload and executes this task. There is no difference in the results from using QUICK_TUNE. They are exactly the same as those from using EXECUTE_TASK, but this approach is easier to use when there is only a single SQL statement to be tuned. The syntax is as follows:

DBMS_ADVISOR.QUICK_TUNE (

   advisor_name           IN VARCHAR2,

   task_name              IN VARCHAR2,

   attr1                  IN CLOB,

   attr2                  IN VARCHAR2 := NULL,

   attr3                  IN NUMBER := NULL,

   task_or_template       IN VARCHAR2 := NULL);

The following example shows how to quick tune a single SQL statement:

VARIABLE task_name VARCHAR2(255);

VARIABLE sql_stmt VARCHAR2(4000);

EXECUTE :sql_stmt := 'SELECT COUNT(*) FROM customers

                      WHERE cust_state_province =''CA''';

EXECUTE :task_name  := 'MY_QUICKTUNE_TASK';

EXECUTE DBMS_ADVISOR.QUICK_TUNE(DBMS_ADVISOR.SQLACCESS_ADVISOR,

              :task_name, :sql_stmt);

41.You have applications that have frequently executed queries, and produce small and static result sets. You configure the sqlnet.ora file in the client machine to set a nonzero value for the

OCI_RESULT_CACHE_MAX_SIZE parameter. What is the purpose of this configuration?

A. to avoid round trips to the server by enabling caching of query results in client memory

B. to improve performance by storing a copy of the data from the private SQL area of the PGA

C. to enhance the query performance by creating a cache in the client memory for sorting operations

D. to avoid the storing of query plans and results in the server by creating a cache in the client memory

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci10new.htm#LNOCI16752

 

The server initialization parameters:

CLIENT_RESULT_CACHE_SIZE

The default value is zero, implying that the client cache feature is disabled. To enable the client result cache feature, set the size to 32768 bytes (32 Kilobytes (KB)) or greater. This is the minimum size of the client per-process result set cache. All OCI client processes get this minimum size. This can be overridden by the sqlnet.ora configuration parameter OCI_RESULT_CACHE_MAX_SIZE only if this feature is enabled on the server by theCLIENT_RESULT_CACHE_SIZE initialization parameter.

You can view the current default maximum size by displaying the value of the CLIENT_RESULT_CACHE_SIZE parameter. To increase this maximum size, you can set CLIENT_RESULT_CACHE_SIZE. However, because CLIENT_RESULT_CACHE_SIZE is a static parameter, you must include the SCOPE = SPFILE clause if you use an ALTER SYSTEM statement, and you must restart the database before any changes to this parameter take effect.

Note that if the client result cache feature is disabled at the server, the client configuration parameter OCI_RESULT_CACHE_MAX_SIZE is ignored and the client result cache cannot be enabled at the client.

Client Configuration File

A client configuration file is optional and overrides the cache parameters set in the server init.ora initialization file. These parameters are part of a sqlnet.orafile. The following optional parameters are available for client configuration:

OCI_RESULT_CACHE_MAX_SIZE (optional) - Maximum size in bytes for the per-process query cache. Specifying a size less than 32768 in the client sqlnet.orafile disables the client result cache feature for client processes reading this sqlnet.ora file.

42.You plan to use SQL Performance Analyzer to analyze the SQL workload. You created a SQL Tuning Set as a part of the workload capturing. What information is captured as part of this process? (Choose all that apply.)

A. the SQL text

B. the execution plan

C. the execution context

D. the execution frequency

E. the system change number (SCN)

 

Answer: ACD

答案解析:

参考:http://www.oracle.com/technetwork/cn/articles/o69ocp-099954.html

The correct answers are A, B, and C. While creating the SQL tuning set, SQL Performance Analyzer captures the SQL text, the execution context, and the number of times the statement is executed. SQL Performance Analyzer then uses that information to analyze the performance of the SQL statement.

 

43.Transaction T1 INSERT INTO hr.regions VALUES (5,'Pole');COMMIT;

Transaction T2 UPDATE hr.regions SET region_name='Poles' WHERE region_id = 5; COMMIT;

Transaction T3 UPDATE hr.regions SET region_name='North and South Poles' WHERE region_id = 5;

You want to back out transaction T2. Which option would you use?

A. It is possible, but transaction T3 also backs out.

B. It is possible with the NOCASCADE_FORCE option.

C. It is possible with the NONCONFLICT_ONLY option.

D. It is not possible because it has conflicts with transaction T3.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS627

 

NOCASCADE_FORCE - The user forcibly backs out the given transactions without considering the dependent transactions. The RDBMS executes the UNDO SQL for the given transactions in reverse order of their commit times. If no constraints break, and the result is satisfactory, the user can either COMMIT the changes or else ROLL BACK.

 

NOCASCADE_FORCE

Backs out specified transactions, ignoring dependent transactions. Server runs undo SQL statements for specified transactions in reverse order of commit times.

If no constraints break and you are satisfied with the result, you can commit the changes; otherwise, you can roll them back.

 

44.You have a very large table that your users access frequently. Which of the following advisors will recommend any indexes to improve the performance of queries against this table?

A. The Automatic Memory Manager (AMM)

B. The SQL Tuning Advisor

C. The Segment Advisor

D. The SQL Access Advisor

 

Answer: D

 

SQL访问指导:评估 SQL 的全部工作量, 并建议索引, 分区和实体化视图, 它们将改善 SQL 工作量的总体性能。

A is incorrect because there is no such advisor as the Automatic Memory Manager. B is incorrect because the SQL Tuning Advisor looks only at a single SQL statement and provides recommendations. C is incorrect because the Segment Advisor recommends segment shrink when table and index segments are heavily fragmented.

 

45.What is the advantage of setting the ASM-preferred mirror read for the Stretch cluster configuration?

A. It improves resync operations.

B. This feature enables much faster file opens.

C. It improves performance as fewer extent pointers are needed in the shared pool.

D. It improves performance by reading from a copy of an extent closest to the node.

 

Answer: D

答案解析:

Oracle ASM Preferred Read Disk Groups

In previous releases, Oracle ASM used the disk with the primary copy of a mirrored extent as the preferred disk for data read operations. With this release, using the new initialization file parameter asm_preferred_read_failure_groups, you can specify disks located near a specific cluster node as the preferred disks from which that node obtains mirrored data. This option is presented in DBCA, or you can configure it after installation. This change facilitates faster processing of data with widely distributed shared storage systems or with extended clusters (clusters whose nodes are geographically dispersed), and improves disaster recovery preparedness.

46.What happens when you run the SQL Tuning Advisor with limited scope?

A. Access path analysis is not performed for SQL statements.

B. SQL structure analysis is not performed for SQL statements.

C. SQL Profile recommendations are not generated for SQL statements.

D. Staleness and absence of statistics are not checked for the objects in the SQL Tuning Advisor.

 

Answer: c

答案解析:

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

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF94853

 

选择优化任务的适当范围很重要。如果选择“Limited(有限制)”选项,SQL 优化指导会根据统计信息检查结果、访问路径分析结果和SQL 结构分析结果来生成建议。“Limited(有限制)”选项不会产生SQL 概要文件建议。如果选择“Comprehensive(综合)”选项,SQL 优化指导不仅会生成“Limited(有限制)”选项生成的所有建议,在SQL 概要分析模式下还会调用优化程序来构建SQL 概要文件。使用“Comprehensive(综合)”选项时,还可以指定优化任务的时间限制,该时间限制的默认值是30 分钟。

 

在有限范围使用SQL Tuning Advisor 会发生什么?

根据官方文档,此题应该选C,而不是B.

47.You issue the following command on the RMAN prompt.

REPORT NEED BACKUP DAYS 5;

Which statement is true about executing this command?

A. It will display a list of files that need incremental backup

B. It will display a list of files that need backup after five days

C. It will display a list of files that were backed up in the last five days

D. It will display a list of files that have not been backed up in the last five days

E. It will apply the current retention policy to determine the files that need to be backed up

 

Answer: D

答案解析:

参考官网:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmreprt.htm#sthref1040

即所列的文件在备份时需要5天以前的归档日志,也即是说5天内没有备份过。选D。

 

48.View the Exhibit to examine the error obtained during the I/O calibration process. There are no data files on raw devices. What is the reason for this error?

 

A. The DISK_ASYNCH_IO parameter is set to TRUE.

B. The FILESYSTEMIO_OPTIONS parameter is set to NONE.

C. Another session runs the I/O calibration process concurrently.

D. The pending area has not been created before running the I/O calibration process.

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/os.htm#PFGRF94412

 

查看图表检查在I/ O校准过程中得到的错误。在裸设备上没有数据文件。此错误的原因是什么?

 

You can use the FILESYSTEMIO_OPTIONS initialization parameter to enable or disable asynchronous I/O or direct I/O on file system files. This parameter is platform-specific and has a default value that is best for a particular platform.

FILESYTEMIO_OPTIONS can be set to one of the following values:

ASYNCH: enable asynchronous I/O on file system files, which has no timing requirement for transmission.

DIRECTIO: enable direct I/O on file system files, which bypasses the buffer cache.

SETALL: enable both asynchronous and direct I/O on file system files.

NONE: disable both asynchronous and direct I/O on file system files.

 

49.Which statement about recovering from the loss of a redo log group is true?

A. If the lost redo log group is ACTIVE, you should first attempt to clear the log file.

B. If the lost redo log group is CURRENT, you must clear the log file.

C. If the lost redo log group is ACTIVE, you must restore, perform cancel-based incomplete recovery, and open the database using the RESETLOGS option.

D. If the lost redo log group is CURRENT, you must restore, perform cancel-based incomplete recovery,and open the database using the RESETLOGS option.

 

Answer: D

答案解析:

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

如果丢失当前redo log file则还原,基于SCN,时间或者取消的恢复,再同RESETLOGS 打开数据库,打开数据库后,再进行一次全备份。如果丢失不是当前redo log file,则删除添加,或者清除。

 

50.Examine the following command:

ALTER DISKGROUP data MOUNT FORCE;

In which scenario can you use the above command to mount the disk group?

A. when ASM disk goes offline

B. when one or more ASM files are dropped

C. when some disks in a disk group are offline

D. when some disks in a failure group for a disk group are rebalancing

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#SQLRF52684

FORCE | NOFORCE Use these clauses to determine the circumstances under which the disk groups are mounted.In the FORCE mode, Oracle ASM attempts to mount the disk group even if it cannot discover all of the devices that belong to the disk group. This setting is useful if some of the disks in a normal or high redundancy disk group became unavailable while the disk group was dismounted. When MOUNT FORCEsucceeds, Oracle ASM takes the missing disks offline.--感觉这里应该为online?

If Oracle ASM discovers all of the disks in the disk group, then MOUNT FORCE fails. Therefore, use the MOUNT FORCE setting only if some disks are unavailable. Otherwise, use NOFORCE.

In normal- and high-redundancy disk groups, disks from one failure group can be unavailable and MOUNT FORCE will succeed. Also in high-redundancy disk groups, two disks in two different failure groups can be unavailable and MOUNT FORCE will succeed. Any other combination of unavailable disks causes the operation to fail, because Oracle ASM cannot guarantee that a valid copy of all user data or metadata exists on the available disks.

In the NOFORCE mode, Oracle ASM does not attempt to mount the disk group unless it can discover all the member disks. This is the default.

51.To control the execution of a server process when it is receiving bad packets from a potentially malicious client, you set the SEC_PROTOCOL_ERROR_FURTHER_ACTION initialization parameter as follows:

SQL> ALTER SYSTEM SET SEC_PROTOCOL_ERROR_FURTHER_ACTION = Drop,10;

What is the significance of this setting?

A. It terminates the client connection after 10 bad packets and the client cannot reconnect to the same instance.

B. It terminates the client connection after 10 bad packets but the client can still reconnect, and attempt the same operation again.

C. It terminates the client connection 10 seconds after receiving a bad packet and the client cannot reconnect to the same instance.

D. It terminates the client connection after receiving a bad packet and the client can reconnect to the same instance after 10 minutes.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams227.htm#REFRN10282

B,在发现有10个坏包后终止客户端连接,但客户端仍然可以重新连接,并再次尝试同样的操作。

SEC_PROTOCOL_ERROR_FURTHER_ACTION specifies the further execution of a server process when receiving bad packets from a possibly malicious client.

Values:

CONTINUE

The server process continues execution. The database server may be subject to a Denial of Service (DoS) if bad packets continue to be sent by a malicious client.

(DELAY,integer)

The client experiences a delay of integer seconds before the server process accepts the next request from the same client connection. Malicious clients are prevented from excessive consumption of server resources while legitimate clients experience a degradation in performance but can continue to function.

(DROP,integer)

The server forcefully terminates the client connection after integer cumulative bad packets. The server protects itself at the expense of the client (for example, a client transaction may be lost). The client may reconnect and attempt the same operation.

 

52.You have the following requirements in relation to the detection of block corruption for your database instance:

Check for logical self-consistency of data blocks when modified in memory.

Check sums are calculated before and after the block change.

Checks are performed for the lost writes to the physical standby database.

Which method would help you perform the above checks automatically?

A. Set the DB_SECUREFILE parameter to PERMITTED.

B. Set the DB_ULTRA_SAFE parameter to DATA_ONLY.

C. Set the DB_LOCK_CHECKSUM parameter to TYPICAL.

D. Set the DB_LOST_WRITE_PROTECT parameter to TYPICAL.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams069.htm#REFRN10295

 

DB_ULTRA_SAFE sets the default values for other parameters that control protection levels.

Values:

OFF

When any of DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM, or DB_LOST_WRITE_PROTECT are explicitly set, no changes are made.

DATA_ONLY

DB_BLOCK_CHECKING will be set to MEDIUM.

http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams048.htm#REFRN10029

DB_LOST_WRITE_PROTECT will be set to TYPICAL.

http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams063.htm#REFRN10268

DB_BLOCK_CHECKSUM will be set to FULL.

http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams049.htm#REFRN10030

DATA_AND_INDEX

DB_BLOCK_CHECKING will be set to FULL.

DB_LOST_WRITE_PROTECT will be set to TYPICAL.

DB_BLOCK_CHECKSUM will be set to FULL.

DB_BLOCK_CHECKING specifies whether or not Oracle performs block checking for database blocks.

Values:

OFF or FALSE

No block checking is performed for blocks in user tablespaces. However, semantic block checking for SYSTEM tablespace blocks is always turned on.

LOW

Basic block header checks are performed after block contents change in memory (for example, after UPDATE or INSERT statements, on-disk reads, or inter-instance block transfers in Oracle RAC).

MEDIUM

All LOW checks and full semantic checks are performed for all objects except indexes (whose contents can be reconstructed by a drop+rebuild on encountering a corruption).

FULL or TRUE

All LOW and MEDIUM checks and full semantic checks are performed for all objects.

Oracle checks a block by going through the data in the block, making sure it is logically self-consistent. Block checking can often prevent memory and data corruption. Block checking typically causes 1% to 10% overhead, depending on workload and the parameter value. Specific DML overhead may be higher. The more updates or inserts in a workload, the more expensive it is to turn on block checking. You should set DB_BLOCK_CHECKING to FULL if the performance overhead is acceptable.

For backward compatibility, the use of FALSE (implying OFF) and TRUE (implying FULL) is preserved.

 

DB_LOST_WRITE_PROTECT enables or disables lost write detection. A data block lost write occurs when an I/O subsystem acknowledges the completion of the block write, while in fact the write did not occur in the persistent storage.

When the parameter is set to TYPICAL on the primary database, the instance logs buffer cache reads for read-write tablespaces in the redo log, which is necessary for detection of lost writes.

When the parameter is set to FULL on the primary database, the instance logs reads for read-only tablespaces as well as read-write tablespaces.

When the parameter is set to TYPICAL or FULL on the standby database or on the primary database during media recovery, the instance performs lost write detection.

When the parameter is set to NONE on either the primary database or the standby database, no lost write detection functionality is enabled.

DB_BLOCK_CHECKSUM determines whether DBWn and the direct loader will calculate a checksum (a number calculated from all the bytes stored in the block) and store it in the cache header of every data block when writing it to disk. Checksums are verified when a block is read - only if this parameter is TYPICAL or FULLand the last write of the block stored a checksum. In FULL mode, Oracle also verifies the checksum before a change application from update/delete statements and recomputes it after the change is applied. In addition, Oracle gives every log block a checksum before writing it to the current log.

Starting with Oracle Database 11g, most of the log block checksum is done by the generating foreground processes, while the LGWR performs the rest of the work, for better CPU and cache efficiency. Prior to Oracle Database 11g, the LGWR solely performed the log block checksum.

If this parameter is set to OFF, DBWn calculates checksums only for the SYSTEM tablespace, but not for user tablespaces. In addition, no log checksum is performed when this parameter is set to OFF.

Checksums allow Oracle to detect corruption caused by underlying disks, storage systems, or I/O systems. If set to FULL, DB_BLOCK_CHECKSUM also catches in-memory corruptions and stops them from making it to the disk. Turning on this feature in TYPICAL mode causes only an additional 1% to 2% overhead. In theFULL mode it causes 4% to 5% overhead. Oracle recommends that you set DB_BLOCK_CHECKSUM to TYPICAL.

For backward compatibility the use of TRUE (implying TYPICAL) and FALSE (implying OFF) values is preserved.

 

53.You want to use RMAN to create compressed backups.Which statement is true about the compression algorithms that RMAN can use?

A. The BZIP2 compression algorithm consumes more CPU resources than the ZLIB compression

algorithm.

B. The ZLIB compression algorithm consumes more CPU resources than the BZIP2 compression

algorithm.

C. The ZLIB compression algorithm provides maximum compression and produces smaller backups than the BZIP2 compression algorithm.

D. Only the BZIP2 compression algorithm can be used to make compressed backups to disk.

 

Answer: A

答案解析:

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

可以使用以下级别或压缩比率:

• LOW:此级别速度最快。与MEDIUM相比,它提供较少的压缩,但CPU 使用率最低。(与LZO压缩对应。)

• MEDIUM:此级别很好兼顾了CPU 使用率和压缩比率。(与ZLIB压缩对应。)

• HIGH:此级别提供最佳压缩比率,但CPU 消耗最大。(与GZIP 压缩对应。)

• BASIC:与BZIP2(10g类型压缩)对应。

 

54.Evaluate the following function code:

CREATE FUNCTION get_dept_avg(dept_id NUMBER) RETURN NUMBER RESULT_CACHE

RELIES_ON

(EMPLOYEES) IS avgsal NUMBER(6);

BEGIN

SELECT AVG(SALARY)INTO avgsal

FROM EMPLOYEES

WHERE DEPARTMENT_ID = dept_id;

RETURN avgsal;

END get_dept_avg;

Which statement is true regarding the above function?

A. The cached result becomes invalid when any structural change is done to the EMPLOYEES table.

B. If the function execution results in an unhandled exception, the exception result is also stored in the cache.

C. Each time the function is invoked in a different session, the current result in the result cache gets overwritten.

D. If the function is invoked with a different parameter value, the existing result in the result cache gets overwritten by the latest value.

 

Answer: A

 

55.Following is the list of locations in random order where oranfstab can be placed.

1./etc/mtab

2.$ORACLE_HOME/dbs/oranfstab

3./etc/oranfstab

What is the sequence in which Direct NFS will search the locations?

A. 1, 2, 3

B. 3, 2, 1

C. 2, 3, 1

D. 1, 3, 2

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/install.112/e41961/storage.htm#CDEDBEDA

 

 

Mounting NFS Storage Devices with Direct NFS Client

Direct NFS Client determines mount point settings to NFS storage devices based on the configurations in /etc/mtab, which are changed with configuring the /etc/fstab file.

Direct NFS Client searches for mount entries in the following order:

$ORACLE_HOME/dbs/oranfstab

/etc/oranfstab

/etc/mtab

 

56.You discover that your Recycle Bin contains two tables with the same name, MY_TABLE. You also have a table named MY_TABLE in your schema. You execute the following statement:

FLASHBACK TABLE my_table TO BEFORE DROP RENAME TO my_table2;

What will be the result of executing this statement?

A. One of the tables is recovered from the Recycle Bin using a First In First Out (FIFO) approach.

B. One of the tables is recovered from the Recycle Bin using a Last In First Out (LIFO) approach.

C. Both the tables are recovered from the Recycle Bin with one table renamed to MY_TABLE2 and the other to a system-generated name.

D. None of the tables are recovered from the Recycle Bin, and the statement returns an error.

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9012.htm#SQLRF54996

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN11683

 

57.Which background process of a database instance, using Automatic Storage Management (ASM),connects as a foreground process into the ASM instance?

A. ASMB

B. PMON

C. RBAL

D. SMON

Answer: A

答案解析:

 

ASMB

ASM Background Process

Communicates with the ASM instance, managing storage and providing statistics

ASMB runs in ASM instances when the ASMCMD cp command runs or when the database instance first starts if the server parameter file is stored in ASM. ASMB also runs with Oracle Cluster Registry on ASM.



RBAL

ASM Rebalance

 Master Process

Coordinates rebalance    activity

In an ASM instance, it coordinates rebalance activity for disk groups. In a database instances, it manages ASM disk groups.

 

 

58.Which statement is true when Automatic Workload Repository (AWR) baselines are created using baseline templates?

A. AWR baselines are always created as repeating baselines.

B. AWR baselines can be created on the basis of two time values.

C. AWR baselines are always created with infinite expiration duration.

D. AWR baselines are always created using the Automatic Workload Repository (AWR) retention period as expiration duration.

 

Answer: B

 

59.You have not configured Oracle Managed Files (OMF) in your database. You do not want to scan the entire datafile every time an incremental backup is performed. You decide to enable the block change tracking feature. Which statement should you use to enable the block change tracking feature?

A. ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

B. ALTER SYSTEM ENABLE BLOCK CHANGE TRACKING USING FILE <path>;

C. ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE <path>;

D. ALTER SYSTEM ENABLE BLOCK CHANGE TRACKING;

 

Answer: C

答案解析:

 

You should use the ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE <path>;

statement. If OMF is configured in your database, then you need not specify the name of the block change tracking file in the ALTER DATABASE statement. The file is automatically located in the directory specified by the DB_CREATE_FILE_DESTparameter. In this scenario, OMF is not configured. Therefore, you must specify the location of the block change tracking file in the statement. 



 

You can enable block change tracking when the database is either open or mounted.

To enable block change tracking:

Start SQL*Plus and connect to a target database with administrator privileges.

Ensure that the DB_CREATE_FILE_DEST initialization parameter is set.

SHOW PARAMETER DB_CREATE_FILE_DEST

If the parameter is not set, and if the database is open, then you can set the parameter with the following form of the ALTER SYSTEM statement:

ALTER SYSTEM SET

DB_CREATE_FILE_DEST = '/disk1/bct/'

SCOPE=BOTH SID='*';

Enable block change tracking.

Execute the following ALTER DATABASE statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

You can also create the change tracking file in a location that you choose yourself by using the following form of SQL statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING

USING FILE '/mydir/rman_change_track.f' REUSE;

The REUSE option tells Oracle Database to overwrite any existing block change tracking file with the specified name.

 

60.For which two situations would you use functionality provided by the Resource Manager? (Choose two.)

A. setting idle timeout limits on resource plans

B. saving storage space by using compressed backup sets

C. creating jobs that will run automatically at a scheduled time

D. assigning priorities to jobs to manage access to system resources

E. creating alerts to perform notification when tablespaces are low on available space resources

 

Answer: AD

答案解析:

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

题意哪两种情况下,会使用的资源管理器提供的功能? (选择两项)。

 A,资源计划设置空闲超时限制;正确。

空闲时间限制:可以指定会话的空闲时间,超过该时间后将终止会话(MAX_IDLE_TIME)。你可以进一步限制资源管理器,使其只终止阻止其它会话的会(MAX_IDLE_TIME_BLOCKER)。

B,节省存储空间,通过使用压缩备份集

C,创造就业机会,将在预定的时间自动运行

D,分配优先级作业管理系统资源的访问,正确。

E,创建警报执行通知时,表空间是低可用空间资源

 

61.Which of the following advisors within the Oracle advisory framework will analyze a single SQL statement and make recommendations for performance improvement?

A. SQL Repair Advisor

B. SQL Optimizer

C. SQL Access Advisor

D. SQL Tuning Advisor

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF02802

 

SQL优化指导可以对以下任一来源运行该指导:

- Active SQL (活动SQL):分析当前活动的顶级 SQL 语句

- SQL Tuning Sets(SQL 优化集):分析用户提供的一组 SQL 语句,You can create a SQL tuning task for a single SQL statement.

- Historical SQL (AWR) (以往的SQL (AWR)):分析AWR 快照捕获的SQL 语句

 

Answer option D is correct.

The SQL Tuning Advisor takes one or more SQL statements and performs an analysis to determine what can be done to improve the performance of the SQL statement(s).

Recommendations include rewriting the SQL statement,adding indexes, or even changing initialization parameters or memory component sizes such as the SGA size or buffer cache.

The SQL Tuning Advisor is accessed via tools such as Top SQL, the Automatic SQL Tuning Advisor, or the Top Sessions interface from within EM. In contrast, the SQL Access Advisor takes a broader view of SQL tuning. It considers a larger subset of SQL statements, such as all SQL statements run within a specified time period or from a SQL Tuning Set (STS). The SQL Access advisor may recommend additional indexes as well as materialized views to improve performance.

The SQL Repair Advisor analyzes a SQL statement that causes a critical error and records the results in the Automatic Diagnostic Repository (ADR). It may recommend a patch to fix the problem, or may provide an alternate execution plan to avoid causing an error in the future.

Other advisors within the advisory framework include memory advisors that monitor usage of the SGA and PGA and recommend optimal settings for these memory structures including the substructures within them, such as the library cache and the large pool.

Answer option A is incorrect. The SQL Repair Advisor only makes recommendations for SQL statements that cause a critical error in the ADR.

Answer option B is incorrect. There is no such advisor such as the SQL Optimizer, although the Oracle optimizer uses statistics to determine the best execution plan.

Answer option C is incorrect. The SQL Access Advisor analyzes groups of SQL statements that run during the same time period, not one or two SQL statements in isolation as the SQL Tuning Advisor does.

62.You want to convert your existing non-ASM files to ASM files for the database PROD. Which method or command would you use to accomplish this task?

A. Data Pump Export and Import

B. conventional export and import

C. the CONVERT command of RMAN

D. the BACKUP AS COPY. command of RMAN

 

Answer: D

答案解析:

参考使用rman将表空间转移到ASM存储区:http://blog.csdn.net/rlhua/article/details/14107309

63.Which method would you use to undo the changes made by a particular transaction without affecting the changes made by other transactions?

A. point-in-time recovery

B. execute the ROLLBACK command with transaction number

C. flashback the database to before the transaction was committed

D. determine all the necessary undo SQL statements from FLASHBACK_TRANSACTION_QUERY and use them for recovery

 

Answer: D

答案解析:

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

闪回查询:查询在特定时间点存在的所有数据。

使用闪回查询功能,可以执行截止到特定时间的查询。使用SELECT语句的AS OF子句,可以指定要查看其对应数据的时间戳。这在分析数据差异时非常有用。

注:TIMESTAMP和SCN是AS OF子句的有效选项。

UPDATE employees

SET salary =

(SELECT salary FROM employees

AS OF TIMESTAMP TO_TIMESTAMP

('2005-05-04 11:00:00', 'yyyy-mm-dd hh24:mi:ss')

WHERE employee_id = 200)

WHERE employee_id = 200

 

闪回查询:示例

如果最近错误地给某个雇员加了薪,则可重新更改薪金,其值由子查询返回的闪回值提供。

 

 

FLASHBACK_TRANSACTION_QUERY displays information about all flashback transaction queries in the database. The database must have at least minimal supplemental logging enabled to avoid unpredictable behavior.

64.You performed an incomplete recovery and opened the database with the RESETLOGS option. The LOG_ARCHIVE_FORMAT parameter is set to 'ora_%t_%s_%r.log'. Which statement regarding the archived redo log files, created in an earlier incarnation of the database, is true?

A. The archived redo log files will be overwritten.

B. The archived redo log files are deleted automatically.

C. The archived redo log files should be moved to some other location.

D. The archived redo log files are still maintained because the file names are unique.

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams128.htm#REFRN10089

LOG_ARCHIVE_FORMAT is applicable only if you are using the redo log in ARCHIVELOG mode. Use a text string and variables to specify the default filename format when archiving redo log files. The string generated from this format is appended to the string specified in the LOG_ARCHIVE_DEST parameter.

The following variables can be used in the format:

%s log sequence number

%S log sequence number, zero filled

%t thread number

%T thread number, zero filled

%a activation ID

%d database ID

%r resetlogs ID that ensures unique names are constructed for the archived log files across multiple incarnations of the database

Using uppercase letters for the variables (for example, %S) causes the value to be fixed length and padded to the left with zeros. An example of specifying the archive redo log filename format follows:

LOG_ARCHIVE_FORMAT = 'log%t_%s_%r.arc'

Archive log file names must contain each of the elements %s (sequence), %t (thread), and %r (resetlogs ID) to ensure that all archive log file names are unique. If the LOG_ARCHIVE_FORMAT initialization parameter is set in the parameter file, then make sure the parameter value contains the %s, %t, and %r elements. Otherwise, the following error is displayed at the time of instance startup:

ORA-19905: log_archive_format must contain %s, %t and %r

Neither LOG_ARCHIVE_DEST nor LOG_ARCHIVE_FORMAT have to be complete file or directory specifiers themselves; they only need to form a valid file path after the variables are substituted into LOG_ARCHIVE_FORMAT and the two parameters are concatenated together.

65.An online tablespace, TEST_TBS, is full and you realize that no server-managed tablespace threshold alerts were generated for the TEST_TBS tablespace. What could be the reason, if the TEST_TBS tablespace does not include auto extensible data files?
A. TEST_TBS is a small file tablespace.
B. TEST_TBS is a bigfile tablespace (BFT)

C. TEST_TBS is the default temporary tablespace.

D. TEST_TBS is a dictionary-managed tablespace.

Answer: D

66.Which two initialization parameters would you set to enable Automatic Shared Memory Management? (Choose two.)

A. set SHARED_POOL_SIZE to zero

B. set STATISTICS_LEVEL to BASIC

C. set SGA_TARGET to a non-zero value

D. set DB_CACHE_SIZE to a non-zero value

E. set STATISTICS_LEVEL to TYPICAL or ALL

 

Answer: AC

答案解析:

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

启用ASMM 的具体过程取决于是从手动共享内存管理模式更改为 ASMM,还是从自动内存管理模式更改为ASMM。要从手动共享内存管理模式更改为 ASMM,执行以下操作:

1. 运行以下查询获取SGA_TARGET的值:

SELECT ((SELECT SUM(value) FROM V$SGA) - (SELECT CURRENT_SIZE FROM

V$SGA_DYNAMIC_FREE_MEMORY)) “SGA_TARGET” FROM DUAL;

 

2. 设置SGA_TARGET的值:

ALTER SYSTEM SET SGA_TARGET= value [SCOPE={SPFILE|MEMORY|BOTH}]

其中value是在步骤1  中计算的值,或者是介于所有SGA 组件的总大小与SGA_MAX_SIZE之间的某个值。

 

3. 将自动设置大小的SGA 组件的值设置为0。为此,需要编辑文本初始化参数文件,或者发出ALTER SYSTEM语句。如果需要,重新启动实例。

SGA组件:

sys@TEST0924> select * from v$sgainfo;

 

NAME                                  BYTES RES

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

Fixed SGA Size                      2232960 No

Redo Buffers                       16326656 No

Buffer Cache Size                1795162112 Yes

Shared Pool Size                  637534208 Yes

Large Pool Size                    16777216 Yes

Java Pool Size                     16777216 Yes

Streams Pool Size                  16777216 Yes

Shared IO Pool Size                       0 Yes

Granule Size                       16777216 No

Maximum SGA Size                 3340451840 No

Startup overhead in Shared Pool   117967168 No

Free SGA Memory Available         838860800

 

12 rows selected.

 

67.On which two database objects can the VERSIONS clause of the Flashback Versions Query be used? (Choose two.)

A. fixed tables

B. heap tables

C. external tables

D. temporary tables

E. Index-Organized Tables (IOTs)

 

Answer: BE

答案解析:

同489题:http://blog.csdn.net/rlhua/article/details/19175515

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_10002.htm#SQLRF55624

排除法,选择BE

 

Restrictions on Flashback Queries These queries are subject to the following restrictions:

You cannot specify a column expression or a subquery in the expression of the AS OF clause.

You cannot specify the AS OF clause if you have specified the for_update_clause.

You cannot use the AS OF clause in the defining query of a materialized view.

You cannot use the VERSIONS clause in flashback queries to temporary or external tables, or tables that are part of a cluster.

You cannot use the VERSIONS clause in flashback queries to views. However, you can use the VERSIONS syntax in the defining query of a view.

You cannot specify the flashback_query_clause if you have specified query_name in the query_table_expression.

 

 

同489题

To research an erroneous change, you can use multiple Oracle Flashback queries to view row data at specific points in time. A more efficient approach would be to use Oracle Flashback Version Query to view all changes to a row over a period of time. With this feature, you append a VERSIONS clause to a SELECTstatement that specifies a system change number (SCN) or timestamp range between which you want to view changes to row values. The query also can return associated metadata, such as the transaction responsible for the change.

 

68.You have three temporary tablespace groups named G1, G2, and G3 in your database. You are creating a new temporary tablespace as follows:

CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '/u1/data/temp1.dbf' SIZE 10M TABLESPACE GROUP '';

Which statement regarding the above command is correct?

A. It will create the tablespace TEMP1 in group G1.

B. It will create the tablespace TEMP1 in group G3.

C. It will not add the tablespace TEMP1 to any group.

D. It will create the tablespace TEMP1 in the default group.

 

Answer: C

答案解析:

因为TABLESPACE GROUP '' 后面为空,所以没有添加到任何组。

 

69.The EMP table exists in your schema. You want to execute the following query:

SELECT ename, sal FROM emp

AS OF TIMESTAMP (SYSTIMESTAMP - INTERVAL '6' MINUTE)

WHERE ename = 'ALLEN';

What are the minimum requirements for the statement to execute successfully? (Choose all that apply)

A.ARCHIVELOG mode must be enabled

B.Row Movement must be enabled for the table

C.FLASHBACK must be set to ON for the database

D.The UNDO_MANAGEMENT parameter must be set to AUTO

E.The UNDO_RETENTION parameter must be set appropriately

 

Answer: DE

答案解析:

此题考查闪回查询,因为闪回查询是基于undo数据的,所以只要保证闪回查询的那个时间点有undo数据就能够查询成功

70.You executed the following SQL statement to shrink the EMPLOYEES table segment stored in the EXAMPLE tablespace:

ALTER TABLE employees SHRINK SPACE CASCADE;

Which statement is correct in this scenario?

A. The EMPLOYEES table will be changed to read-only mode during the shrink operation.

B. The indexes created on the EMPLOYEES table will need to be rebuilt after the shrink operation is over.

C. The shrink behavior will be cascaded to all dependent segments of the table that support a shrink operation.

D. Data manipulation language (DML) operations will not be possible on the EMPLOYEES table during the COMPACTION phase of the shrink operation.

 

Answer: C

答案解析:

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

使用SHRINK SPACE子句可以收缩段中的空间。如果指定了CASCADE,则收缩行为将级联到所有支持收缩操作的从属段,但实体化视图、LOB 索引和IOT(索引表)映射表例外。

 

71.The Automatic Database Diagnostic Monitor (ADDM) analysis runs every 60 minutes on your

database. Your database is facing a series of interrelated problems over a period of two hours. You need to ensure that the ADDM analysis is run over a time span of two hours in future. What would you do?

A. Create two custom ADDM tasks.

B. Modify the AWR snapshot time interval to two hours.

C. Create a new scheduler window for a time period of two hours.

D. Modify the Automatic Workload Repository (AWR) snapshot retention period to two hours.

 

Answer: B

答案解析:

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

 

ADDM 在记录每个AWR 快照之后会自动运行。每次记录快照后,ADDM 会分析与最后两个快照对应的时段。ADDM 会预先监视实例,以便在大多数瓶颈问题成为严重问题之前检测到这些问题。多数情况下,ADDM 会为检测到的问题提供建议解决方案,甚至可以量化这些建议的优势。

 

 

72.You have 100 segments in the USERS tablespace. You realize that the USERS tablespace is running low on space. You can use Segment Advisor to _____.

A. identify the segments that you should shrink

B. modify the storage parameters for the tablespace

C. automatically shrink the segments with unused space

D. check the alerts generated for the tablespace that is running low on space

 

Answer: A

答案解析:

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

USERS表空间不足,可以使用段指导来收缩段以便利用更多的空闲空间。

 

 

73.You are using Recovery Manager (RMAN) to perform backups. In which three situations would you perform a compressed backup? (Choose three.)

A. You are backing up to tape and your tape device performs its own compression.

B. You are making image copies, and you have not enabled tablespace compression.

C. You are using disk-based backups and disk space in your Flash Recovery Area, or other disk-based backup destinations are limited.

D. You are performing your backups to some device over a network where reduced network bandwidth is more important than CPU usage.

E. You are using some archival backup media, such as CD or DVD, where reducing backup sizes saves media costs and archival storage.

 

Answer: CDE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV8138

You are using disk-based backups when disk space in your fast recovery area or other disk-based backup destination is limited.

You are performing your backups to some device over a network when reduced network bandwidth is more important than CPU usage.

You are using some archival backup media such as CD or DVD, where reducing backup sizes saves on media costs and archival storage.

 

74.Immediately after adding a new disk to or removing an existing disk from an ASM instance, you find that the performance of the database goes down initially until the time the addition or removal process is completed, and then gradually becomes normal.Which two activities would you perform to maintain a consistent performance of the database while adding or removing disks? (Choose two.)

A. Define the POWER option while adding or removing the disks.

B. Increase the number of ARB processes by setting up a higher value for ASM_POWER_LIMIT.

C. Increase the number of DBWR processes by setting up a higher value for DB_WRITER_PROCESSES.

D. Increase the number of slave database writer processes by setting up a higher value for

DBWR_IO_SLAVES.

 

Answer: AB

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG94118

 

Manually Rebalancing Disk Groups

You can manually rebalance the files in a disk group using the REBALANCE clause of the ALTER DISKGROUP statement. This would normally not be required, because Oracle ASM automatically rebalances disk groups when their configuration changes. You might want to do a manual rebalance operation to control the speed of what would otherwise be an automatic rebalance operation.

The POWER clause of the ALTER DISKGROUP ... REBALANCE statement specifies the degree of parallelism, and thus the speed of the rebalance operation. It can be set to a minimum value of 0 which halts a rebalancing operation until the statement is either implicitly or explicitly re-run. A higher value increases the speed of the rebalance operation.

Example 4-9 Manually rebalancing a disk group

ALTER DISKGROUP data2 REBALANCE POWER 5 WAIT;

The default rebalance power is set by the ASM_POWER_LIMIT initialization parameter. The range of values for the POWER clause is the same for theASM_POWER_LIMIT initialization parameter.

 

 

 

 

 

 

 

 

 

 

75.View the Exhibit.

 

As shown in the diagram, in-memory statistics are transferred to the disk at regular intervals.

Which background process performs this activity?

A. CKPT

B. SMON

C. MMON

D. DBWR

 

Answer: C

答案解析:

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

AWR 是为Oracle Database 11g组件提供服务的基础结构,借助它可以收集、维护和利用统计信息进行问题检测和自优化。可将此基础结构视为数据库统计信息、度量等的数据仓库。

数据库(默认情况下)每60 分钟从SGA 中自动捕获一次统计信息,然后将其以快照形式存储在AWR 中。这些快照通过一个名为易管理性监视器(MMON) 的后台进程存储在磁盘上。默认情况下,快照会保留八天。你可以修改快照时间间隔和保留间隔。

AWR 中包含数百个表,所有这些表均属于SYSMAN方案且存储在SYSAUX表空间中。

Oracle 建议仅使用Enterprise Manager 或DBMS_WORKLOAD_REPOSITORY程序包访问资料档案库,对AWR 进行操作。不支持直接对资料档案库表进行DML 操作。

 

76.Identify three key features of ASM. (Choose three.)

A. file striping

B. allocation unit mirroring

C. automatic disk rebalancing

D. automatic file size increment

E. automatic undo management

 

Answer: ABC

答案解析:

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

在ASM 中,条带化主要具有两种用途:

• 在磁盘组的所有磁盘中执行I/O 负载平衡。

• 改善I/O 等待时间

粗粒度条带化在磁盘组的各磁盘中分布分配单元。这用于为磁盘组提供负载平衡。分配文件时,ASM 会在所有磁盘中平均分布分配单元。有时分布无法非常平均,但是随着时间的流逝,会变得几乎相等。

细粒度条带化将数据区拆分为128 KB 的块,然后在许多磁盘中分布每个区的负载,从而改善特定类型文件的等待时间。默认情况下,细粒度条带化用于控制文件和联机重做日志文件。ASM会分配单位镜像来防止磁盘破坏带来数据的损失。在添加或者删除磁盘时或者使用alter diskgroup语句时,ASM会自动让磁盘rebalance。

 

77.You have three production databases, HRDB, FINDB, and ORGDB, that use the same ASM instance. At the end of the day, while all three production database instances are running, you execute the following command on the ASM instance :

SQL> shutdown immediate;

What is the result of executing this command?

A. The ASM instance is shut down, but the other instances are still running.

B. It results in an error because other database instances are connected to it.

C. All the instances, including the ASM instance, are shut down in the IMMEDIATE mode.

D. HRDB, FINDB, and ORGDB instances are shut down in the ABORT mode and the ASM instance is shut down in the IMMEDIATE mode.

 

Answer: B

答案解析:

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

有连接的RDBMS 实例时,不应用NORMAL、IMMEDIATE和 TRANSACTIONAL形式的关闭,而将返回下面的错误:

SQL> shutdown

ORA-15097: cannot SHUTDOWN ASM instance with connected client (process 14372)

 

78.You enable block change tracking. You issue the following command:

BACKUP INCREMENTAL LEVEL 0 DATABASE;

The next day, you issue the following command:

BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

Which statement about the use of the change tracking file is true?

A. RMAN reads the block change tracking file only when it performs the incremental level 0 backup.

B. RMAN reads the block change tracking file when it performs both incremental backups.

C. RMAN reads the block change tracking file only when it performs the incremental level 1 backup.

D. RMAN does not read the block change tracking file when it performs either incremental backup.

 

Answer: C

答案解析:

参考:快速增量备份:http://blog.csdn.net/rlhua/article/details/12321679

通过启用块更改跟踪,可执行快速增量备份。块更改跟踪会将有更改的每个块的物理地址写入到一个文件中。需要执行增量备份时,RMAN 可查看块更改跟踪文件,并只备份该文件所引用的块,而无需通过扫描每个块来确定该块自上次备份以来是否发生过更改。

这会加快增量备份的速度。

只有同级之间的增量累积备份才有完全不一样更改过的块。故选C。

 

79.You executed the following command:

RMAN> RECOVER COPY OF DATAFILE '/u01/app/oracle/oradata/orcl/users01.dbf';

Which statement regarding the above command is correct?

A. The '/u01/app/oracle/oradata/orcl/users01.dbf' data file is recovered from the image copy.

B.The '/u01/app/oracle/oradata/orcl/users01.dbf' data file is recovered from the last incremental backup.

C. Image copies of the '/u01/app/oracle/oradata/orcl/users01.dbf' data file are updated with all changes up to incremental backup SCN.

D. Image copies of the '/u01/app/oracle/oradata/orcl/users01.dbf' data file are recovered using the above command if data file recovery fails.

 

Answer: C

答案解析:

参考:恢复映像副本:http://blog.csdn.net/rlhua/article/details/12346829

RMAN 可使用增量备份来恢复映像副本:

• 映像副本会使用截至增量备份SCN 的所有更改来进行更新。

• 增量备份减少了介质恢复所需的时间。

• 增量还原之后不需要执行映像副本。

可使用RMAN 将增量备份应用于数据文件映像副本。

在这种恢复方法中,你使用RMAN 恢复数据文件的副本,即通过将增量备份应用于映像副本将映像副本前滚(恢复)至指定的时间点。映像副本使用执行增量备份时的SCN 之前的所有更改来进行更新。

RMAN 使用在介质恢复中得到的更新数据文件,如同使用在该SCN 得到的完全映像副本一样,因此没有每天创建数据库完全映像副本所需的开销。

下面介绍了将增量备份应用于数据文件映像副本的优点:

• 由于你只需要应用自上一次增量备份以来的归档日志,因此可以减少介质恢复(使用归档日志)所需的时间。

• 在增量还原之后不需要执行完全映像副本。

如果在应用增量备份文件期间恢复过程失败,只需要重新启动恢复过程。在创建映像数据文件副本之前到要停止恢复过程之前的这段时间内,RMAN 自动确定这期间所需应用的增量备份文件。如果RMAN 目录中记录了多个版本的映像副本,RMAN 自动使用最新版

本的映像副本。如果RMAN 不能将增量备份文件与映像副本合并,则它会报告错误。

 

80.Which two statements regarding a SQL profile are true? (Choose two.)

A. It is built by Automatic Tuning Optimizer.

B. It cannot be stored persistently in the data dictionary.

C. It can be used by the query optimizer automatically.

D. It can be created manually by using the CREATE PROFILE command.

 

Answer: AC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF94873

 

SQL Profile Creation

When you accept a profile, the database creates the profile and stores it persistently in the data dictionary. If a user issues a statement for which a profile has been built, then the query optimizer (in normal mode) uses both the environment and the SQL profile to build a well-tuned plan.

As a rule of thumb, accept a SQL profile recommended by SQL Tuning Advisor. If both an index and a SQL profile are recommended, then either use both or use the SQL profile only. If you create an index, then the optimizer may need the profile to pick the new index.

In some situations, SQL Tuning Advisor may find an improved serial plan in addition to an even better parallel plan. In this case, the advisor recommends both a standard and a parallel SQL profile, enabling you to choose between the best serial and best parallel plan for the statement. Accept a parallel plan only if the increase in response time is worth the decrease in throughput

 

81.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.)

A. FREE_SPACE indicates only the space that is currently unallocated.

B. ALLOCATED_SPACE indicates only the space currently allocated and in use.

C. FREE_SPACE indicates only the space that is currently allocated and available for reuse.

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_5062.htm#REFRN23627

 

DBA_TEMP_FREE_SPACE displays temporary space usage information at tablespace level.

Column

Datatype

NULL

Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the tablespace

TABLESPACE_SIZE

NUMBER

 

Total size of the tablespace, in bytes

ALLOCATED_SPACE

NUMBER

 

Total allocated space, in bytes, including space that is currently allocated and used and space that is currently allocated and available for reuse

FREE_SPACE

NUMBER

 

Total free space available, in bytes, including space that is currently allocated and available for reuse and space that is currently unallocated

 

82.Identify the three predefined server-generated alerts. (Choose three.)

A. Drop User

B. Tablespace Space Usage

C. Resumable Session Suspended

D. Recovery Area Low On Free Space

E. SYSTEM Tablespace Size Increment

 

Answer: BCD

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/monitoring.htm#ADMIN11247

 

 

预警是当数据库处于不理想状态且需要引起注意时发出的通知。默认情况下,Oracle DB通过Enterprise Manager Database Control 提供预警。也可选择配置Enterprise Manager 以向管理员发送有关问题状况的电子邮件,还可在控制台上显示预警信息。

另外,还可为系统的多个相关度量设置阈值。如果数据库偏离正常读数太多而达到了这些阈值,Oracle Database 11g会预先发送通知。提前通知潜在的问题,可使用户迅速作出响应,并通常在用户注意到这些问题之前就解决这些问题。

默认情况下受监视的度量大约有60 个,其中包括:

• 中断作业计数

• 等待所用的数据库时间百分比(%)

• 转储区占用率(%)

• 参照基线的SQL 响应时间百分比(%)

• 表空间占用率(%)

• 一般意外事件

 

另外一些可提前提供问题通知的重要度量有:

• 平均文件读取时间(厘秒)

• 响应时间(每事务处理)

• 等待时间(%)


 

Monitoring Database Operations with Server-Generated Alerts

A server-generated alert is a notification from the Oracle Database server of an impending problem. The notification may contain suggestions for correcting the problem. Notifications are also provided when the problem condition has been cleared.

Alerts are automatically generated when a problem occurs or when data does not match expected values for metrics, such as the following:

Physical Reads Per Second

User Commits Per Second

SQL Service Response Time

Server-generated alerts can be based on threshold levels or can issue simply because an event has occurred. Threshold-based alerts can be triggered at both threshold warning and critical levels. The value of these levels can be customer-defined or internal values, and some alerts have default threshold levels which you can change if appropriate. For example, by default a server-generated alert is generated for tablespace space usage when the percentage of space usage exceeds either the 85% warning or 97% critical threshold level. Examples of alerts not based on threshold levels are:

Snapshot Too Old

Resumable Session Suspended

Recovery Area Space Usage

An alert message is sent to the predefined persistent queue ALERT_QUE owned by the user SYS. Oracle Enterprise Manager reads this queue and provides notifications about outstanding server alerts, and sometimes suggests actions for correcting the problem. The alerts are displayed on the Enterprise Manager Database Home page and can be configured to send email or pager notifications to selected administrators. If an alert cannot be written to the alert queue, a message about the alert is written to the Oracle Database alert log.

Background processes periodically flush the data to the Automatic Workload Repository to capture a history of metric values. The alert history table andALERT_QUE are purged automatically by the system at regular intervals.

 

83.Which three actions are required to configure the Flashback Database? (Choose three.)

A. set Flash Recovery Area

B. enable Flashback logging

C. create FLASHBACK tablespace

D. start the database in the ARCHIVELOG mode

E. start the database in the NOARCHIVELOG mode

 

Answer: ABD

答案解析:

参考:闪回数据库:http://blog.csdn.net/rlhua/article/details/12421005

配置工作:

1、确保数据库处于归档模式。

2、启用闪回日志记录并指定快速恢复区。

 

84.View the Exhibit and examine the Data Pump architecture.

Identify the numbered components.

 

A. 1 - Oracle Loader, 2 - Oracle Data Pump, 3 - Direct Path API

B. 1 - Oracle Data Pump, 2 - Direct Path API, 3 - Oracle Loader

C. 1 - Direct Path API, 2 - Oracle Loader, 3 - Oracle Data Pump

D. 1 - Oracle Loader, 2 - Direct Path API, 3 - Oracle Data Pump

 

Answer: A

答案解析:

参考移动数据:一般体系结构:http://blog.csdn.net/rlhua/article/details/12749863

 

主要功能组件:

• DBMS_DATA PUMP:包括高速导出与导入实用程序的API,可用于成批地移动数据和元数据。

• 直接路径API (DPAPI):Oracle Database 11g支持直接路径API 接口,可在卸载和加载时将数据转换与语法分析工作量降至最低。

• DBMS_METADATA:Worker 进程使用该组件卸载或加载所有元数据。数据库对象定义是使用XML 存储的,而不是SQL。

• 外部表API:使用ORACLE_DATAPUMP和ORACLE_LOADER访问驱动程序,可将数据存储在外部表中(即与平台无关的文件中)。使用SELECT语句可读取外部表,就像外部表存储在Oracle DB 中一样。

• SQL*Loader:与外部表集成在一起,因此可为外部表访问参数提供自动移植加载程序控制文件的功能。

• expdp和impdp:瘦客户机层,可通过调用DBMS_DATAPUMP程序包启动和监视数据泵操作。

• 其它客户机:得益于此基础结构的应用程序(如Database Control、复制应用程序、可传输表空间应用程序和用户应用程序)。SQL*Plus 也可用作DBMS_DATAPUMP的一个客户机,但只提供实时操作的简单状态查询。

 

85.You executed the following command to drop a user:

DROP USER scott CASCADE;

Which two statements regarding the above command are correct? (Choose two.)

A. All the objects of scott are moved to the Recycle Bin.

B. Any objects in the Recycle Bin belonging to scott are purged.

C. All the objects owned by scott are permanently dropped from the database.

D. All the objects of scott in the Recycle Bin must be purged before executing the DROP command.

E. Any objects in the Recycle Bin belonging to scott will not be affected by the above DROP command.

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9008.htm#SQLRF54974

ACD描述错误,题要求选两个,故选BC

DROP USER

Purpose

Use the DROP USER statement to remove a database user and optionally remove the user's objects.

In an Oracle Automatic Storage Management (Oracle ASM) cluster, a user authenticated AS SYSASM can use this clause to remove a user from the password file that is local to the Oracle ASM instance of the current node.

When you drop a user, Oracle Database also purges all of that user's schema objects from the recycle bin.

Prerequisites

You must have the DROP USER system privilege. In an Oracle ASM cluster, you must be authenticated AS SYSASM.

 

user

Specify the user to be dropped. Oracle Database does not drop users whose schemas contain objects unless you specify CASCADE or unless you first explicitly drop the user's objects.

Restriction on Dropping Users 

You cannot drop a user whose schema contains a table that uses a flashback data archive for historical tracking. You must first disable the table's use of the flashback data archive.

 

CASCADE

Specify CASCADE to drop all objects in the user's schema before dropping the user. You must specify this clause to drop a user whose schema contains any objects.

If the user's schema contains tables, then Oracle Database drops the tables and automatically drops any referential integrity constraints on tables in other schemas that refer to primary and unique keys on these tables.

If this clause results in tables being dropped, then the database also drops all domain indexes created on columns of those tables and invokes appropriate drop routines.

 

86.Your production database is running in archivelog mode and you are using recovery manager (RMAN) with recovery catalog to perform the database backup at regular intervals. When you attempt to restart the database instance after a regular maintenance task on Sunday, the database fails to open displaying the message that the data file belonging to the users tablespace are corrupted. The steps to recover the damaged data files are follows:

1. Mount the database

2. Open the database

3. Recover the data file

4. Restore the data file

5. Make the data file offline

6. Make the data file online

Which option identifies the correct sequence that you must use to recover the data files?

A. 2, 4, 3

B. 1, 4, 3, 2

C. 2, 5, 4, 3, 6

D. 5, 2, 4, 3, 6

E. 1, 5, 4, 3, 6, 2

Answer: E

答案解析:

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

 

AC必错,应该数据文件毁坏,不能直接打开数据库。

BDE都可,数据库重启后,发现数据文件损坏是在mount阶段,故不需要再mount一下,如果必须要mount,只能先shutdown;

并且E在mount阶段offline数据文件有点多此一举,D最为合适。

此题答案应为D

 

题中:使用rman恢复目录正常备份数据库,在维护任务重新启动数据库的情况下,users表空间的文件损坏,不能打开。

通过以下实验,可以看出正确的顺序为432.

实验验证:

删除数据文件

[oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/users01.dbf

 

sys@TEST1107> select * from scott.dept;

select * from scott.emp

                    *

ERROR at line 1:

ORA-01116: error in opening database file 4

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

 

 

sys@TEST1107> shutdown immediate;

ORA-01116: error in opening database file 4

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

sys@TEST1107> shutdown abort

ORACLE instance shut down.

 

重新启动时,发现报错。此时数据库为mount状态。

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size            1006633240 bytes

Database Buffers          234881024 bytes

Redo Buffers                8921088 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

直接使用rman来restore和recover,然后在使用rman或者sqlplus来打开数据库。

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Dec 24 09:18:51 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TEST1107 (DBID=2336818266, not open)

 

RMAN> restore datafile 4;

 

Starting restore at 24-DEC-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=221 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=189 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=33 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test1107/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp tag=TAG20131224T090841

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:08

Finished restore at 24-DEC-13

 

RMAN> recover datafile 4;

 

Starting recover at 24-DEC-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery complete, elapsed time: 00:00:02

 

Finished recover at 24-DEC-13

 

 

 

sys@TEST1107> alter database open;

 

Database altered.

 

sys@TEST1107> select * from scott.dept;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

 

 

 

第二种情况:重启时数据文件4有问题,然后关闭数据库,mount数据库,然后使用rman来restore和recover,最后打开数据库。顺序为1432 B答案

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size            1006633240 bytes

Database Buffers          234881024 bytes

Redo Buffers                8921088 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

 

sys@TEST1107> shutdown immediate;

ORA-01109: database not open

 

 

Database dismounted.

ORACLE instance shut down.

sys@TEST1107> startup mount;

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size            1006633240 bytes

Database Buffers          234881024 bytes

Redo Buffers                8921088 bytes

Database mounted.

 

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Dec 24 09:32:17 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TEST1107 (DBID=2336818266, not open)

 

RMAN> restore datafile 4;

 

Starting restore at 24-DEC-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=189 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=221 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=3 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test1107/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp tag=TAG20131224T090841

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 24-DEC-13

 

RMAN> recover datafile 4;

 

Starting recover at 24-DEC-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery complete, elapsed time: 00:00:01

 

Finished recover at 24-DEC-13

 

RMAN> alter database open;

 

database opened

 

 

第三种情况:重启后发现报错,先offline,再打开数据库,然后在用rman restore和recover,online数据文件。顺序为52436 D答案

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size            1006633240 bytes

Database Buffers          234881024 bytes

Redo Buffers                8921088 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

 

sys@TEST1107> alter database datafile 4 offline;

 

Database altered.

 

sys@TEST1107> alter database open;

 

Database altered.

 

sys@TEST1107> select * from scott.dept;

select * from scott.dept

                    *

ERROR at line 1:

ORA-00376: file 4 cannot be read at this time

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.3.0 - Production on Tue Dec 24 10:06:13 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TEST1107 (DBID=2336818266)

 

RMAN> restore datafile 4;

 

Starting restore at 24-DEC-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=192 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=221 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=6 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test1107/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_12_24/o1_mf_nnndf_TAG20131224T090841_9cm5cf76_.bkp tag=TAG20131224T090841

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:04

Finished restore at 24-DEC-13

 

RMAN> recover datafile 4;

 

Starting recover at 24-DEC-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

 

archived log for thread 1 with sequence 437 is already on disk as file /u01/rmanbak/d1/1_437_830778999.dbf

archived log for thread 1 with sequence 438 is already on disk as file /u01/rmanbak/d1/1_438_830778999.dbf

archived log for thread 1 with sequence 439 is already on disk as file /u01/rmanbak/d1/1_439_830778999.dbf

archived log file name=/u01/rmanbak/d1/1_437_830778999.dbf thread=1 sequence=437

media recovery complete, elapsed time: 00:00:02

Finished recover at 24-DEC-13

 

RMAN> sql 'alter database datafile 4 online';

 

sql statement: alter database datafile 4 online

 

 

sys@TEST1107> select * from scott.dept;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

 

87.You want to perform an RMAN backup of database as a copy. Which two factors will you consider while performing the backup operation? (Choose two).

A. The backup as copy can only be taken to disk

B. The backup as copy can only be taken to tape

C. Backup can be performed only when the instance is shutdown

D. Backup will constitute all used and unused blocks in the database

 

Answer: AD

 

Syntax Element

Description

COPY OF DATABASE

Makes a backup of previous image copies of all data files and control files in the database. All data files that would normally be included by BACKUP DATABASE are expected to have copies: if not, RMAN signals an error. It is not necessary for all copies to have been produced by a single BACKUP command. If multiple copies exist of a data file, then RMAN backs up the latest. Optionally, specify the copies by tag name (for example,FULL_COLD_COPY).

Note: The output of this command can be image copies or backup sets.

 

题意说,使用rman进行数据库的copy,哪两种因素在你进行backup时所考虑的?

A。只能备份到disk

D。数据库里所有使用和未使用的块都会被备份。

 

88.In your database, the flash recovery area (FRA) is configured as the default for RMAN backups. You executed the following commands to configure the settings in RMAN:

 

Which statement is true about the outcome?

A. Only one channel is allocated and the backup is created in the flash recovery area

B. Only one channel is allocated and the backup is created in the destination specified for channel

C. Two channels are allocated and backup sets are created in the destinations specified for channels 1 and 2

D. Three channels are allocated and backup sets are created in the destinations specified for channels 1, 2, and FRA

 

Answer: A

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta004.htm#RCMRF102

手动分配通道会覆盖CONFIGURE配置的自动分配通道,并且rman的备份信息会默认放在fra中。故选A.

ALLOCATE CHANNEL

Purpose

ALLOCATE CHANNEL manually allocates a channel (which is a connection between RMAN and a database instance). The ALLOCATE CHANNEL command must be issued within a RUN block. It allocates a channel only in the block where the command is issued.

Prerequisites

The target instance must be started.

Usage Notes

Manually allocated channels are distinct from automatically allocated channels specified with CONFIGURE. Automatic channels apply to any RMAN job in which you do not manually allocate channels. You can override automatic channel configurations by manually allocating channels within a RUN command, but you cannot use BACKUP DEVICE TYPE or RESTORE DEVICE TYPE to use automatic channels after specifying manual channels with ALLOCATE CHANNEL.


 



 

虽然在配置时指定两个通道来备份,但是在run块里面只分配了一个通道,而备份时是按照run块来备份,所以只分配了一个通道进行备份。

并且,题中说FRA是默认的rman备份区,所以,备份集被存储在FRA区。选A。

 

89.You are using recovery Manager (RMAN) with a recovery catalog to backup up your production database. The backups and the archived redo log files are copied to a tape drive on a daily basis. The database was open and transactions were recorded in the redo logs. Because of fire in the building you lost your servers having the production database and the recovery catalog database. The archive log files generated after the last backup are intact on one of the remote locations. While performing a disaster recovery of the production database what is the next step that you must perform after restoring the data files and applying archived redo logs?

A. Open the database in NORMAL mode

B. Open the database in read-only mode

C. Open the database in RESTRICTED mode

D. Open the database with the RESETLOGS option

 

Answer: D

答案解析:

参考:灾难性恢复:http://blog.csdn.net/rlhua/article/details/12346829

灾难恢复包括在丢失了整个目标数据库、所有当前控制文件、所有联机重做日志文件、所有参数文件和恢复目录数据库(如果有)后还原和恢复目标数据库。

要执行灾难恢复,至少需要以下备份:

• 数据文件的备份

• 在备份之后生成的相应归档重做日志

• 至少一个控制文件自动备份

基本过程:

• 还原服务器参数文件的自动备份。

• 启动目标数据库实例。

• 从自动备份还原控制文件。

• 装载数据库。

• 还原数据文件。

• 恢复数据文件。

• 使用RESETLOGS选项打开数据库。

 

90.View the exhibit and examine the output. Which statement can be an inference from the output?

Exhibit:

 

A. The FRA disk group has an asynchronous I/O bottleneck

B. The least number of I/Os are performed on the last data file in the list

C. The number of times that the backup or restore process directed the OS to wait until an I/O was complete is the highest for the last data file in the list

D. The number of times that the backup or restore process made an OS call to poll for I/O completion in Nonblocking mode is the least for the FRA disk group

 

Answer: A

 

91.Your database interface is running. A user SCOTT starts a SQL *Plus session, and issues the following query:

SQL> SELECT * FROM sales;

Which process would retrieve the result from the database and return it to the client program?

A. User process

B. Server process

C. System Monitor (SMON)

D. Process Monitor (PMON)

E. Checkpoint process (CKPT)

 

Answer: B

答案解析:

server process:Database processes that handle a client request on behalf of a database.

 

92.You observed the following output for a user session:

What do you infer from the preceding output?

 

A. Resumable set for session with sid 18

B. The user session has entered into a deadlock

C. The database instance is enabled to use asynchronous commit

D. The threshold warning limit is exceeded for the tablespace that is used by the user session

 

Answer: A

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/start.htm#ADMIN11165

sid=18的会话被暂停,等待错误被清除,清除后,会话恢复。

 

EVENT

VARCHAR2(64)

Resource or event for which the session is waiting

See Also: Appendix C, "Oracle Wait Events"

 

Suspending and Resuming a Database

The ALTER SYSTEM SUSPEND statement halts all input and output (I/O) to data files (file header and file data) and control files. The suspended state lets you back up a database without I/O interference. When the database is suspended all preexisting I/O operations are allowed to complete and any new database accesses are placed in a queued state.

The suspend command is not specific to an instance. In an Oracle Real Application Clusters environment, when you issue the suspend command on one system, internal locking mechanisms propagate the halt request across instances, thereby quiescing all active instances in a given cluster. However, if a new instance is started while another instance is being suspended, then the new instance is not suspended.

Use the ALTER SYSTEM RESUME statement to resume normal database operations. The SUSPEND and RESUME commands can be issued from different instances. For example, if instances 1, 2, and 3 are running, and you issue an ALTER SYSTEM SUSPEND statement from instance 1, then you can issue a RESUME statement from instance 1, 2, or 3 with the same effect.

The suspend/resume feature is useful in systems that allow you to mirror a disk or file and then split the mirror, providing an alternative backup and restore solution. If you use a system that cannot split a mirrored disk from an existing database while writes are occurring, then you can use the suspend/resume feature to facilitate the split.

The suspend/resume feature is not a suitable substitute for normal shutdown operations, because copies of a suspended database can contain uncommitted updates.

Caution:

Do not use the ALTER SYSTEM SUSPEND statement as a substitute for placing a tablespace in hot backup mode. Precede any database suspend operation by an ALTER TABLESPACE BEGIN BACKUP statement.

The following statements illustrate ALTER SYSTEM SUSPEND/RESUME usage. The V$INSTANCE view is queried to confirm database status.

SQL> ALTER SYSTEM SUSPEND;

System altered

SQL> SELECT DATABASE_STATUS FROM V$INSTANCE;

DATABASE_STATUS

---------

SUSPENDED

 

SQL> ALTER SYSTEM RESUME;

System altered

SQL> SELECT DATABASE_STATUS FROM V$INSTANCE;

DATABASE_STATUS

---------

ACTIVE

 

93.The database is configured in ARCHIVELOG mode and regular complete database backups are

taken. The loss of which two types of files may require a recovery with the RESETLOGS option? (Choose two)

A. Control files

B. Password files

C. Inactive online redo log file

D. Archived log files required to perform recovery

E. Newly created tablespace which is not backed up

 

Answer: AD

 

答案解析:

A,参考:http://blog.csdn.net/rlhua/article/details/12625067,需要使用RESETLOGS 来打开数据库

B,重新创建新的口令文件

C,Inactive 即是已经备份过的重做日志。丢失可以删除重新创建一个或者清除

D,需要用来恢复的归档日志丢了,即不能做完全恢复,只能不完全恢复,所以只能RESETLOGS 来打开数据库。

E,新的表空间没有备份。参考:http://blog.csdn.net/rlhua/article/details/11869935

 

94.Multiple RMAN sessions are connected to the database instance. Examine the following output when backup commands are running in server sessions: What could have helped you to correlate server sessions with channels?

 

A. Implement RMAN multiplexing

B. Set the DEBUG ON in the RMAN script

C. Specify the command ID in the RMAN script

D. Use a tag with the RMAN BACKUP command

 

Answer: C

答案解析:

参考:监控和优化RMAN:http://blog.csdn.net/rlhua/article/details/12510975

当有多个RMAN 会话正在运行时,最好使用SET COMMAND ID命令在备份期间将某个进程与某个通道相关联,如下所示:

1.在每个会话中,将命令ID 设置为不同的值,然后备份所需的对象。例如,在会话1 中输入下列内容:

RUN

{

SET COMMAND ID TO 'sess1';

BACKUP DATABASE;

}

在会话2 中运行的作业中将命令ID 设置为一个字符串,如sess2:

RUN

{

SET COMMAND ID TO 'sess2';

BACKUP DATABASE;

}

2.启动SQL*Plus 会话,然后在执行RMAN 作业时查询联接的V$SESSION和

V$PROCESS视图。例如,输入:

SELECT SID, SPID, CLIENT_INFO

FROM V$PROCESS p, V$SESSION s

WHERE p.ADDR = s.PADDR

AND CLIENT_INFO LIKE '%id=sess%';

 

如果在RMAN 作业中运行SET COMMAND ID命令,则CLIENT_INFO列会以下列格式显示:

id=command_id,rman channel=channel_id

例如,下面显示了一个示例输出:

SID SPID CLIENT_INFO

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

11 8358 id=sess1

15 8638 id=sess2

14 8374 id=sess1,rman channel=c1

9 8642 id=sess2,rman channel=c1

 

sys@TEST0924> SELECT s.sid, p.spid, s.client_info FROM v$process p, v$session s WHERE p.addr = s.paddr  AND CLIENT_INFO LIKE 'rman%';

 

 

 SID SPID                     CLIENT_INFO

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

  68 410                      rman channel=ORA_DISK_1

 160 722                      rman channel=ORA_DISK_1

 

sys@TEST0924> SELECT s.sid, p.spid, s.client_info FROM v$process p, v$session s WHERE p.addr = s.paddr  AND CLIENT_INFO like '%id=sess%';

 

 SID SPID                     CLIENT_INFO

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

   7 653                      id=sess1

 

Matching Server Sessions with Channels in Multiple RMAN Sessions

If more than one RMAN session is active, then it is possible for theV$SESSION.CLIENT_INFO column to yield the same information for a channel in each session. For example:

SID SPID CLIENT_INFO

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

14 8374 rman channel=ORA_SBT_TAPE_1

9 8642 rman channel=ORA_SBT_TAPE_1

In this case, you have the following methods for determining which channel corresponds to whichSID value.

Obtaining the Channel ID from the RMAN Output

In this method, you must first obtain the sid values from the RMAN output and then use these values in your SQL query.

To correlate a process with a channel during a backup:

In an active session, run the RMAN job as usual and examine the output to get thesid for the channel. For example, the output may show:

Starting backup at 21-AUG-01

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: sid=14 devtype=SBT_TAPE

Start a SQL*Plus session and then query the joined V$SESSION and V$PROCESS views while the RMAN job is executing. For example, enter:

COLUMN CLIENT_INFO FORMAT a30

COLUMN SID FORMAT 999

COLUMN SPID FORMAT 9999

SELECT s.SID, p.SPID, s.CLIENT_INFO

FROM V$PROCESS p, V$SESSION s

WHERE p.ADDR = s.PADDR

AND CLIENT_INFO LIKE 'rman%'

/

Use the sid value obtained from the first step to determine which channel corresponds to which server session:

SID SPID CLIENT_INFO

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

14 2036 rman channel=ORA_SBT_TAPE_1

12 2066 rman channel=ORA_SBT_TAPE_1

Correlating Server Sessions with Channels by Using SET COMMAND ID

In this method, you specify a command ID string in the RMAN backup script. You can then queryV$SESSION.CLIENT_INFO for this string.

To correlate a process with a channel during a backup:

In each session, set the COMMAND ID to a different value after allocating the channels and then back up the desired object. For example, enter the following in session 1:

RUN

{

ALLOCATE CHANNEL c1 TYPE disk;

SET COMMAND ID TO 'sess1';

BACKUP DATABASE;

}

Set the command ID to a string such as sess2 in the job running in session 2:

RUN

{

ALLOCATE CHANNEL c1 TYPE sbt;

SET COMMAND ID TO 'sess2';

BACKUP DATABASE;

}

Start a SQL*Plus session and then query the joined V$SESSION and V$PROCESS views while the RMAN job is executing. For example, enter:

SELECT SID, SPID, CLIENT_INFO

FROM V$PROCESS p, V$SESSION s

WHERE p.ADDR = s.PADDR

AND CLIENT_INFO LIKE '%id=sess%';

If you run the SET COMMAND ID command in the RMAN job, then theCLIENT_INFO column displays in the following format:

id=command_id,rman channel=channel_id

For example, the following shows sample output:

SID SPID CLIENT_INFO

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

11 8358 id=sess1

15 8638 id=sess2

14 8374 id=sess1,rman channel=c1

9 8642 id=sess2,rman channel=c1

The rows that contain the string rman channel show the channel performing the backup. The remaining rows are for the connections to the target database.

 

95.Examine the following scenario: The target database instance is running. The most recent backup available for the target database was taken two days ago. Log files switches have occurred in last two days. The target database is duplicated on the same host, using the Recovery Manager (RMAN) duplicate command as follows:

RMAN> RUN { ALLOCATE AUXILIARY CHANNEL aux 1 DEVICE TYPE DISK;

DUPLICATE TARGET DATABASE TO auxdb; }

Which statement is true about the duplicate database in this scenario?

A. It contains data till the last backup

B. It contains all data from target database until the current time

C. It contains all data from only the committed transactions in the target database

D. It contains all data except that which is used by the transactions in the current online redo file of target database

 

Answer: D

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV423

从命令可看出,是使用AUXILIARY CHANNEL基于 backup-based的复制数据库。

 

RMAN must perform database point-in-time recovery, even when no explicit point in time is provided for duplication. Point-in-time recovery is required because the online redo log files in the source database are not backed up and cannot be applied to the duplicate database. The farthest point of recovery of the duplicate database is the most recent redo log file archived by the source database.

 

从这句话可以看出,复制数据库是基于时间点的恢复,意味着在source database的在线重做日志没有被备份,所以不能被应用到duplicate database,故最多能恢复到source database最近的归档重做日志所包含的数据,即在target database即source database中正在记录事务的重做日志不能包含到duplicate database里去。

故选D

How RMAN Duplicates a Database

For backup-based duplication, the principal work of the duplication is performed by the auxiliary channels. These channels correspond to a server session on the auxiliary instance on the destination host. For active database duplication the primary work is performed by target channels.

RMAN must perform database point-in-time recovery, even when no explicit point in time is provided for duplication. Point-in-time recovery is required because the online redo log files in the source database are not backed up and cannot be applied to the duplicate database. The farthest point of recovery of the duplicate database is the most recent redo log file archived by the source database.

As part of the duplicating operation, RMAN automates the following steps:

Creates a default server parameter file for the auxiliary instance if the following conditions are true:

Duplication does not involve a standby database.

Server parameter files are not being duplicated.

The auxiliary instance was not started with a server parameter file.

Restores from backup or copies from active database the latest control file that satisfies the UNTIL clause requirements.

Mounts the restored or copied backup control file from the active database.

Uses the RMAN repository to select the backups for restoring the data files to the auxiliary instance. This step applies to backup-based duplication.

Restores and copies the duplicate data files and recovers them with incremental backups and archived redo log files to a noncurrent point in time.

Shuts down and restarts the database instance in NOMOUNT mode.

Creates a new control file, which then creates and stores the new DBID in the data files.

Opens the duplicate database with the RESETLOGS option and creates the online redo log for the new database.

 

 

 

 

96.Examine the following command:

SQL> ALTER TABLE booking SHRINK SPACE COMPACT;

Which activity is performed when the preceding command is executed?

A. The shrink operation touches every block in the BOOKING table

B. The high-water mark (HWM) for the BOOKING table is shifted from its original position

C. The progress of the shrink operation is saved in the bitmap blocks of the BOOKING table

D. The data manipulation language (DML) triggers on the BOOKING table are executed because the shrink operation is internally handled by the INSERT/DELETE operation

 

Answer: C

答案解析:

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

如果有长时间运行的查询,而且这些查询可能跨越收缩操作,并尝试从已回收的块中读取数据,则COMPACT子句会很有用。指定SHRINK SPACE COMPACT子句时,收缩操作的进度将保存在相应段的位图块中。这意味着下次在同一个段上执行收缩操作时,Oracle DB Server 可以记住已经执行过的操作。

 

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_3001.htm#SQLRF53315

 

COMPACT If you specify COMPACT, then Oracle Database only defragments the segment space and compacts the table rows for subsequent release. The database does not readjust the high water mark and does not release the space immediately (B wrong). You must issue another ALTER TABLE ... SHRINK SPACE statement later to complete the operation. This clause is useful if you want to accomplish the shrink operation in two shorter steps rather than one longer step.

For an index or index-organized table, specifying ALTER [INDEX | TABLE] ... SHRINK SPACE COMPACT is equivalent to specifying ALTER [INDEX | TABLE ... COALESCE. Theshrink_clause can be cascaded (refer to the CASCADE clause, which follows) and compacts the segment more densely than does a coalesce operation, which can improve performance. However, if you do not want to release the unused space, then you can use the appropriate COALESCE clause.

 

 

97.The RECYCLEBIN parameter is set to ON for your database. You drop a table, PRODUCTS, from the SCOTT schema.

Which two statements are true regarding the outcome of this action? (Choose two)

A. All the related indexes and views are automatically dropped

B. The flashback drop feature can recover only the table structure

C. Only the related indexes are dropped whereas views are invalidated

D. The flashback drop feature can recover both the table structure and its data

Answer: CD

答案解析:

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

使用DROP TABLE语句可以将表移至回收站或从数据库中全部删除该表及其所有数据。

如果不指定PURGE子句,DROP TABLE语句就不会将使用的空间重新释放到表空间中供其它对象使用,而且该空间会继续视为用户的空间限额。删除表会使从属对象失效并删除表的对象权限。删除表后,在数据库中会失去表的所有数据以及与表关联的所有索引。

语法

DROP TABLE table [PURGE] 

在该语法中,table是表的名称。

准则

• 删除表中的所有数据。

• 保留视图和同义词,但不再有效。

• 提交所有待定的事务处理。

• 只有表的创建者或具有DROP ANY TABLE权限的用户才能删除表。

注:使用FLASHBACK TABLE语句可从回收站中还原已删除的表。

 

98.You plan to execute the following command to perform a Flashback Database operation in your database:

SQL> FLASHBACK DATABASE TO TIMESTAMP (SYSDATE -5/24);

Which two statements are true about this? (Choose two)

A. The database must have multiplexed redo log files

B. The database must be in the MOUNT state to execute the command

C. The database must be in the NOMOUNT state to execute the command

D. The database must be opened in RESTRICTED mode before this operation

E. The database must be opened with the RESETLOGS option after the flashback operation

 

 

Answer: BE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9011.htm#SQLRF01801

 

TO TIMESTAMP reverts the database back to its state at the specified timestamp.

Purpose

Use the FLASHBACK DATABASE statement to return the database to a past time or system change number (SCN). This statement provides a fast alternative to performing incomplete database recovery.

Following a FLASHBACK DATABASE operation, in order to have write access to the flashed back database, you must reopen it with an ALTER DATABASE OPEN RESETLOGS statement.

 

Prerequisites

You must have the SYSDBA system privilege. A fast recovery area must have been prepared for the database. The database must have been put in FLASHBACKmode with an ALTER DATABASE FLASHBACK ON statement unless you are flashing the database back to a guaranteed restore point. The database must be mounted but not open. In addition:

The database must run in ARCHIVELOG mode.

The database must be mounted, but not open, with a current control file. The control file cannot be a backup or re-created. When the database control file is restored from backup or re-created, all existing flashback log information is discarded.

The database must contain no online tablespaces for which flashback functionality was disabled with the SQL statement ALTER TABLESPACE ... FLASHBACKOFF.

 

99.View the Exhibit and examine the steps that you executed to create a database resource plan.

Subsequently, you execute the following procedure which results in an error:

SQL> EXECUTE dbms_resources_manager.validate_pending_area ( );

What could be the reason?

Exhibit:

 

A. The pending area is automatically submitted after the plan creation

B. The procedure must be executed before creating the resources plan directive

C. The SYS_GROUP resource consumer group is not included in the resource plan directive

D. The OTHER_GROUPS resources consumer group is not included in the resource plan directive

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN11871

 

Validating the Pending Area

At any time when you are making changes in the pending area, you can call VALIDATE_PENDING_AREA to ensure that the pending area is valid so far.

The following rules must be adhered to, and are checked by the validate procedure:

No plan can contain any loops. A loop occurs when a subplan contains a directive that references a plan that is above the subplan in the plan hierarchy. For example, a subplan cannot reference the top plan.

All plans and resource consumer groups referred to by plan directives must exist.

All plans must have plan directives that point to either plans or resource consumer groups.

All percentages in any given level must not add up to greater than 100.

A plan that is currently being used as a top plan by an active instance cannot be deleted.

The following parameters can appear only in plan directives that refer to resource consumer groups, not other resource plans:

PARALLEL_DEGREE_LIMIT_P1

ACTIVE_SESS_POOL_P1

QUEUEING_P1

SWITCH_GROUP

SWITCH_TIME

SWITCH_ESTIMATE

SWITCH_IO_REQS

SWITCH_IO_MEGABYTES

MAX_EST_EXEC_TIME

UNDO_POOL

MAX_IDLE_TIME

MAX_IDLE_BLOCKER_TIME

SWITCH_FOR_CALL

MAX_UTILIZATION_LIMIT

There can be no more than 28 resource consumer groups in any active plan. Also, at most, a plan can have 28 children.

Plans and resource consumer groups cannot have the same name.

There must be a plan directive for OTHER_GROUPS somewhere in any active plan. This ensures that a session that is not part of any of the consumer groups included in the currently active plan is allocated resources (as specified by the directive for OTHER_GROUPS).

VALIDATE_PENDING_AREA raises an error if any of the preceding rules are violated. You can then make changes to fix any problems and call the procedure again.

It is possible to create "orphan" consumer groups that have no plan directives referring to them. This allows the creation of consumer groups that will not currently be used, but might be part of some plan to be implemented in the future.

Example: Validating the Pending Area:

The following PL/SQL block validates the pending area.

BEGIN

  DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();

END;

/

 

100.Examine the following command that is used to duplicate a database on the same host:

RMAN> RUN

{

ALLOCATE AUXILIARY CHANNEL, aux 1 DEVICE TYPE DISK;

DUPLICATE TARGET DATABASE TO auxdb SKIP READONLY; \ }

Which two statements describe the effect after the database is duplicated successfully? (Choose two)

A. The data files of the read-only tablespaces in the target database are not duplicated

B. The read-only tablespaces in the target database are still defined in new the database

C. The read-only tablespaces in the target database are changed to online after duplication

D. The data files of the read-only tablespaces in the target database get duplicated

E. The read-only tablespaces in the target database are not defined in the new database

 

 

Answer: AB

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90163

 

SKIP READONLY:用于排除只读表空间数据文件。

SKIP READONLY

Excludes data files in current read-only tablespaces from the duplicate database. By default RMAN duplicates current read-only tablespaces.

If a tablespace is currently read/write, but you use untilclause to duplicate the database to an SCN at which the tablespace was read-only, then RMAN does not include the tablespace in the duplicate database. Tablespaces that were read-only previously are considered offline tablespaces and so are not included in the duplication.

Note: The read-only tablespaces must be self-contained for the DUPLICATE command to succeed with this option.

 

 

101.Identify two situations in which you can use Data Recovery Advisor for recovery. (Choose two.)

A. The user has dropped an important table that needs to be recovered.

B. The database files are corrupted when the database is open.

C. You are not able to start up the database instance because the required database files are missing.

D. The archived log files are missing for which backup is not available.

 

Answer: BC

答案解析:

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

数据恢复指导可处理以下两种情况:一种是因必需的数据库文件缺失、不一致或损坏而无法启动数据库,另一种是在运行时发现文件损坏。

 

102.Examine the following values of the initialization parameters in the database having the SID ORCL:

BACKGROUND_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/bdump

USER_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/udump

CORE_DUMP_DEST=/u01/app/oracle/product/11.1.0/db_1/cdump

DIAGNOSTIC_DEST=

The environment variables have the following value:

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

What is the location of the Automatic Diagnostic Repository (ADR) home?

A. /u01/app/oracle/product/11.1.0/db_1

B. /u01/app/oracle

C. $ORACLE_HOME/bdump

D. $ORACLE_HOME/log

 

Answer: B

答案解析:

如果ORACLE_BASE环境变量已设置,则DIAGNOSTIC_DEST被设置为$ORACLE_BASE

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN11008

 

the ADR root directory is known as ADR base. Its location is set by the DIAGNOSTIC_DEST initialization parameter. If this parameter is omitted or left null, the database sets DIAGNOSTIC_DEST upon startup as follows:

If environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to the directory designated by ORACLE_BASE.

If environment variable ORACLE_BASE is not set, DIAGNOSTIC_DEST is set to ORACLE_HOME/log

 

Within ADR base, there can be multiple ADR homes, where each ADR home is the root directory for all diagnostic data—traces, dumps, the alert log, and so on—for a particular instance of a particular Oracle product or component. For example, in an Oracle Real Application Clusters environment with Oracle ASM, each database instance, Oracle ASM instance, and listener has an ADR home.

 

103.Observe the following PL/SQL block:

BEGIN

dbms_spm.configure('SPACE_BUDGET_PERCENT', 30);

END;

Which statement is correct regarding the above PL/SQL block?

A. It automatically purges the SQL management objects when SMB occupies more than 30% of the SYSAUX tablespace.

B. It reserves 30% of the space in the SYSAUX tablespace for SQL Management Base (SMB).

C. It reserves 30% of the space in the SYSTEM tablespace for SMB.

D. It generates a weekly warning in the alert log file when SMB occupies more than 30% of the SYSAUX tablespace.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_spm.htm#ARPLS68159

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95123

When the space occupied by SQL management base exceeds the defined space budget limit, a weekly database alert is generated.

Table 136-6 Names & Values for CONFIGURE Procedure Parameters

Name

Description

Possible Values

Default Value

space_budget_percent

Maximum percent of SYSAUX space that can be used for SQL management base

1,2, …, 50

10

plan_retention_weeks

Number of weeks to retain unused plans before they are purged

5,6, …, 523

53

 

    DBMS_SPM包允许用户使用SQL计划管理功能来管理SQL执行计划,SQL计划管理功能可以通过长时间的记录和分析SQL语句执行计划来有效的防止由于突然间更改一个SQL语句执行计划所导致数据库性能的衰退,而且还可以通过已知的一组高效的执行计划生成一些执行计划基线。这些SQL计划基线能够随后用于保证适当的性能,即使是在系统发生改变的时候,通常在如下的情况  使用SQL计划功能来管理SQL执行计划:
    数据库升级安装改变优化器时,通常会有少部分的执行计划改变,大部分可能是有变化的或者是有提高的。无论怎样,还是存在一部分的计划改变所导致性能的衰退问题。此时利用SQL计划基线能显著地减少由于数据库更新带来的性能问题。
    正在运行的系统和不断变化的数据会带来一些性能问题。利用SQL计划基线可以减少性能回退同时可以维持系统稳定。
    有时部署新的系统模块相当于引用新的SQL语句到系统中,应用程序需要有适当的SQL执行计划,而这些新的执行计划需要通过一些标准的测试获得,使用SQL计划基线能在随时间的变化产生更好的性能
    DBMS_SPM包属于SYS用户,其他用户需要被分配到ADMINISTER SQL MANAGEMENT OBJECT权限才可以执行这个包
    ● CONFIGURE 程序
    这个程序用于设置SQL管理程序的配置选项,使用parameter/value 的格式。这个函数可能被调用多次,每次可以设置不同的值。
     

CONFIGURE Procedure

This procedure sets configuration options for SQL management base, in parameter/value format. This function can be called numerous times, each time setting a different configuration option.

Syntax

DBMS_SPM.CONFIGURE (

   parameter_name    IN VARCHAR2,

   parameter_value   IN NUMBER);

Parameters

Table 136-5 CONFIGURE Procedure Parameters

Parameter

Description

parameter_name

Name of parameter to set (see table below)

parameter_value

Value of parameter to use (see table below)

 

Table 136-6 Names & Values for CONFIGURE Procedure Parameters

Name

Description

Possible Values

Default Value

space_budget_percent

Maximum percent of SYSAUX space that can be used for SQL management base

1,2, …, 50

10

plan_retention_weeks

Number of weeks to retain unused plans before they are purged

5,6, …, 523

53

 

Usage Notes

The default space budget for SQL management base is no more than ten percent of the size of SYSAUX tablespace. The space budget can be set to a maximum of 50%. The default unused plan retention period is one year and one week, which means a plan will be automatically purged if it has not been used for more than a year. The retention period can be set to a maximum of 523 weeks (i.e. a little over 10 years).

When the space occupied by SQL management base exceeds the defined space budget limit, a weekly database alert is generated.

这个参数是设置最大的在SYSAUX空间上的百分比,并且如果超过空间阈值则每周会告警,所以选择D

 

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95123

 

15.6.1 Disk Space Usage

Disk space used by the SMB is regularly checked against a limit based on the size of the SYSAUX tablespace. By default, the limit for the SMB is no more than 10% of the size of SYSAUX. The allowable range for this limit is between 1% and 50%.

A weekly background process measures the total space occupied by the SMB. When the defined limit is exceeded, the process writes a warning to the alert log. The database generates alerts weekly until one of the following conditions is met:

The SMB space limit is increased

The size of the SYSAUX tablespace is increased

The disk space used by the SMB is decreased by purging SQL management objects (SQL plan baselines or SQL profiles)

To change the percentage limit, use the CONFIGURE procedure of the DBMS_SPM package. The following example changes the space limit to 30%:

BEGIN

  DBMS_SPM.CONFIGURE('space_budget_percent',30);

END;

/

 

OCP-1Z0-053-V13.02-477题

 

104.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 is immediately dropped from the disk group.

 B. The ASM tracks the extents that are modified during the outa

 C. The ASM migrates the extents from the unavailable disk to the remaining disks.

D. The disk automatically goes offline.

 

 

Answer: BD 题目解答:

AC 是不可能的

 

105.Which statements are true regarding table compression? (Choose all that apply.)

A. It saves disk space and reduces memory usage.

B. It saves disk space but has no effect on memory usage.

C. It incurs extra CPU overhead during DML as well as direct loading operations.

D. It incurs extra CPU overhead during DML but not direct loading operations.

E. It requires uncompress operation during I/O.

 

 

 

Answer: AC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN11630

 

Consider Using Table Compression

As your database grows in size, consider using table compression. Compression saves disk space, reduces memory use in the database buffer cache, and can significantly speed query execution during reads. Compression has a cost in CPU overhead for data loading and DML. However, this cost might be offset by reduced I/O requirements.

 

 

106.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. Specify undo retention guarantee for the database.

C. Enable supplemental logging for the database.

D. Query V$UNDOSTAT to determine the amount of undo that will be generated and create an undo tablespace for that size.

E. Create Flashback Data Archive on the tablespace on which the tables are stored.

 

 

Answer: A

答案解析:

参考:闪回数据归档概述:http://blog.csdn.net/rlhua/article/details/12221269

闪回数据归档实验测试:http://blog.csdn.net/rlhua/article/details/12222819

需要将表启用闪回数据归档。

 

 

107.Which components are needed for successful and most efficient recovery.
A. The backup RB3 and the current online redo log files
B. the backup RB2 and the archived redo log files after the log sequence number 15622
C. Backup R81 and the archived redo log hies after the log sequence number 12871
D. The backup RB3 and the archived redo log files after the log sequence number 16721



Answer: A
题目解答:最有效的恢复就是备份与归档及 redo 日志

108.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 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.
B. 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.
C. Restore the disk group with changed disk group specification, failure group specification, disk group name, and other disk attributes.
D. Restore metadata in an existing disk group by passing the existing disk group name as an input parameter.

Answer: BCD
题目解答: md_restore 无法恢复 data 的 A 错


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

 

Answer: A
题目解答:只有 A

 

110.You plan to collect the Automatic Workload Repository (AWR) data every Monday morning for a month. You want Oracle Database to automatically create a baseline every Monday and remove the old baseline. What is the correct action to achieve this?

A. Create and populate a SQL Tuning Set from the AWR on every Monday.

B. Change the RETENTION setting for the AWR snapshots to 7 days on Monday.

C. Create a repeating baseline template.

D. Insert a finding directive for future ADDM tasks.

 

Answer: C

答案解析

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94196

 

5.3.3.2 Creating a Repeating Baseline Template

This section describes how to create a repeating baseline template. A repeating baseline template can be used to automatically create baselines that repeat during a particular time interval over a specific period in the future. For example, you can create a repeating baseline template to generate a baseline that repeats every Monday from 5:00 p.m. to 8:00 p.m. for the year 2009.

To create a repeating baseline template, use the CREATE_BASELINE_TEMPLATE procedure:

BEGIN

    DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE_TEMPLATE (

                   day_of_week => 'monday', hour_in_day => 17,

                   duration => 3, expiration => 30,

                   start_time => '2009-04-02 17:00:00 PST',

                   end_time => '2009-12-31 20:00:00 PST',

                   baseline_name_prefix => 'baseline_2009_mondays_',

                   template_name => 'template_2009_mondays',

                   dbid => 3310949047);

END;

/

The day_of_week parameter specifies the day of the week on which the baseline will repeat. The hour_in_day parameter specifies the hour in the day when the baseline will start. The duration parameter specifies the duration, in number of hours, that the baseline will last. The expiration parameter specifies the number of days to retain each created baseline. If set to NULL, then the baselines never expires. The start_time parameter specifies the start time for the baseline to be created. The end_time parameter specifies the end time for the baseline to be created. The baseline_name_prefix parameter specifies the name of the baseline prefix that will be appended to the data information when the baseline is created. The template_name parameter specifies the name of the baseline template. The optional dbid parameter specifies the database identifier. If unspecified, then the local database identifier is used as the default value.

In this example, a baseline template named template_2009_mondays is created that will generate a baseline on every Monday from 5:00 p.m. to 8:00 p.m. beginning on April 2, 2009 at 5:00 p.m. and ending on December 31, 2009 at 8:00 p.m. on the database with a database ID of 3310949047. Each of the baselines will be created with a baseline name with the prefix baseline_2009_mondays_ and will expire after 30 days.

5.3.3.3 Dropping a Baseline Template

This section describes how to drop an existing baseline template. Periodically, you may want to remove baselines templates that are no longer used to conserve disk space.

To drop a baseline template:

Review the existing baselines in the DBA_HIST_BASELINE_TEMPLATE view to determine the baseline template you want to drop.

Use the DROP_BASELINE_TEMPLATE procedure to drop the desired baseline template:

BEGIN

  DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE_TEMPLATE (

                   template_name => 'template_2009_mondays',

                   dbid => 3310949047);

END;

/

The template_name parameter specifies the name of the baseline template that will be dropped. In the example, the name of baseline template that will be dropped is template_2009_mondays. The optional dbid parameter specifies the database identifier, which in this example is 3310949047. If you do not specify a value for dbid, then the local database identifier is used as the default value.

 

111.Which three statements are true regarding persistent lightweight jobs? (Choose three.)

A. Persistent lightweight jobs modify several tables in the data dictionary to generate a lot of redo.

B. The user cannot set privileges on persistent lightweight jobs.

C. Persistent lightweight jobs are useful when users need to create a large number of jobs in a short time.

D. Persistent lightweight jobs are useful when users need to create a small number of jobs that run infrequently.

E. The use of a template is mandatory to create persistent lightweight jobs.

 

 

Answer: BCE

同638题:http://blog.csdn.net/rlhua/article/details/19174365

 

• 持久轻量作业在创建/删除时间方面有很大改进,因为它没有创建数据库对象的开销。每个轻量作业都是使用作业模板创建的,并作为程序进行存储。因为持久轻量作业在运行时要向磁盘写入状态信息,所以在执行时应该只有少量改进。持久轻量作业有多种限制:

- 用户无法设置对这些作业的权限,它们将从父作业模板中继承其权限。--B对

- 必须使用模板,无法创建完全自包含的持久轻量作业。---E对

- 只有一些特定的作业属性是可设置的,如JOB_ARGUMENTS。

如果用户需要在非常短的时间内创建大量作业(每秒10 -100 个作业),并且有一组程序(作业模板)可供使用,则最适合使用轻量作业。--C对

 

112.Your database initialization parameter file has the following entry:

SEC_MAX_FAILED_LOGIN_ATTEMPTS=3

Which statement is true regarding this setting?

A. It drops the connection after the specified number of login attempts fail for any user.

B. It is enforced only if the password profile is enabled for the user.

C. It locks the user account after the specified number of attempts.

D. It drops the connection after the specified number of login attempts fail only for users who have the SYSDBA privilege.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams226.htm#REFRN10274

 

 

SEC_MAX_FAILED_LOGIN_ATTEMPTS specifies the number of authentication attempts that can be made by a client on a connection to the server process. After the specified number of failure attempts, the connection will be automatically dropped by the server process.

 

113.Which statement is true regarding virtual private catalogs?

A. A virtual private catalog owner can create a local stored script, and have read/write access to a global stored script.

B. The virtual private catalog owner cannot create and modify the stored scripts.

C. The set of views and synonyms that make up the virtual private catalog is stored in the schema of the RMAN recovery catalog owner.

D. To perform most of the RMAN operations, the virtual catalog owner must have the SYSDBA or

SYSOPER privilege on the target database.

 

 

Answer: D

答案解析:

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

 

作为虚拟目录所有者,你只能查看授予了你访问权限的数据库。

注:如果目录所有者未被授予对目标数据库的SYSDBA或SYSOPER权限,则无法执行大多数RMAN 操作。

而D选项:要执行大多数RMAN操作,虚拟目录的所有者必须对目标数据库具有SYSDBA或SYSOPER权限。正确。

 

114.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 track the Service Request (SR) and implement repairs.

C. You can package and upload diagnostic data to Oracle Support.

D. You can manually run health checks to gather diagnostic data for a problem.

 

 

Answer: BCD

答案解析:

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

B.你可以跟踪服务请求(SR)和实施维修。

C.你可以打包和诊断数据上传到Oracle支持。

D.你可以手动运行健康检查,对一个问题作诊断数据收集。

 

115.What are the advantages of variable extent size support for large ASM files? (Choose two.)

A. It improves resync operations when the disk comes online after being taken offline for maintenance purposes.

B. It improves performance in the extended cluster configuration by reading from a local copy of an extent.

C. Fewer extent pointers are needed to describe the file and less memory is required to manage the extent maps in the shared pool.

D. This feature enables faster file opens because of the reduction in the amount of memory that is required to store file extents.

 

 

Answer: CD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmcon.htm#OSTMG94064

 

C.只需要较少的区指针就可以描述文件以及只需要较少的内存去管理在共享池中的区映像。

D.此功能可以更快地打开文件,因为需要存储文件区的内存量减少。

 

Extents

The contents of Oracle ASM files are stored in a disk group as a set, or collection, of extents that are stored on individual disks within disk groups. Each extent resides on an individual disk. Extents consist of one or more allocation units (AU). To accommodate increasingly larger files, Oracle ASM uses variable size extents.

Variable size extents enable support for larger Oracle ASM data files, reduce SGA memory requirements for very large databases, and improve performance for file create and open operations. The initial extent size equals the disk group allocation unit size and it increases by a factor of 4 or 16 at predefined thresholds. This feature is automatic for newly created and resized data files when specific disk group compatibility attributes are set to 11.1 or higher. 

The extent size of a file varies as follows:

Extent size always equals the disk group AU size for the first 20000 extent sets (0 - 19999).

Extent size equals 4*AU size for the next 20000 extent sets (20000 - 39999).

Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).

 

116.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 recover the damaged ASM disk group along with the data.
C. 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.
D. It can be used to re-create the ASM disk group with its attributes.

 

Answer: CD
题目解答:AB 中的 data 是不能的,只有 CD

117.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. adding the redo log member to the database
C. database and operating system upgrades
D. changing the database storage to ASM-managed storage

 

 

Answer: CD
题目解答:AB 与重放无关的


118.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
题目解答: AC 的 only 错,D 的来源错误 只能 B

 

119. While performing the backup of the flash recovery area, you notice that one of the archived redo log files is missing. You have multiple destinations for archived redo log files. What implications does it have on the backup of the flash recovery area?

A. The backup fails because one of the archived redo log files is missing.

B. The backup succeeds but it would be without the missing archived log.

C. During backup, you are prompted for the alternative destination for the missing archived redo log file.

D. The backup succeeds because it fails over to one of the alternative archived redo log destinations.

 

 

Answer: D

答案解析:

备份可以执行成功,因为归档日志有多个归档路径,在备份时替换成其他没有丢失的路径即可。

 

120.You are managing an Oracle Database 11g instance and an Oracle Database 10g instance on the same machine. Both instances use the ASM instance as storage. Which statement regarding the ASM disk group compatibility attributes are true in this scenario? (Choose all that apply.)

A. The database-compatibility version settings for each instance must be greater than or equal to the RDBMS compatibility of all ASM disk groups used by that database instances.

B. RDBMS compatibility and the database version determines whether a database instance can mount the ASM disk group.

C. The RDBMS compatibility settings for a disk group control the format of data structures for ASM metadata on the disk.

D. ASM compatibility controls which features for the ASM will be enabled.

 

 

Answer: ABD

答案解析:

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

适用于ASM 磁盘组的兼容性有三种:涉及描述磁盘组的持久性数据结构,客户机(磁盘组的使用者)的功能,以及能否在磁盘组中包含卷。这些属性分别称为“ASM 兼容性”、“RDBMS 兼容性”和“ADVM 兼容性”。每个磁盘组的兼容性都可以独立控制。这是支持包含Oracle Database 10g和Oracle Database 11g磁盘组的异构环境所必需的。

这三种兼容性设置是每个ASM 磁盘组的属性:

•RDBMS 兼容性是指RDBMS 实例的最低兼容版本,此设置将允许该实例装载磁盘组。

该兼容性确定了ASM 实例与数据库(RDBMS) 实例间交换消息的格式。ASM 实例可以支持以不同兼容性设置运行的不同RDBMS 客户机。每个实例的数据库兼容版本设置必须高于或等于该数据库使用的所有磁盘组的RDBMS 兼容性。数据库实例与ASM 实例通常在不同的Oracle 主目录中运行。这意味着数据库实例可以运行与ASM 实例不同的软件版本。数据库实例第一次连接到ASM 实例时,系统会协定这两个实例都支持的最高版本。

数据库的兼容性参数设置、数据库的软件版本以及磁盘组的RDBMS 兼容性设置确定了数据库实例能否装载给定的磁盘组。

 

•ASM 兼容性是指控制磁盘上ASM 元数据的数据结构格式的持久性兼容性设置。

磁盘组的ASM 兼容性级别必须始终高于或等于同一磁盘组的RDBMS 兼容性级别。

ASM 兼容性只与ASM 元数据的格式相关。文件内容的格式取决于数据库实例。例如,可以将某个磁盘组的ASM 兼容性设置为11.0,而将该磁盘组的RDBMS 兼容性设置为10.1。这意味着该磁盘组只能由软件版本为11.0 或更高的ASM 软件管理,而软件版本高于或等于10.1 的任何数据库客户机都可以使用该磁盘组。

 

• ADVM 兼容性属性确定磁盘组能否包含Oracle ASM 卷。该值必须设置为11.2 或更高。设置该属性前,必须确保COMPATIBLE.ASM的值为11.2 或更高。此外,还必须加载ADVM 卷驱动程序。仅当持久性磁盘结构或消息传送协议发生更改时,才需要提高磁盘组的兼容性。但是,提高磁盘组兼容性是一个不可逆的操作。可以使用CREATE DISKGROUP命令或ALTER DISKGROUP命令来设置磁盘组兼容性。

注:除了磁盘组兼容性,兼容参数(数据库兼容版本)确定了启用的功能;该参数适用于数据库或ASM 实例,具体取决于instance_type参数。例如,将该参数设置为10.1 将禁止使用Oracle Database 11g中引入的任何新功能(磁盘联机/脱机、可变区等)。

 

 

121.Which three statements are true regarding the functioning of the Autotask Background Process (ABP)? (Choose three.)
A. It creates jobs without considering the priorities associated with them.
B. It translates tasks into jobs for execution by the scheduler.
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: BCD
题目解答:与 AE 无关


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

 

Answer: CDE


123.What two statements are true regarding the recommendations received from the SQL Access Advisor? (Choose two.)
A. It cannot generate recommendations that support multiple workload queries.
B. It can recommend partitioning on tables provided that the workloads have some predicates and joins on the columns of the NUMBER or DATE type.
C. It can recommend partitioning only on tables that have at least 10,000 rows.
D. It can recommend only B-tree indexes and not bitmap or function-based indexes.

 

Answer: BC
题目解答: A 能,D 中索引都可以 BC 正确

 

124.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. All the disks in the dga disk group would be OFFLINE and the DISK_REPAIR_TIME disk attribute would be set to 5 hours.

C. It drops all disk paths from the dga disk group.

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://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#BABEJJID

 

 

 

disk_offline_clause

Use the disk_offline_clause to take one or more disks offline. This clause fails if the redundancy level of the disk group would be violated by taking the specified disks offline.

Specify disk_name as shown in the NAME column of the V$ASM_DISK dynamic performance view.

The QUORUM and REGULAR keywords have the same semantics here as they have when adding a disk to a disk group. 

By default, Oracle ASM drops a disk shortly after it is taken offline. You can delay this operation by specifying the timeout_clause, which gives you the opportunity to repair the disk and bring it back online. You can specify the timeout value in units of minute or hour. If you omit the unit, then the default is hour.

You can change the timeout period by specifying this clause multiple times. Each time you specify it, Oracle ASM measures the time from the most recent previous disk_offline_clause while the disk group is mounted. To learn how much time remains before Oracle ASM will drop an offline disk, query therepair_timer column of V$ASM_DISK.

This clause overrides any previous setting of the disk_repair_time attribute.

 

125.Which statement describes the significance of the CHANGE FAILURE command in RMAN? (Choose all that apply.)

A. It is used to change failure priority only for HIGH or LOW priorities.

B. It is used to execute the advised repair script.

C. It is used to change failure priority only for the CRITICAL priority.

D. It is used to explicitly close the open failures.

E. It is used to inform the database about the repair after the repair script executes.

 

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmrepai.htm#BRADV89736

 

 

If appropriate, you can use CHANGE FAILURE command at any time in the Data Recovery Advisor workflow to change the priority of a failure from LOW to HIGH orHIGH to LOW, or close a failure that has been fixed manually. 

 

Changing Failure Status and Priority

In some situations, you may want to use the CHANGE FAILURE command to alter the status or priority of a failure. For example, if a block corruption has HIGH priority, you may want to change it to LOW temporarily if the block is in a little-used tablespace.

If you repair a failure by a means other than the REPAIR FAILURE command, then Data Recovery Advisor closes it implicitly the next time you execute LIST FAILURE. For this reason, you do not normally need to execute the CHANGE FAILURE ... CLOSED command. You should need to use this command only if the automatic failure revalidation fails, but you believe the failure no longer exists. If you use CHANGE FAILURE to close a failure that still exists, then Data Recovery Advisor re-creates it with a different failure ID when the appropriate data integrity check is executed.

Typically, you specify the failures by failure number. You can also change failures in bulk by specifying ALLCRITICALHIGH, or LOWYou can change a failure toCLOSED or to PRIORITY HIGH or PRIORITY LOW.

To change the status or priority of a failure:

List failures as described in "Listing All Failures".

The following example lists one failure involving corrupt data blocks.

RMAN> LIST FAILURE;

 

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

142        HIGH     OPEN      23-APR-07     One or more non-system datafiles

                                            are missing

101        HIGH     OPEN      23-APR-07     Datafile 25: '/disk1/oradata/prod/example01.dbf' contains one or more corrupt blocks

 

Execute CHANGE FAILURE with the desired options.

The following example changes the priority of a block corruption failure from HIGH to LOW.

RMAN> CHANGE FAILURE 101 PRIORITY LOW;

 

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

101        HIGH     OPEN      23-APR-07     Datafile 25: '/disk1/oradata/prod/example01.dbf' contains one or more corrupt blocks

 

Do you really want to change the above failures (enter YES or NO)?

YESchanged 1 failures to LOW priority

Optionally, execute LIST FAILURE ALL to view the change.

If you execute LIST FAILURE without ALL, then the command lists failures with LOW priority only if no CRITICAL or HIGH priority failures exist.

RMAN> LIST FAILURE ALL;

 

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

142        HIGH     OPEN      23-APR-07     One or more non-system datafiles

                                            are missing

101        LOW      OPEN      23-APR-07     Datafile 25: '/disk1/oradata/prod/example01.dbf' contains one or more corrupt blocks

 

126.Which statements are true regarding the creation of an incident package file by using the EM Workbench Support? (Choose all that apply.)

A. You can add or remove the trace files to the package.

B. You can create the incremental incident package ZIP file for new or modified diagnostic information for the incident package already created.

C. You can add SQL test cases to the incident package.

D. You cannot create an incremental incident package when the physical files are purged rom the ADR.

 

 

Answer: ABC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN13036

 

About Quick Packaging and Custom Packaging

The Enterprise Manager Support Workbench provides two methods for creating and uploading an incident package: the quick packaging method and the custom packaging method.

Quick Packaging—This is the more automated method with a minimum of steps, organized in a guided workflow (a wizard). You select a single problem, provide a package name and description, and then schedule upload of the package contents, either immediately or at a specified date and time. The Support Workbench automatically places diagnostic data related to the problem into the package, finalizes the package, creates the zip file, and then uploads the file. With this method, you do not have the opportunity to add, edit, or remove package files or add other diagnostic data such as SQL test cases. However, it is the simplest and quickest way to get first-failure diagnostic data to Oracle Support. Quick packaging is the method used in the workflow described in"Investigating, Reporting, and Resolving a Problem".

Note that when quick packaging is complete, the package that was created by the wizard remains. You can then modify the package with custom packaging operations at a later time and manually reupload.

Custom Packaging—This is the more manual method, with more steps. It is intended for expert Support Workbench users who want more control over the packaging process. With custom packaging, you can create a new package with one or more problems, or you can add one or more problems to an existing package. You can then perform a variety of operations on the new or updated package, including:

Adding or removing problems or incidents

Adding, editing, or removing trace files in the package

Adding or removing external files of any type

Adding other diagnostic data such as SQL test cases

Manually finalizing the package and then viewing package contents to determine if you must edit or remove sensitive data or remove files to reduce package size.

You might conduct these operations over several days, before deciding that you have enough diagnostic information to send to Oracle Support.

With custom packaging, you create the zip file and request upload to Oracle Support as two separate steps. Each of these steps can be performed immediately or scheduled for a future date and time.

 

 

10.Select the Full or Incremental option to generate a full package zip file or an incremental package zip file. For a full package zip file, all the contents of the package (original contents and all correlated data) are always added to the zip file.

For an incremental package zip file, only the diagnostic information that is new or modified since the last time that you created a zip file for the same package is added to the zip file. For example, if trace information was appended to a trace file since that file was last included in the generated physical file for a package, the trace file is added to the incremental package zip file. Conversely, if no changes were made to a trace file since it was last uploaded for a package, that trace file is not included in the incremental package zip file. Note:

The Incremental option is dimmed (unavailable) if an upload file was never created for the package.

 

127.The application tables owned by the user TEST in a test database need to be exported to the APPS schema in the production database by using Data Pump. Which option of Data Pump Import would you use to accomplish this?

A. owner

B. touser

C. attach

D. remap_schema

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#SUTIL3187

 

REMAP_SCHEMA

Default: There is no default

Purpose

Loads all objects from the source schema into a target schema.

Syntax and Description

REMAP_SCHEMA=source_schema:target_schema

Multiple REMAP_SCHEMA lines can be specified, but the source schema must be different for each one. However, different source schemas can map to the same target schema. The mapping may not be 100 percent complete, because there are certain schema references that Import is not capable of finding. For example, Import will not find schema references embedded within the body of definitions of types, views, procedures, and packages.

If the schema you are remapping to does not already exist, then the import operation creates it, provided that the dump file set contains the necessary CREATEUSER metadata for the source schema, and provided that you are importing with enough privileges. For example, the following Export commands create dump file sets with the necessary metadata to create a schema, because the user SYSTEM has the necessary privileges:

> expdp system SCHEMAS=hr

Password:

password

 

> expdp system FULL=YES

Password:

password

If your dump file set does not contain the metadata necessary to create a schema, or if you do not have privileges, then the target schema must be created before the import operation is performed. This is because the unprivileged dump files do not contain the necessary information for the import to create the schema automatically.

If the import operation does create the schema, then after the import is complete, you must assign it a valid password to connect to it. The SQL statement to do this, which requires privileges, is:

SQL> ALTER USER schema_name IDENTIFIED BY new_password

Restrictions

Unprivileged users can perform schema remaps only if their schema is the target schema of the remap. (Privileged users can perform unrestricted schema remaps.)

For example, SCOTT can remap his BLAKE's objects to SCOTT, but SCOTT cannot remap SCOTT's objects to BLAKE.

Example

Suppose that, as user SYSTEM, you execute the following Export and Import commands to remap the hr schema into the scott schema:

> expdp system SCHEMAS=hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp

 

> impdp system DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp REMAP_SCHEMA=hr:scott

In this example, if user scott already exists before the import, then the Import REMAP_SCHEMA command will add objects from the hr schema into the existingscott schema. You can connect to the scott schema after the import by using the existing password (without resetting it).

If user scott does not exist before you execute the import operation, then Import automatically creates it with an unusable password. This is possible because the dump file, hr.dmp, was created by SYSTEM, which has the privileges necessary to create a dump file that contains the metadata needed to create a schema. However, you cannot connect to scott on completion of the import, unless you reset the password for scott on the target database after the import completes.

 

128.You want to track and store all transactional changes to a table over its lifetime. To accomplish this task, you enabled Flashback Data Archive with the retention of 5 years. After some time, the business requirement changed and you were asked to change the retention from 5 years to 3 years. To accomplish this, you issued the following command:

ALTER FLASHBACK ARCHIVE fla1 MODIFY RETENTION 3 YEAR;

What is the implication of this command?

A. The command produces an error because the retention time cannot be reduced.

B. All historical data is retained but the subsequent flashback data archives are maintained for only three years.

C. All historical data is purged and the new flashback data archives are maintained for three years.

D. All historical data older than three years is purged from the flashback archive FLA1.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_flashback.htm#ADFNS644

 

Scenario: Using Flashback Data Archive to Enforce Digital Shredding

Your company wants to "shred" (delete) historical data changes to the Taxes table after ten years. When you create the Flashback Data Archive for Taxes, you specify a retention time of ten years:

CREATE FLASHBACK ARCHIVE taxes_archive TABLESPACE tbs1 RETENTION 10 YEAR;

When history data from transactions on Taxes exceeds the age of ten years, it is purged. (The Taxes table itself, and history data from transactions less than ten years old, are not purged.)

 

129.You are managing an Oracle Database 11 g database with ASM storage. The ASM disk group has the COMPATIBLE.ASM attribute set to 11.1. Which statements are true regarding extent management and allocation units in the ASM disk group? (Choose all that apply.)
A. The au_size disk group attribute determines the size of allocation units in the disk group.
B. The allocation unit size may vary but the extent size is fixed.
C. The allocation unit size and extent size are fixed for all the disks in a disk group and cannot be changed.
D. Extent management is completely automated.

 

Answer: AD
题目解答: B 区不固定的, C 能改变的 只能 AD

 

130.Which are the prerequisites for performing flashback transactions on your database? (Choose all that apply.)

A. Undo retention guarantee for the database must be configured.

B. Supplemental log must be enabled for the primary key.

C. Supplemental log must be enabled.

D. Execute permission on the DBMS_FLASHBACK package must be granted to the user.

 

 

Answer: BCD

答案解析:

参考: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:

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.

131.Exhibit:

 

View the Exhibit to examine the parameter values. You are planning to set the value for the

MEMORY_TARGET parameter of your database instance.

What value would you assign?

A. 1440 MB

B. 90 MB

C. 362 MB

D. 272 MB

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#ADMIN11201

 

memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)

 

if SGA_TARGET is 272M and PGA_AGGREGATE_TARGET is 90M as shown above, and if the maximum PGA allocated is determined to be 80M, then MEMORY_TARGET should be at least 362M (272M + 90M).

 

Enabling Automatic Memory Management

If you did not enable automatic memory management upon database creation (either by selecting the proper options in DBCA or by setting the appropriate initialization parameters for the CREATE DATABASE SQL statement), you can enable it at a later time. Enabling automatic memory management involves a shutdown and restart of the database.

To enable automatic memory management

Start SQL*Plus and connect to the database as SYSDBA.

See "Connecting to the Database with SQL*Plus" and "Database Administrator Authentication" for instructions.

Calculate the minimum value for MEMORY_TARGET as follows:

Determine the current sizes of SGA_TARGET and PGA_AGGREGATE_TARGET by entering the following SQL*Plus command:

SHOW PARAMETER TARGET

SQL*Plus displays the values of all initialization parameters with the string TARGET in the parameter name.

NAME                                 TYPE        VALUE

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

archive_lag_target                   integer     0

db_flashback_retention_target        integer     1440

fast_start_io_target                 integer     0

fast_start_mttr_target               integer     0

memory_max_target                    big integer 0

memory_target                        big integer 0

parallel_servers_target              integer     16

pga_aggregate_target                 big integer 90M

sga_target                           big integer 272M

Run the following query to determine the maximum instance PGA allocated since the database was started:

select value from v$pgastat where name='maximum PGA allocated';

Compute the maximum value between the query result from step 2b and PGA_AGGREGATE_TARGET. Add SGA_TARGET to this value.

memory_target = sga_target + max(pga_aggregate_target, maximum PGA allocated)

For example, if SGA_TARGET is 272M and PGA_AGGREGATE_TARGET is 90M as shown above, and if the maximum PGA allocated is determined to be 120M, then MEMORY_TARGET should be at least 392M (272M + 120M).

Choose the value for MEMORY_TARGET that you want to use.

This can be the minimum value that you computed in step 2, or you can choose to use a larger value if you have enough physical memory available.

For the MEMORY_MAX_TARGET initialization parameter, decide on a maximum amount of memory that you would want to allocate to the database for the foreseeable future. That is, determine the maximum value for the sum of the SGA and instance PGA sizes. This number can be larger than or the same as the MEMORY_TARGET value that you chose in the previous step.

Do one of the following:

If you started your Oracle Database instance with a server parameter file, which is the default if you created the database with the Database Configuration Assistant (DBCA), enter the following command:

ALTER SYSTEM SET MEMORY_MAX_TARGET = nM SCOPE = SPFILE;

where n is the value that you computed in Step 4.

The SCOPE = SPFILE clause sets the value only in the server parameter file, and not for the running instance. You must include this SCOPE clause because MEMORY_MAX_TARGET is not a dynamic initialization parameter.

If you started your instance with a text initialization parameter file, manually edit the file so that it contains the following statements:

memory_max_target = n M

memory_target =mM

where n is the value that you determined in Step 4, and m is the value that you determined in step 3.

Note:

In a text initialization parameter file, if you omit the line for MEMORY_MAX_TARGET and include a value for MEMORY_TARGET, the database automatically sets MEMORY_MAX_TARGET to the value of MEMORY_TARGET. If you omit the line for MEMORY_TARGET and include a value for MEMORY_MAX_TARGET, the MEMORY_TARGET parameter defaults to zero. After startup, you can then dynamically change MEMORY_TARGET to a nonzero value, provided that it does not exceed the value of MEMORY_MAX_TARGET.

Shut down and restart the database.

See Chapter 3, "Starting Up and Shutting Down" for instructions.

If you started your Oracle Database instance with a server parameter file, enter the following commands:

ALTER SYSTEM SET MEMORY_TARGET = n M;

ALTER SYSTEM SET SGA_TARGET = 0;

ALTER SYSTEM SET PGA_AGGREGATE_TARGET = 0;

where n is the value that you determined in step 3.

Note:

The preceding steps instruct you to set SGA_TARGET and PGA_AGGREGATE_TARGET to zero so that the sizes of the SGA and instance PGA are tuned up and down as required, without restrictions. You can omit the statements that set these parameter values to zero and leave either or both of the values as positive numbers. In this case, the values act as minimum values for the sizes of the SGA or instance PGA.

 

132.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. parallel image copy backup

B. backup with MAXPIECESIZE configured for the channel

C. parallel backup with MAXPIECESIZE configured for the channe

D. intra file parallel backup

 

 

Answer: D

答案解析:

答案解析:

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

 

RMAN 的新增功能

对超大型文件应用Intra file  并行备份和还原

在备份单一大型数据文件时,现在可以使用多个并行服务器进程和“通道”来有效地分配工作量。这种使用多个部分的方法改善了备份的性能。

 

133.You performed the RMAN database backup with the KEEP option. Which two statements are true regarding this backup? (Choose two.)

A. The backup contains data files, the server parameter file, and the control file even if the control file autobackup is disabled.

B. The KEEP option overrides the configured retention policy.

C. The backup contains only data files and archived redo log files.

D. The KEEP option is an attribute of an individual backup piece.

 

 

Answer: AB

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10803/config_backuprec.htm#HABPT5159

 

Usage Notes

RMAN does not consider backup pieces with the KEEP option when computing the backup retention policy. If available, RMAN uses these backups for disaster recovery restore operations, but their purpose is to produce a snapshot of the database that can be restored on another system for testing or historical usage.

When creating archival backups with KEEP, RMAN only considers KEEP backups with the same tag. Thus, when using keepOption with notBackedUpSpec, RMAN only skips a backup if it finds the specified maximum number of KEEP backups with the same tag. Other backups are not counted.

Semantics

Syntax Element

Description

KEEP

Specifies the backup as an archival backup, which is a self-contained backup that is exempt from the configured retention policy.

An archival backup is self-contained because is contains all files necessary to restore the backup and recover it to a consistent state. If the database is open during the backup, then RMAN automatically generates and backs up the archived redo log files needed to make the database backup consistent (see Example 2-26).

RMAN does not consider backup pieces with the KEEP option when computing the retention policy. If available, RMAN uses these backups for disaster recovery restore operations, but their purpose is to produce a snapshot of the database that can be restored on another system for testing or historical usage.

Note: You cannot use KEEP to override the retention policy for files stored in the fast recovery area. If you specify KEEP when backing up to the recovery area, then RMAN issues an error.

When KEEP is specified, RMAN creates multiple backup sets. RMAN backs up data files, archived redo log files, the control file, and the server parameter file with the options specified in the first backupOperand. Since a backup of the control file is already created, an autobackup of the control file is not created. RMAN uses theFORMATPOOL, and TAG parameters for all the backups. For this reason, the FORMAT string must allow for the creation of multiple backup pieces. Specifying %U is the easiest way to meet this requirement.

See Also: CONFIGURE and Oracle Database Backup and Recovery User's Guide to learn more about autobackup of the control file.

When KEEP is specified with INCREMENTAL LEVEL, the parent backup must be a KEEP backup and have the sameTAG string. Unless both these criteria are met, the backup cannot be created. Backups that meet these criteria do not interfere with other nightly or archival backup tasks.

Note: A recovery catalog is only required for KEEP FOREVER. No other KEEP options require a catalog.

   FOREVER

Specifies that the backup or copy never becomes obsolete (see Example 2-27). A recovery catalog is required when FOREVER is specified because the backup records eventually age out of the control file.


   UNTIL TIME
   'date_string'

Specifies the time until which the backup or copy must be kept. After this time the backup is obsolete, regardless of the backup retention policy settings.

You can either specify a specific time by using the current NLS_DATE_FORMAT, or a SQL date expression such as'SYSDATE+365'. If you specify a KEEP TIME such as 01-JAN-07, then the backup becomes obsolete one second after midnight on this date. If you specify a KEEP time such as 9:00 p.m, then the backup becomes obsolete at 9:01 p.m.


   RESTORE POINT
   restore_point_name

Creates a normal restore point matching the SCN to which RMAN must recover the backup to a consistent state (see Example 2-26). The restore point name must not exist.

The SCN is captured just after the data file backups complete. The restore point is a label for the SCN to which this archival backup can be restored and recovered, enabling the database to be opened. In contrast, the UNTIL TIME clause specifies the date until which the backup must be kept.

Note: The RESTORE POINT parameter is not valid with the CHANGE command.

NOKEEP

Specifies that any KEEP attributes no longer apply to the backup. Thus, the backup is a normal backup that is subject to the configured backup retention policy. This is the default behavior if no KEEP option is specified.

 

Examples

Example 4-23 Creating a Consistent Database Backup for Archival

This example makes a database backup with tag Q107 and specifies that it should never be considered obsolete (partial sample output included). The archived redo log files necessary to make the data files consistent are included in the backup set.

RMAN> BACKUP TAG Q107 DATABASE KEEP FOREVER;

 

Starting backup at 24-JAN-07

 

current log archived

allocated channel: ORA_SBT_TAPE_1

channel ORA_SBT_TAPE_1: SID=105 device type=SBT_TAPE

channel ORA_SBT_TAPE_1: Oracle Secure Backup

backup will never be obsolete

archived logs required to recover from this backup will be backed up

channel ORA_SBT_TAPE_1: starting full datafile backup set

channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set

.

.

.

Example 4-24 Removing the KEEP Attributes for a Backup

This example backs up all archived redo log files. The KEEP clause specifies that one second after midnight on January 1, 2008 the backup is considered obsolete.

RMAN> BACKUP KEEP UNTIL TIME '01-JAN-08' ARCHIVELOG ALL;

The following command removes the KEEP attributes of all archived redo log backups (sample output included):

RMAN> CHANGE BACKUP OF ARCHIVELOG ALL NOKEEP;

 

using channel ORA_SBT_TAPE_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=77 device type=DISK

keep attributes for the backup are deleted

backup set key=330 RECID=19 STAMP=612722760

keep attributes for the backup are deleted

backup set key=397 RECID=22 STAMP=612722884

 

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

RMAN>BACKUP

SECTION SIZE 300M

TABLESPACE users;

What configuration should be effected to accomplish faster and optimized backups by using the above command?

A. The SBT channel must be configured, with the default parallelism setting for the SBT device set to 1.

B. The COMPATIBLE initialization parameter for the database instance must be set to at least 10.0.

C. The SBT channel must be configured, with the parallelism setting for the SBT device set to 3.

D. The SBT channel must be configured, with the MAXPIECESIZE set to 300 MB.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90025

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

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

 

SECTION SIZE sizeSpec

Specifies the size of each backup section produced during a data file backup.

By setting this parameter, RMAN can create a multisection backup. In a multisection backup, RMAN creates a backup piece that contains one file section, which is a contiguous range of blocks in a file. All sections of a multisection backup are the same size. You can create a multisection backup for a data file, but not a data file copy.

File sections enable RMAN to create multiple steps for the backup of a single large data file. RMAN channels can process each step independently and in parallel, with each channel producing one section of a multisection backup set.

If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backup for the file. If you specify a small section size that would produce more than 256 sections, then RMAN increases the section size to a value that results in exactly 256 sections.

Depending on where you specify this parameter in the RMAN syntax, you can specify different section sizes for different files in the same backup job.

Note: You cannot use SECTION SIZE with MAXPIECESIZE or with INCREMENTAL LEVEL 1.

 

135.The ADMIN_EMP table has columns EMPNO, ENAME, DEPTNO, and SAL. It has a materialized view EMP_MV with a materialized log and an ENAME_IDX index on the ENAME column. You need to perform an online table redefinition on the ADMIN_EMP table to move it from the TBS1 tablespace to the TBS2 tablespace in the same schema. What action is required for the dependent objects when you perform online redefinition on the table?
A. The materialized view should have a complete refresh performed after the online table redefinition is completed.
B. The materialized view should have a fast refresh performed after the online table redefinition is completed.
C. The materialized view, materialized log, and the index should be dropped and re-created after the online table redefinition is complete.
D. The materialized view and materialized log should be dropped and all constraints disabled and re-created after the online table redefinition is complete.

 


Answer: A
题目解答:表重定义后只能完整刷新

 

136.You issued the following command to mount the DATA disk group in restricted mode:

ALTER DISKGROUP data MOUNT RESTRICT; What is the implication of this command?

A. The client RDBMS instance can access the file as a read-only file.

B. A new disk cannot be added to a disk group.

C. A disk in a disk group can be taken offline.

D. The client RDBMS instance cannot access the files in the disk group.

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#SQLRF52682

 

MOUNT Specify MOUNT to mount the disk groups in the local Automatic Storage Management instance. Specify ALL MOUNT to mount all disk groups specified in the ASM_DISKGROUPS initialization parameter. File operations can only be performed when a disk group is mounted.

RESTRICTED | NORMAL Use these clauses to determine the manner in which the disk groups are mounted.

In the RESTRICTED mode, the disk group is mounted in single-instance exclusive mode. No other ASM instance in the same cluster can mount that disk group. In this mode the disk group is not usable by any ASM client.

In the NORMAL mode, the disk group is mounted in shared mode, so that other ASM instances and clients can access the disk group. This is the default.

 

 

137.Your company wants to upgrade the current production database to the RAC environment. To perform testing before migrating to the RAC environment, you performed the workload capture on the production database to record the peak workload. You set up the test RAC database and want to replay the recorded workload on the test machine. Note the following steps that you may require to replay the database workload:

1) Preprocess the captured workload.

2) Restart the database in RESTRICTED mode.

3) Set up the Replay Clients.

4) Restore the test database to the point when the capture started.

5) Remap connections.

Arrange the steps required in the correct sequence to accomplish this task on the test machine.

A. 1, 4, 5, 3 (2 is not required.)

B. 1, 4, 3, 5 (2 is not required.)

C. 1, 2, 4, 5 (3 is not required.)

D. 2, 1, 5, 3, 4

E. 1, 2, 4, 5, 3

 

Answer: A

答案解析:

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

步骤为:预处理工作量--然后重放工作量,重放工作量先决条件之一为还原数据库--定制选项中的连接映射--设置重放客户机,开始重放工作量。

 

138.You are working on the APPDB database as a DB A. The database has a default Flashback Data Archive DFLA1 created on it. You issued the following command to drop the Flashback Archive FLA1:

DROP FLASHBACK ARCHIVE fla1;

What is the effect of this command?

A. The Flashback Archive FLA1 is dropped only if it is empty.

B. The tablespace having Flashback Archive is dropped.

C. The Flashback Archive FLA1 is dropped after moving the existing data in it to the default Flashback Archive.

D. The Flashback Data Archive and historical data are dropped.

 

Answer: D

答案解析:

以 管理员用户身份,删除 FLA1 闪回数据归档。

注:删除闪回数据归档也会删除内部防篡改历史记录表。由于审计和安全的要求,无法直接删除此表。由于表空间可能包含其它数据,因此删除闪回数据归档不会删除它所在的表空间。

 

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

 

DROP FLASHBACK ARCHIVE

Purpose

Use the DROP FLASHBACK ARCHIVE clause to remove a flashback data archive from the system.This statement removes the flashback data archive and all the historical data in it, but does not drop the tablespaces that were used by the flashback data archive.

Prerequisites

You must have the FLASHBACK ARCHIVE ADMINISTER system privilege to drop a flashback data archive.

 

flashback_archive

Specify the name of the flashback data archive you want to drop.

官方参考:http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_8016.htm#SQLRF20010

 

139.Which two prerequisites are needed for performing workload capture and replay? (Choose two.)

A. Close all sessions performing queries using database links.

B. running the database in shared server mode

C. The database on which the workload is replayed has to be a restore of the original database to a specific SCN.

D. setting up the directory to capture the workload

 

 

Answer: CD

答案解析:

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

捕获注意事项

在工作量记录的计划阶段要执行以下任务:

• 检查数据库备份策略,确保在记录开始时数据库可被还原为Start SCN 。

• 计划捕获期间:根据应用情况和峰值期间选择捕获期间。可以使用现有的可管理性功能,如自动工作量资料档案库(AWR) 和活动会话历史记录(ASH) ,根据工作量历史记录选择一个恰当的期间。应谨慎计划捕获的开始时间,因为建议的操作是在捕获开始前关闭并重新启动数据库。

• 指定工作量捕获数据的位置。必须设置用于存储工作量捕获数据的目录。应提供充足的磁盘空间,因为磁盘空间不足时记录会停止。但是,在停止之前捕获的所有内容仍可用于重放。

• 定义捕获过滤器,过滤掉不捕获的用户会话。可以指定记录过滤器以跳过不应捕获的会话。

• 数据库重放功能没有引入任何新的权限或用户角色。记录用户和重放用户必须具有SYSDBA 权限或SYSOPER权限。这是因为仅具备SYSOPER权限或SYSDBA 权限的用户才可以启动或关闭开始记录的数据库。还应分配正确的操作系统(OS) 权限,以便用户能够访问记录、重放目录以及操作这些目录下的文件。

 

重放注意事项

预处理阶段是必需的针对指定数据库版本的一次性操作。创建了必需的元数据以后,可以按需要多次重放工作量。

必须还原重放数据库,以便与工作量捕获开始时的捕获数据库匹配。成功的重放取决于应用程序事务处理,该事务处理要访问与捕获系统上的数据相同的应用程序数据。可以选择使用时间点恢复、闪回和导入/ 导出来还原应用程序数据。

 

140.Which two statements are true regarding Health Monitor checks in Oracle Database 11g? (Choose two.)

A. Health Monitor checks can be used to scan the contents of the redo log and archive logs for accessibility and corruption.

B. Health Monitor checks can be used to verify the integrity of database files and report failures if these files are in accessible, corrupt or inconsistent.

C. Health Monitor checks can be used to verify the contents of dictionary entries for each dictionary object and fix it automatically.

D. Health Monitor checks are always initiated manually when there is some critical error.

 

 

Answer: AB

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN11273

 

Types of Health Checks

Health monitor runs the following checks:

DB Structure Integrity Check—This check verifies the integrity of database files and reports failures if these files are inaccessible, corrupt or inconsistent. If the database is in mount or open mode, this check examines the log files and data files listed in the control file. If the database is in NOMOUNT mode, only the control file is checked.

Data Block Integrity Check—This check detects disk image block corruptions such as checksum failures, head/tail mismatch, and logical inconsistencies within the block. Most corruptions can be repaired using Block Media Recovery. Corrupted block information is also captured in the V$DATABASE_BLOCK_CORRUPTION view. This check does not detect inter-block or inter-segment corruption.

Redo Integrity Check—This check scans the contents of the redo log for accessibility and corruption, as well as the archive logs, if available. The Redo Integrity Check reports failures such as archive log or redo corruption.

Undo Segment Integrity Check—This check finds logical undo corruptions. After locating an undo corruption, this check uses PMON and SMON to try to recover the corrupted transaction. If this recovery fails, then Health Monitor stores information about the corruption in V$CORRUPT_XID_LIST. Most undo corruptions can be resolved by forcing a commit.

Transaction Integrity Check—This check is identical to the Undo Segment Integrity Check except that it checks only one specific transaction.

Dictionary Integrity Check—This check examines the integrity of core dictionary objects, such as tab$ and col$. It performs the following operations:

Verifies the contents of dictionary entries for each dictionary object.

Performs a cross-row level check, which verifies that logical constraints on rows in the dictionary are enforced.

Performs an object relationship check, which verifies that parent-child relationships between dictionary objects are enforced.

The Dictionary Integrity Check operates on the following dictionary objects:

tab$clu$fet$uet$seg$undo$ts$file$obj$ind$icol$col$user$con$cdef$ccol$bootstrap$objauth$ugroup$tsq$syn$view$,typed_view$superobj$seq$lob$coltype$subcoltype$ntab$refcon$opqtype$dependency$access$viewcon$icoldep$dual$sysauth$objpriv$,defrole$, and ecol$.

 

141.Exhibit:

 

View the Exhibit for some of the current parameter settings. A user logs in to the HR schema and issues the following commands:

SQL> CREATE TABLE emp (empno NUMBER(3), ename VARCHAR2(20), sal NUMBER(8,2)); 

SQL>INSERT INTO emp(empno,ename) VALUES(1,'JAMES');

At this moment, a second user also logs in to the HR schema and issues the following command:

SQL> ALTER TABLE emp MODIFY sal NUMBER(10,2);

What happens in the above scenario?

A. The second user's session immediately produces the resource busy error.

B. The second user's command executes successfully.

C. The second user's session waits for a time period before producing the resource busy error.

D. A deadlock is created.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams074.htm#REFRN10267

 

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.

 

142.In which situations will the ASM metadata backup help you recover the ASM disk in a disk group?(Choose all that apply.)
A. when one or more file directory paths are accidentally deleted from an ASM disk group
B. when one of the disks in a disk group is accidentaly unplugged

C. when the data file on an ASM disk group gets corrupted
D. when one or more disks in an ASM disk group are lost

 

Answer: AD
题目解答:元数据恢复是在磁盘组与磁盘文件物理故障时有用,不是磁盘里面的数据。只能 AD

 

143.Which two are the prerequisites to enable Flashback Data Archive? (Choose two.)

A. Database must be running in archivelog mode.

B. Automatic undo management must be enabled.

C. Undo retention guarantee must be enabled.

D. The tablespace on which the Flashback Data Archive is created must be managed with Automatic Segment Space Management (ASSM).

 

 

Answer: BD

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01001

 

Oracle Flashback features use the Automatic Undo Management (AUM) system to obtain metadata and historical data for transactions. They rely on undo data, which are records of the effects of individual transactions. For example, if a user runs an UPDATE statement to change a salary from 1000 to 1100, then Oracle Database stores the value 1000 in the undo data. Undo data is persistent and survives a database shutdown. By using flashback features, you can use undo data to query past data or recover from logical damage.

 

144.In your database, the RESULT_CACHE_MODE parameter has been set to MANUAL in the initialization parameter file. You issued the following command:

SQL>SELECT /*+ RESULT_CACHE */ sale_category, sum(sale_amt)

FROM sales

GROUP BY sale_category;

Where would the result of this query be stored?

A. database buffer cache

B. shared pool

C. PGA

D. large pool

 

Answer: B

答案解析:

RESULT_CACHE_MODE specifies when a ResultCache operator is spliced into a query's execution plan.

Values:

MANUAL

The Result Cache operator is added only when the query is annotated (that is, hints).

FORCE

The Result Cache operator is added to the root of all SELECT statements (provided that it is valid to do so).

 

 

Shared Pool Concepts

The main components of the shared pool are the library cache, the dictionary cache, and, depending on your configuration, the server result cache. The library cache stores the executable (parsed or compiled) form of recently referenced SQL and PL/SQL code. The dictionary cache stores data referenced from the data dictionary. The server result cache stores the results of queries and PL/SQL function results.

Many of the caches in the shared pool automatically increase or decrease in size, as needed, including the library cache and the dictionary cache. Old entries are aged out to accommodate new entries when the shared pool does not have free space.

A cache miss on the data dictionary cache or library cache is more expensive than a miss on the buffer cache. For this reason, the shared pool should be sized to ensure that frequently used data is cached.

Several features make large memory allocations in the shared pool: for example, the shared server, parallel query, or Recovery Manager. Oracle recommends segregating the SGA memory used by these features by configuring a distinct memory area, called the large pool.

Allocation of memory from the shared pool is performed in chunks. This chunking enables large objects (over 5 KB) to be loaded into the cache without requiring a single contiguous area. In this way, the database reduces the possibility of running out of enough contiguous memory due to fragmentation.

Infrequently, Java, PL/SQL, or SQL cursors may make allocations out of the shared pool that are larger than 5 KB. To allow these allocations to occur most efficiently, Oracle Database segregates a small amount of the shared pool. This memory is used if the shared pool does not have enough space. The segregated area of the shared pool is called the reserved pool.

 

145.You need to perform an online table redefinition of an existing SALES table to partition it into two tablespaces TBS1 and TBS2. The SALES table has a materialized view, materialized log, indexes, referential integrity constraint, and triggers with the PRECEDES clause existing on it. What action is required for dependent objects when you perform online table redefinition?
A. The dependent materialized view should have a complete refresh performed after the online table redefinition process.
B. Triggers with the PRECEDES clause should be disabled before the online table redefinition process.
C. Referential integrity constraints must be manually enabled after the online table redefinition process.
D. The materialized log should be dropped before the online table redefinition process.

 

Answer: A
题目解答: 表重定义后物化视图必须完整刷新

 

146.You want to take the backup of the USERS tablespace. It has a single data file of 900 MB. You have tape drives of 300 MB each. The SBT channel is configured for the RMAN. To accomplish the backup, you issued the following RMAN command:

RMAN> BACKUP SECTION SIZE 300M TABLESPACE users;

Which two statements are true regarding the execution of the above command? (Choose two.)

A. The RMAN parallelizes the backup although the parallelism is not set for a channel.

B. The backup piece size will be limited to 300 MB.

C. The operation is accomplished using the default channel available.

D. Three channels for the tape drive must be configured by setting the parallelism to three.

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90025

A,错误,如果没有设置并行度,那么备份时只能只用默认的configure里面配置的并行度执行,但是默认并行度为1,即只能通过一个通道来备份,并不是并行备份的。

B,正确,指定每个备份的大小为300M,所以每个备份片被限制为300M

C,正确,使用默认的可用的通道来完成备份,正确的。

D,错误,不是一定,只是,多配置几个通道,速度会更快点,但不是一定要配置3个,使用默认的一个通道也可以备份的。

 

 

SECTION SIZE sizeSpec

Specifies the size of each backup section produced during a data file backup.

By setting this parameter, RMAN can create a multisection backup. In a multisection backup, RMAN creates a backup piece that contains one file section, which is a contiguous range of blocks in a file. All sections of a multisection backup are the same size. You can create a multisection backup for a data file, but not a data file copy.

File sections enable RMAN to create multiple steps for the backup of a single large data file. RMAN channels can process each step independently and in parallel, with each channel producing one section of a multisection backup set.

If you specify a section size that is larger than the size of the file, then RMAN does not use multisection backup for the file. If you specify a small section size that would produce more than 256 sections, then RMAN increases the section size to a value that results in exactly 256 sections.

Depending on where you specify this parameter in the RMAN syntax, you can specify different section sizes for different files in the same backup job.

Note: You cannot use SECTION SIZE with MAXPIECESIZE or with INCREMENTAL LEVEL 1

 

147.You installed Oracle Database 11g afresh. Which statements are true regarding the default audit settings in this database? (Choose all that apply.)

A. The audit trail is stored in an operating system file.

B. Auditing is disabled for all privileges.

C. The audit trail is stored in the database.

D. Auditing is enabled for all privileges.

E. Auditing is enabled for certain privileges related to database security.

 

 

Answer: CE

答案解析:

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

如果数据库是使用Database Configuration Assistant (DBCA) 创建的,默认情况下,audit_trail参数设置为DB。

当AUDIT_TRAIL设置为DB时,默认的行为是将审计线索记录到数据库的AUD$表中。(C正确)

默认审计

在Oracle Database 11g中启用审计时,将默认审计那些对安全性非常重要的特定权限和语句。(E正确)

系统将针对所有用户,按成功、失败以及访问来审计上面列出的这些权限和语句。

 

148.Which dependent object will get invalidated even if it is not affected by the table redefinition?
A. packages
B. triggers
C. synonyms
D. views

 

Answer: B
题目解答:表重定义依赖触发器无效,只要再次 dml 会变得有效的.

 

149.You perform a backup using the following BACKUP command:

RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;

Which statement is true of this command?

A. A different procedure is required to restore a database from compressed backups

B. The AS COMPRESSED clause of the BACKUP command provided by RMAN is used to create compressed backup sets and image copies.

C. Using this command to create backups minimizes the bandwidth consumed

D. Using this command to create backups improves the performance of the backup process

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV8138

 

Making Compressed Backups

For any use of the BACKUP command that creates backup sets, you can take advantage of RMAN support for binary compression of backup sets. Specify theAS COMPRESSED BACKUPSET option to the BACKUP command.

RMAN compresses the backup set contents before writing them to disk. The details of which binary compression level is used are automatically recorded in the backup set. There is no need to explicitly mention the type of compression used or how to decompress the backup set in the recovery operation.

Example 9-7 backs up the entire database and archived logs to the configured default backup destination (disk or tape), producing compressed backup sets.

Example 9-7 Making Compressed Backups

BACKUP

  AS COMPRESSED BACKUPSET

  DATABASE PLUS ARCHIVELOG;

Binary compression creates some performance overhead during backup and restore operations. Binary compression consumes CPU resources, so compressed backups should not be scheduled when CPU usage is high. However, the following circumstances may warrant paying the performance penalty:

You are using disk-based backups when disk space in your fast recovery area or other disk-based backup destination is limited.

You are performing your backups to some device over a network when reduced network bandwidth is more important than CPU usage.

You are using some archival backup media such as CD or DVD, where reducing backup sizes saves on media costs and archival storage.

 

150.You have enabled backup optimization in RMAN. You issue the following RMAN command to configure a redundancy-based retention policy:

CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

Which statement is true?

A. The command fails because you cannot configure a redundancy-based retention policy when backup optimization is enabled

B. Backup optimization is performed, but RMAN considers the redundancy-based retention policy when it determines which datafiles should be backed up

C. Backup optimization is permanently disabled

D. Backup optimization is temporarily disabled because a redundancy-based retention policy is specified

 

 

Answer: B

答案解析:

备份优化开启和基于冗余的保留策略并不矛盾,当决定数据文件什么时候应该备份时,是由基于冗余策略的配置决定的。

 

151. Which statements about the MEMORY_TARGET initialization parameter are true? (Choose all that apply.)

A. MEMORY_TARGET can be increased up to the value of MEMORY_MAX_TARGET, if MEMORY_MAX_TARGET is set to a value greater than zero

B. MEMORY_MAX_TARGET defaults to a value of zero if MEMORY_TARGET is not set

C. MEMORY_TARGET represents the total amount of memory that can be allocated to SGA and PGA memory structures.

D. MEMORY_TARGET is static and cannot be modified without shutting down the instance

 

 

Answer: ABC

答案解析:

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

A. MEMORY_TARGET 可以增加到 MEMORY_MAX_TARGET的值,但不能超过。

B.如果MEMORY_TARGET 没有设置,则MEMORY_MAX_TARGET 和MEMORY_TARGET 都为0.默认值都为0.

C。MEMORY_TARGET 是SGA and PGA 的和。

D.MEMORY_TARGET 不是静态的,他可以动态的改变,非零值时自动分配内存。

 

MEMORY_TARGET:动态控制SGA和PGA时,Oracle总共可以使用的共享内存大小,这个参数是动态的,因此提供给Oracle的内存总量是可以动态增大,也可以动态减小的。它不能超过MEMORY_MAX_TARGET参数设置的大小。默认值是0。

MEMORY_MAX_TARGET:这个参数定义了MEMORY_TARGET最大可以达到而不用重启实例的值,如果没有设置MEMORY_MAX_TARGET值,默认等于MEMORY_TARGET的值。

使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。

 

152.You are performing incomplete recovery using RMAN. You execute the following RUN block:

RUN

{

SET UNTIL SCN 1107600;

RESTORE DATABASE;

RECOVER DATABASE;

}

Which statement is true about the result?

A.RMAN restores all datafiles from the most recent backup available since the failure and applies the redo logs necessary to recover the database to SCN 1107600

B.RMAN restores all datafiles needed to restore the database through SCN 1107599 and applies the redo logs necessary to recover the database through SCN 1107599.

C.RMAN restores all datafiles and control files from the most recent backup

D.The RUN block fails because you did not specify an UNTIL clause in your RECOVER DATABASE command

 

 

Answer: B

答案解析:

参考:执行时间点恢复:http://blog.csdn.net/rlhua/article/details/12346829

通过以上,还原恢复到指定的SCN。执行时间点恢复

可以通过以下步骤执行服务器管理的时间点恢复。数据库必须处于ARCHIVELOG模式。

1.确定还原目标。这可以是日期和时间、SCN、还原点或日志序列号。例如,如果你知道某些错误事务处理是在昨天下午3:00 提交的,则可以选择昨天下午2:59 作为目标还原点时间。

2.设置国家语言支持(NLS) 操作系统环境变量,确保为RMAN 提供的时间常量的格式是正确的。以下是一些示例设置:

$ export NLS_LANG = american_america.us7ascii

$ export NLS_DATE_FORMAT = "yyyy-mm-dd:hh24:mi:ss"

3.装载数据库。如果数据库已打开,则必须先将其关闭,如本例所示:

RMAN> shutdown immediate

RMAN> startup mount

4.创建一个RUN块并运行该块。RECOVER和RESTORE命令应位于同一个RUN块中,这样UNTIL设置可以同时应用于两者。例如,如果选择恢复到特定SCN,则RESTORE命令需要知道该值,以便可以从足够早的备份(即该SCN 之前的备份)还原文件。

以下是RUN块的一个示例:

RUN

{

SET UNTIL TIME '2007-08-14:21:59:00';

RESTORE DATABASE;

RECOVER DATABASE;

}

5.打开数据库进行读/写操作时,会立即完成刚刚执行的还原。因此,先先在READ ONLY模式下打开数据库并查看某些数据,检查恢复操作是否符合预期结果。

RMAN> SQL 'ALTER DATABASE OPEN READ ONLY';

6.如果对恢复结果感到满意,则使用RESETLOGS选项打开数据库,如下所示:

RMAN> ALTER DATABASE OPEN RESETLOGS;

 

153.You are managing an ASM instance. You previously issued the following statements:

ALTER DISKGROUP dg1 DROP DISK disk2;

ALTER DISKGROUP dg1 DROP DISK disk3;

ALTER DISKGROUP dg1 DROP DISK disk5;

You want to cancel the disk drops that are pending for the DG1 disk group. Which statement should you issue?

A. ALTER DISKGROUP dg1 UNDROP disk2, disk3, disk5;

B. ALTER DISKGROUP dg1 UNDROP;

C. ALTER DISKGROUP dg1 UNDROP DISKS;

D. You cannot cancel the pending disk drops.

 

 

Answer: C

答案解析:

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

只能取消disk5的删除,因为disk2, disk3的删除操作已经完成,只要删除操作还没有真正完成,就可以使用undrop取消删除磁盘的操作,

UNDROP命令仅对磁盘的暂挂删除操作起作用;它对于已经完成的删除操作没有影响。

 

154.A database is running in ARCHIVELOG mode and regular backups are performed. A user receives the following error message:


Which is the recommended sequence of operations you need to perform for the query successfully?
A. Drop the affected tablespace, re-create the tablespace, restore the datafiles, and the tablespace

B. Take the affected datafile offline (if not already offline), restore the damaged image of the datafile, and then bring it online.
C. Restart the database in MOUNT mode, restore the damaged datafile, recover the datafile and then open the database with resetlogs.
D. Put the database in RESTRICTED mode, restore all the datafiles in the affected datafile and recover the tablespace, and then put the database in normal operational mode.

Answer: C
题目解答: A 步骤错, B 少 recover,D 状态错误

 

答案解析:

ORA-01116: error in opening database file 6
ORA-01110: data file 6: '/u01/app/oracle/oradata/test1107/test01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

[oracle@rtest ~]$ oerr ora 1116

01116, 00000, "error in opening database file %s"

// *Cause:  Usually the file is not accessible.

// *Action: Restore the database file.

 

A,错,缺少文件,不能打开数据库,在mount状态下不能drop表空间。

B,错,缺少recover

C ,错,可以直接open数据库,不能使用resetlogs,因为不是不完全恢复。

D,错,在RESTRICTED 模式下,rman能连接不能使用,报错:ORA-19573: cannot obtain exclusive enqueue for datafile 6

 

155. Observe the structure of the table employees: The table contains 8475 records. One of the employees wants to know the names of all employees of the company. For this, he fires the following query:

SELECT * FROM EMPLOYEES ORDER BY emp_fname;

Since the operation performed on executing the query cannot fit into memory, it requires disk space to complete the operation. Which of the following types of segments will Oracle allocate to complete the operation and to provide the required result?

A. Rollback segment

B. Temporary segment

C. Data segment

D. Index segment

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40540/logical.htm#CNCPT1072

 

Temporary Segments

When processing a query, Oracle Database often requires temporary workspace for intermediate stages of SQL statement execution. Typical operations that may require atemporary segment include sorting,hashing, and merging bitmaps. While creating an index, Oracle Database also places index segments into temporary segments and then converts them into permanent segments when the index is complete.

Oracle Database does not create a temporary segment if an operation can be performed in memory. However, if memory use is not possible, then the database automatically allocates a temporary segment on disk.

 

156.What is the effect of increasing the value of the ASM_POWER_LIMIT parameter?

A. The number of DBWR processes increases

B. The number of ASMB processes increases

C. The number of DBWR_TO_SLAVES increases

D. The rebalancing operation in an ASM instance completes more quickly, but can result in higher I/O overhead

 

 

Answer: D

答案解析:

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

 

• ASM_POWER_LIMIT控制重新平衡操作的速度。值的范围从1 到11,11 表示最快。如果省略,该值默认为1。

 

ASM_POWER_LIMIT

The ASM_POWER_LIMIT initialization parameter specifies the default power for disk rebalancing in a disk group. The range of values is 0 to 1024. The default value is 1. A value of 0 disables rebalancing. Higher numeric values enable the rebalancing operation to complete more quickly, but might result in higher I/O overhead and more rebalancing processes.

For disk groups that have the disk group ASM compatibility set to 11.2.0.2 or greater (for example, COMPATIBLE.ASM = 11.2.0.2), the operational range of values is 0 to 1024 for the rebalance power.

For disk groups that have the disk group ASM compatibility set to less than 11.2.0.2, the operational range of values is 0 to 11 inclusive. If the value forASM_POWER_LIMIT is larger than 11, a value of 11 is used for these disk groups.

You can also specify the power of the rebalancing operation in a disk group with the POWER clause of the SQL ALTER DISKGROUP ... REBALANCE statement. The range of allowable values for the POWER clause is the same for the ASM_POWER_LIMIT initialization parameter. If the value of the POWER clause is specified larger than 11 for a disk group with ASM compatibility set to less than 11.2.0.2, then a warning is displayed and a POWER value equal to 11 is used for rebalancing.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm#OSTMG10144

 

157. The DB_BLOCK_CHECKING initialization parameter is set to OFF. Which block checking would be performed?

A.  The Oracle database will perform block checking for the index blocks only

B.  The Oracle database will not perform block checking for any of the data blocks

C.  The Oracle database will perform block checking for the default permanent tablespace only

D.  The Oracle database will perform block checking for the data blocks in all user tablespaces

E.  The Oracle database will perform block checking for the data blocks in the SYSTEM tablespace only

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams048.htm#REFRN10029

 

DB_BLOCK_CHECKING specifies whether or not Oracle performs block checking for database blocks.

Values:

OFF or FALSE

No block checking is performed for blocks in user tablespaces. However, semantic block checking for SYSTEM tablespace blocks is always turned on.

LOW

Basic block header checks are performed after block contents change in memory (for example, after UPDATE or INSERT statements, on-disk reads, or inter-instance block transfers in Oracle RAC).

MEDIUM

All LOW checks and full semantic checks are performed for all objects except indexes (whose contents can be reconstructed by a drop+rebuild on encountering a corruption).

FULL or TRUE

All LOW and MEDIUM checks and full semantic checks are performed for all objects.

Oracle checks a block by going through the data in the block, making sure it is logically self-consistent. Block checking can often prevent memory and data corruption. Block checking typically causes 1% to 10% overhead, depending on workload and the parameter value. Specific DML overhead may be higher. The more updates or inserts in a workload, the more expensive it is to turn on block checking. You should set DB_BLOCK_CHECKING to FULL if the performance overhead is acceptable.

For backward compatibility, the use of FALSE (implying OFF) and TRUE (implying FULL) is preserved.

 

158.You create two resource plans, one for data warehouse loading jobs at night and the other for application jobs at day time. You want the resource plans to activate automatically so that the resource allocation is optimum as desired by the activity.

How would you achieve this?

A. Implement job classes

B. Implement Scheduler windows

C. Implement the mapping rule for the consumer groups

D. Set the SWITCH_TIME resource plan directive for both the resource plans

 

Answer: B

答案解析:

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

调度程序可以在调度程序窗口范围内自动更改资源管理器计划。如果不希望使用自动切换,则取消选中默认的“Automatic Plan Switching Enabled(已启用自动计划切换)”复选框。即实现调度窗口来实现自动切换。选B.

 

159.Which package provides API's for the SQL Tuning Advisor?

A. DBMS_MONITOR

B. DBMS_STATS

C. DBMS_SQLTUNE

D. DBMS_ADVISOR

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF94855

 

Running SQL Tuning Advisor

The recommended interface for running SQL Tuning Advisor is Enterprise Manager. Whenever possible, run SQL Tuning Advisor using Enterprise Manager, . If Enterprise Manager is unavailable, then you can run SQL Tuning Advisor using procedures in the DBMS_SQLTUNE package. To use the APIs, the user must be granted specific privileges.

Running SQL Tuning Advisor using DBMS_SQLTUNE package is a multi-step process:

Create a SQL tuning set (if tuning multiple SQL statements)

Create a SQL tuning task

Execute a SQL tuning task

Display the results of a SQL tuning task

Implement recommendations as appropriate

 

160.Which two statements are true about the duplexing of the backups taken by RMAN? (Choose two.)

A. It's only supported for the backups performed on the tape

B. It is not supported for backup operations that produce image copies

C. Duplex backups need a parallelism for the device to be equal to number of copies

D. Duplex backups can be performed to either disk or tape, but cannot be performed on tape and disk simultaneously

 

 

Answer: BD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfa.htm#BRADV140

 

Configuring Backup Duplexing

You can use the CONFIGURE ... BACKUP COPIES command to specify how many copies of each backup piece should be created on the specified device type for the specified type of file. This type of backup is known as a duplexed backup set. The CONFIGURE settings for duplexing only affect backups of data files, control files, and archived logs into backup sets, and do not affect image copies.

Note:

control file autobackup is never duplexed.

RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. The following examples show possible duplexing configurations:

# Makes 2 disk copies of each data file and control file backup set

# (autobackups excluded)

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

# Makes 3 copies of every archived redo log backup to tape

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 3;

To return a BACKUP COPIES configuration to its default value, run the same CONFIGURE command with the CLEAR option, as in the following example:

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt CLEAR;

By default, CONFIGURE ... BACKUP COPIES is set to 1 for each device type.

Note:

If you do not want to create a persistent copies configuration, then you can specify copies with the BACKUP COPIES and the SET BACKUP COPIES commands.

 

 

161.You are using a recovery catalog to maintain Recovery Manager (RMAN) backup information for your production database. You have registered your production database and are performing regular backups. Because of a new requirement you have added a few new tablespaces to your production database and you want them to be included in backups. Identify two options for completing this task. (Choose two.)

A. Reregistering the target database in recovery catalog

B. Transporting the new tablespaces to the recovery catalog database

C. Syncronizing the recovery catalog with the target database control file

D. Performing a fresh backup of the target database to include the new data files in the catalog database

 

 

Answer: CD

答案解析:

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

当已经被注册的数据库添加了新的表空间时,这时候需要RMAN来执行重新同步。也可以重新在目录数据库中执行一个新的目标数据库备份。

重新同步需要使用完全重新同步

RMAN 执行重新同步时,会对恢复目录和目标数据库的当前控制文件或备份/备用控制文件进行比较,然后用缺失或更改的信息来更新恢复目录。

重新同步有两种类型:部分和完全。对于部分重新同步,RMAN 会比较控制文件和恢复目录,并使用与备份、归档重做日志、数据文件副本等有关的任何元数据更新恢复目录。

对于完全重新同步,RMAN 先创建控制文件快照,该快照只是控制文件的临时副本。它使用快照与恢复目录进行比较。它比较和更新部分重新同步处理的所有数据,还包括所有数据库结构更改。例如,完全重新同步包括数据库方案更改或新表空间。

注:数据库方案包括数据文件、重做日志文件、归档日志文件、还原段的名称和位置以及在控制文件中找到的其它信息。

如果只对控制文件中由CONTROL_FILE_RECORD_KEEP_TIME控制的记录进行更改,则使用部分重新同步即可。否则,需使用完全重新同步。

也可以通过发出RESYNC CATALOG命令执行完全重新同步。

 

162.View the Exhibit to examine the output produced by the following query at three different times since the database instance started and has undergone workloads of different capacities:

SQL> SELECT substr(component, 0, 10) COMP, current_size CS, user_specified_size US

FROM v$memory_dynamic_components

WHERE current_size!=0;

What do you infer from this?

 

A. All sessions are connected to the database instance in dedicated mode, and no RMAN or parallel query operations have been performed.

B. The database instance is running with manual shared memory management.

C. The database instance is running with manual PGA management.

D. The database instance has the MEMORY_TARGET value set to a nonzero value.

 

Answer: D

答案解析:

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

 

动态性能视图V$MEMORY_DYNAMIC_COMPONENTS显示所有动态优化的内存组件的当前大小,其中包括SGA 和实例PGA 的总大小。

三次启动的SGA的各个组件大小都一样,是动态变化的,PGA也是动态变化的,所以此数据库是处于自动内存管理即AMM,也即是说MEMORY_TARGET设定为非零值。

 

163.View the Exhibit to observe the error.

 

You receive this error regularly and have to shut down the database instance to overcome the error. What can the solution be to reduce the chance of this error in future, when implemented?

A. setting the PRE_PAGE_SGA parameter to TRUE

B. locking the SGA in memory

C. increasing the value of SGA_MAX_SIZE

D. automatic memory management

 

 

Answer: D

答案解析:

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

使用AMM自动内存管理来分配共享池,防止共享池设置小而出错。

 

164.View the Exhibit to examine the details for an incident. Which statement is true regarding the status of the incident?

 

A. The incident has been newly created and is in the process of collecting diagnostic information.

B. The incident is now in the Done state and the ADR can select the incident to be purged.

C. The DBA is working on the incident and prefers that the incident be kept in the ADR.

D. The data collection for the incident is complete and the incident can be packaged and sent to Oracle Support.

 

 

Answer: D

答案解析:

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

事件的数据搜集完成后就可以打包上传到oracle支持工作台了。D正确。

 

165.View the Exhibit exhibit1.

 

 

In the CUSTOMERS_OBE table, when the value of CUST_STATE_PROVINCE is "CA", the value of COUNTRY_ID is "US." View the Exhibit exhibit2 to examine the commands and query plans. The optimizer can sense 8 rows instead of 29 rows, which is the actual number of rows in the table. What can you do to make the optimizer detect the actual selectivity?

A. Change the STALE_PERCENT value for the CUSTOMERS_OBE table.

B. Set the STATISTICS_LEVEL parameter to TYPICAL.

C. Create extended statistics for the CUST_STATE_PROVINCE and CUSTOMERS_OBE columns.

D. Set the OPTIMIZER_USE_PENDING_STATISTICS parameter to FALSE.

 

 

Answer: C

答案解析:

 参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/stats.htm#PFGRF94728

Managing Extended Statistics

DBMS_STATS enables you to collect extended statistics, which are statistics that can improve cardinality estimates when multiple predicates exist on different columns of a table, or when predicates use expressions. An extension is either a column group or an expression.

Oracle Database supports the following types of extended statistics:

Column group statistics

This type of extended statistics can improve cardinality estimates when multiple columns from the same table occur together in a SQL statement. See"Managing Column Group Statistics".

Expression statistics

This type of extended statistics improves optimizer estimates when predicates use expressions, for example, built-in or user-defined functions. 

 

Managing Column Group Statistics

When the WHERE clause of a query specifies multiple columns from a single table (multiple single column predicates), the relationship between the columns can strongly affect the combined selectivity for the column group.

For example, consider the customers table in the sh schema. The columns cust_state_province and country_id are related, with cust_state_provincedetermining the country_id for each customer. Suppose you query the customers table where the cust_state_province is California:

SELECT COUNT(*)

FROM   sh.customers

WHERE  cust_state_province = 'CA';

The preceding query returns the following value:

COUNT(*)

----------

    3341

Adding an extra predicate on the country_id column does not change the result when the country_id is 52790 (United States of America). Assume that you run the following query:

SELECT COUNT(*)

FROM   customers

WHERE  cust_state_province = 'CA'

AND    country_id=52790;

The preceding query returns the same value as the previous query:

COUNT(*)

----------

    3341

Assume that the country_id has a different value, such as 52775 (Brazil), as in the following query:

SELECT COUNT(*)

FROM   customers

WHERE  cust_state_province = 'CA'

AND    country_id=52775;

In this case the returned value is as follows:

COUNT(*)

----------

       0

With individual column statistics, the optimizer has no way of knowing that the cust_state_province and the country_id columns are related. By gathering statistics on these columns as a group (column group), the optimizer has a more accurate selectivity value for the group, instead of having to generate the value based on the individual column statistics.

You can create column groups manually by using the DBMS_STATS package. You can use this package to create a column group, get the name of a column group, or delete a column group from a table.

 

166.Exhibit:

 

View the Exhibit and examine the output. You executed the following command to enable Flashback Data Archive on the EXCHANGE_RATE table:

ALTER TABLE exchange_rate FLASHBACK ARCHIVE;

What is the outcome of this command?

A. The Flashback Archive is created on the same tablespace where the tables are stored.

B. The Flashback Archive is created on the SYSAUX tablespace.

C. The command generates an error because no Flashback Archive name is specified and there is no default Flashback Archive.

D. The table uses the default Flashback Archive.

 

Answer: C

答案解析:

参考501题:http://blog.csdn.net/rlhua/article/details/12225237

 

167.View the Exhibits exhibit1 and exhibit2.
Both the processes use PROG_1 as the job template that is already available. The time taken by the jobs are recorded in the TEST_LOG table. While comparing the time taken to create the jobs, the process in exhibit1 takes less time than the process in exhibit2. What is the reason for this?
Exhibit

 

A .It updates several tables in the SYSTEM tablespace instead of creating new tables.
B. It creates jobs temporarily in memory only.
C. It creates less metadata for the jobs.
D. It writes the job metadata to disk in compressed format.

 

Answer: C
题目解答: C
轻量作业使用更少的资源

168.Exhibit:

 

View the Exhibit to examine a portion of the output from the VALIDATE DATABASE command. Which statement is true about the block corruption detected by the command?

A. No action is taken except the output in the Exhibit.

B. The ADVISE FAILURE command is automatically called to display the repair script.

C. The failure is logged into the Automatic Diagnostic Repository (ADR).

D. The corruption is repaired by the command implicitly.

 

Answer: C

答案解析:

从图上得知:

 

说明C正确。

DATABASE

Validates the database.

RMAN validates all data files and control files. If the database is currently using a server parameter file, then RMAN validates the server parameter file.

Note: The online redo log files and temp files are not validated.

 

169.Exhibit #1:

 

Exhibit #2:

 

View the Exhibit exhibit1 to observe the maintenance window property. View the Exhibit exhibit2 to examine the output of the query.
Which two statements describe the conclusions? (Choose two.)
A. RESOURCE_PERCENTAGE should be increased.
B. The repeat time for the window should be decreased.
C. RESOURCE_PERCENTAGE should be decreased.
D. The window duration should be increased.

 

Answer: AD
题目解答:自动任务在调用时间段实现作业。而 dba_autotask_client 看到的资源与时间段结果是增加后的值 BC 错

 

170.ASM supports all but which of the following file types? (Choose all that apply.)

A. Database files

B. Spfiles

C. Redo-log files

D. Archived log files

E. RMAN backup sets

F. Password files

G. init.ora files

 

 

Answer: FG

答案解析:

ASM 支持数据文件、日志文件、控制文件、归档日志、Recovery Manager (RMAN) 备份集及其它Oracle DB 文件类型。ASM 还支持RAC,这样就不再需要集群逻辑卷管理器或集群文件系统。

 

FG,为二进制文件,不是数据库文件。

 

171.After executing the command alter diskgroup disk group2 drop disk dg2a; you issue the following command from the ASM instance:

Select group_number, count(*) from v$asm_operation;

What is the implication if the query against V$ASM_OPERATION returns zero rows?

A. The drop disk operation is still proceeding and you cannot yet run the undrop disks operation.

B. The drop disk operation is complete and you can run the undrop disks command if needed.

C. The drop disk operation is complete and you cannot run the undrop disk command.

D. The query will fail since there is not a V$ASM_OPERATION view available in an ASM instance.

E. None of the above is true.

 

 

Answer: C

答案解析:

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

UNDROP命令仅对磁盘的暂挂删除操作起作用;它对于已经完成的删除操作没有影响。

 

172.What is the net effect of the following command?

alter diskgroup dgroup1 drop disk abc;

A. The disk ABC will be dropped from the disk group. Since you did not issue a rebalance command, the data on that disk will be lost.

B. The command will raise an error indicating that you need to rebalance the disk group to remove the data from that disk prior to dropping the disk.

C. The disk group will be automatically rebalanced during the drop operation. Once the rebalancing is complete, the disk will be dropped.

D. This command will fail because you cannot drop a specific disk in an ASM disk group.

E. The disk drop command will be suspended for a predetermined amount of time, waiting for you to also issue an alter diskgroup rebalance command. Once you have issued the rebalance command, ASM will proceed to rebalance the disk group and then drop the disk.

 

 

Answer: C

答案解析:

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

ASM磁盘组支持动态扩展,当我们向现有的磁盘组动态加入新的磁盘或者删除磁盘时,新加入的磁盘加入后,Oracle通过后台RBAL进行Rebalance,将当前的数据均衡到新增加的磁盘上。Drop磁盘亦会Rebalance。

 

173.Which of the following is not a configurable attribute for an individual disk group?

A. AU_SIZE

B. COMPATIBLE.RDBMS

C. COMPATIBLE.ASM

D. DISK_REPAIR_TIME

E. DG_DROP_TIME

 

 

Answer: E

答案解析:

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

 

 

174.What Oracle process runs when the database is in ARCHIVELOG mode but not when it is in

NOARCHIVELOG mode?

A. MMON

B. LGWR

C. ARCH

D. ARWR

E. COPY

 

 

Answer: C

答案解析:

 ARCH指归档进程,只有在归档模式下的数据库才会有的进程。

Archiver (ARCn)

One or more archiver processes copy the redo log files to archival storage when they are full or a log switch occurs. 

 

175.You are peer reviewing a fellow DBAs backup plan for his NOARCHIVELOG mode database, as
shown here:
Put the tablespaces in backup mode.
Back up the datafiles for all tablespaces.
Take the tablespaces out of backup mode.
Back up all archived redo logs.
Your colleague asks for you to comment on his plan. Which response would be correct?
A. The plan will work as is.
B. The plan needs to be modified to allow for an archive-log switch after step 3.
C. The plan needs to be modified so that a backup of the archived redo logs occurs before step 1.
D. The plan needs to be adjusted to shut down the database after step 1 and to restart the database after step 2.
E. The plan cannot work as presented.

 

Answer: B
题目解答:非归档模式,只能对表空间脱机后备份或关闭数据库备份,但一定没有归档日志,所有调整为归档后上面流程就可以使用了。 B 正确

176.Which of the following statements is true when the database is in ARCHIVELOG mode and tablespaces are in hot backup mode?

A. Archive log generation is suspended until the tablespaces are taken out of hot backup mode.

B. Datafiles are not written to during hot backups.

C. Changes to the database are cached during the backup and not written to the datafiles to ensure that the datafiles are consistent when recovered.

D. The datafile headers are not updated during the backup.

E. The way data is written to the online redo logs is unchanged during the backup.

 

Answer: D

答案解析:

当执行ALTER TABLESPACE ... BEGIN BACKUP是,数据文件的头部就会冻结,不再更新,等执行ALTER TABLESPACE ... END BACKUP后,将更新为目前的SCN号。

backup mode

The database mode (also called hot backup mode) initiated when you issue the ALTER TABLESPACE ... BEGIN BACKUP or ALTER DATABASE BEGIN BACKUP command before taking an online backup. You take a tablespace out of backup mode when you issue the ALTER TABLESPACE ... END BACKUP or ALTER DATABASE END BACKUPcommand.

When making a user-managed backup of data files in an online tablespace, you must place the tablespace in backup mode to protect against the possibility of a fractured block. In backup mode, updates to the database create more than the usual amount of redo. Each time a block in the buffer cache becomes dirty, the database must write an image of the changed block to the redo log file, in addition to recording the changes to the data. RMAN does not require you to put the database in backup mode.

fractured block

A block in which the header and footer are not consistent at a given SCN. In a user-managed backup, an operating system utility can back up a data file at the same time that DBWR is updating the file. It is possible for the operating system utility to read a block in a half-updated state, so that the block that is copied to the backup media is updated in its first half, while the second half contains older data. In this case, the block is fractured.

For non-RMAN backups, the ALTER TABLESPACE ... BEGIN BACKUP or ALTER DATABASE BEGIN BACKUP command is the solution for the fractured block problem. When a tablespace is in backup mode, and a change is made to a data block, the database logs a copy of the entire block image before the change so that the database can reconstruct this block if media recovery finds that this block was fractured.


 

BEGIN BACKUP

Specify BEGIN BACKUP to indicate that an open backup is to be performed on the data files that make up this tablespace. This clause does not prevent users from accessing the tablespace. You must use this clause before beginning an open backup.

Restrictions on Beginning Tablespace Backup Beginning tablespace backup is subject to the following restrictions:

You cannot specify this clause for a read-only tablespace or for a temporary locally managed tablespace.

While the backup is in progress, you cannot take the tablespace offline normally, shut down the instance, or begin another backup of the tablespace.

 

Backing Up Tablespaces: Examples The following statement signals to the database that a backup is about to begin:

ALTER TABLESPACE tbs_01

    BEGIN BACKUP; 

 

177.When you create a backup control file, where is the resulting file written to?

A. The database user dump destination directory

B. The database diagnostic destination directory

C. To $ORACLE_HOME/rdbms

D. To $ORACLE_HOME/admin

E. To the directory and filename you specify in the command

 

 

Answer: E

答案解析:

备份控制文件的原则是:在数据库物理结构发生变化后备份控制文件。

备份控制文件包括三种方法:

通过操作系统命令在数据库关闭时对控制文件进行COPY;

利用ALTER DATABASE BACKUP CONTROLFILE TO命令将控制文件备份到二进制文件;

利用ALTER DATABASE BACKUP CONTROLFILE TO TRACE命令将重建控制文件备份的脚本备份到后台trace文件中。

Oracle推荐使用第二种方式来备份控制文件。第一种方式备份的控制文件,一般用于全库一致性恢复。而第三种方式备份控制文件会丢失归档日志历史等许多信息。在重建控制文件时,只读表空间和脱机的数据文件的处理相对比较复杂。

 

E答案为利用ALTER DATABASE BACKUP CONTROLFILE TO命令将控制文件备份到二进制文件进行备份的。

 

178.If a log file becomes corrupted, it may cause the database to stall. How would you correct such a situation?

A. Recover the online redo log from backup.

B. Delete and re-create the log file.

C. Use the alter database clear logfile command to clear the log file.

D. Shut down the database and restart it.

E. Shut down the database and then mount it. Clear the log file with the alter database clear logfile command and then restart the database with alter database open resetlogs.

 

 

Answer: C 

答案解析:

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

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

 

sys@TEST1107> select * from v$log;

 [oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/redo02.log

sys@TEST1107> alter database clear logfile group 2;

Database altered.

 

----如果没有执行上面这个语句,在再次启动数据库时 被删掉的日志会变成INVALID状态。执行alter database clear logfile group 2,再次启动数据库时,日志都是正常的。

所以可以直接在线清除日志信息,E答案不用resetlogs打开数据库,错误。

D答案,再次启动,日志会变成INVALID状态。

B答案,需要关闭再起库到mount状态。

A答案,直接清除就可以,不需要恢复。

 

以下关闭再启库,只是测试日志是否正常。

 

sys@TEST1107> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1269366784 bytes

Fixed Size                  2227984 bytes

Variable Size             872415472 bytes

Database Buffers          385875968 bytes

Redo Buffers                8847360 bytes

Database mounted.

Database opened.

sys@TEST1107> select * from v$logfile;

 

    GROUP# STATUS  TYPE    MEMBER                                             IS_

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

         3         ONLINE  /u01/app/oracle/oradata/test1107/redo03.log        NO

         2         ONLINE  /u01/app/oracle/oradata/test1107/redo02.log        NO

         1         ONLINE  /u01/app/oracle/oradata/test1107/redo01.log        NO

         1         ONLINE  /u01/app/oracle/oradata/test1107/redo01a.log       NO

         2         ONLINE  /u01/app/oracle/oradata/test1107/redo02a.log       NO

         3         ONLINE  /u01/app/oracle/oradata/test1107/redo03a.log       NO

 

6 rows selected.

 

179.You have lost datafiles 1 and 3 from your database, and the database has crashed. In what order should you perform the following steps to recover your database?

1. Take the datafiles that were lost offline.

2. startup mount the database

3. Issue the alter database open command.

4. Restore the datafiles that were lost

5. Recover the datafiles with the recover datafile command.

6. Bring the datafiles back online.

7. Recover the database with the recover database command.

A. 2, 1, 3, 4, 5, 6

B. 2, 4, 5, 3

C. 4, 7, 3

D. 2, 4, 7, 3

E. 2, 7, 3

 

Answer: B

答案解析:

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

一般的数据文件恢复,offline--restore--recover--online

关键的数据文件,如system,undo等,shutdown-startup mount---restore--recover--alter database open

文件中的1和3文件是system和undo关键性数据文件,故用第二种方法。

实验验证:

 

首先查看数据文件:

sys@TEST1107> select file_id,file_name from dba_data_files;

 

   FILE_ID FILE_NAME

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

         4 /u01/app/oracle/oradata/test1107/users01.dbf

         3 /u01/app/oracle/oradata/test1107/undotbs01.dbf

         2 /u01/app/oracle/oradata/test1107/sysaux01.dbf

         1 /u01/app/oracle/oradata/test1107/system01.dbf

         5 /u01/app/oracle/oradata/test1107/example01.dbf

         6 /u01/app/oracle/oradata/test1107/test01.dbf

 

6 rows selected.

 

OS删除数据文件1和3

[oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/system01.dbf

[oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/undotbs01.dbf

 

关库,再起库,报错,关库,在起到mount状态

sys@TEST1107> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1269366784 bytes

Fixed Size                  2227984 bytes

Variable Size             872415472 bytes

Database Buffers          385875968 bytes

Redo Buffers                8847360 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1: '/u01/app/oracle/oradata/test1107/system01.dbf'

 

 

sys@TEST1107> shutdown immediate

ORA-01109: database not open

 

 

Database dismounted.

ORACLE instance shut down.

sys@TEST1107> startup mount;

ORACLE instance started.

 

Total System Global Area 1269366784 bytes

Fixed Size                  2227984 bytes

Variable Size             872415472 bytes

Database Buffers          385875968 bytes

Redo Buffers                8847360 bytes

Database mounted.

 

使用rman进行restore和recover,然后打开数据库。

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Nov 7 13:28:23 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TEST1107 (DBID=2336818266, not open)

 

RMAN> restore datafile 1,3

2> ;

 

Starting restore at 07-NOV-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=189 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=221 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=3 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/test1107/undotbs01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T131035_97qox15d_.bkp

channel ORA_DISK_2: starting datafile backup set restore

channel ORA_DISK_2: specifying datafile(s) to restore from backup set

channel ORA_DISK_2: restoring datafile 00001 to /u01/app/oracle/oradata/test1107/system01.dbf

channel ORA_DISK_2: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T131035_97qowz79_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T131035_97qox15d_.bkp tag=TAG20131107T131035

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:26

channel ORA_DISK_2: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T131035_97qowz79_.bkp tag=TAG20131107T131035

channel ORA_DISK_2: restored backup piece 1

channel ORA_DISK_2: restore complete, elapsed time: 00:02:56

Finished restore at 07-NOV-13

 

RMAN> recover datafile 1,3;

 

Starting recover at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery complete, elapsed time: 00:00:01

 

Finished recover at 07-NOV-13

 

RMAN> alter database open;

 

database opened

 

180.Which command is used to open the database after an incomplete recovery?

A. alter database open

B. alter database open repairlog

C. alter database open resetlogs

D. alter database open resetlog

E. alter database resetlogs open

 

 

Answer: C

答案解析:

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

不完全恢复,只能使用resetlogs来打开数据库。

181.Your database has a backup that was taken yesterday (Tuesday) between 13:00 and 15:00 hours. This is the only backup you have. You have lost all the archived redo logs generated since the previous Monday, but you have archived redo logs available from the previous Sunday and earlier. You now need to restore your backup due to database loss. To which point can you restore your database?
A. 13:00 on Tuesday.
B. 15:00 on Tuesday.
C. Up until the last available archived redo log on Sunday.
D. To any point; all the redo should still be available in the online redo logs.
E. The database is not recoverable.

 

Answer: E
题目解答: 备份后的归档没有,有归档日志的没有备份,所以无法恢复。当然超越 ocp 技术是可以恢复的。

 

182.Which of the following files cannot be backed up by RMAN? (Choose all that apply.)

A. Database datafiles

B. Control files

C. Online redo logs

D. Database pfiles

E. Archived redo logs

 

 

Answer: CD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV89477

 

C是归档后,使用r满备份。而pfile是客户端的文件,也不能使用rman备份。

The RMAN command for making backups is BACKUP. The RMAN BACKUP command supports backing up the following types of files:

Datafiles and control files

Server parameter file

Archived redo logs

RMAN backups

Although the database depends on other types of files, such as network configuration files, password files, and the contents of the Oracle home, you cannot back up these files with RMAN. Likewise, some features of Oracle Database, such as external tables, may depend upon files other than the datafiles, control files, and redo log. RMAN cannot back up these files. Use some non-RMAN backup solution for any files not in the preceding list.

When you execute the BACKUP command in RMAN, the output is always either one or more backup sets or one or more image copies. A backup set is an RMAN-specific proprietary format, whereas an image copy is a bit-for-bit copy of a file. By default, RMAN creates backup sets.

 

183.Which of the following RMAN structures can data from a datafile span?

A. RMAN backup-set pieces spanning backup sets
B. RMAN backup-set pieces within a given backup set
C. RMAN backups
D. RMAN channels
E. None of the above

 

Answer: B
题目解答:一个数据文件可以在一个片中,也可以在多个片中。多个数据文件可以在一个片或多个片中。一个片还是多个片都是属于某个备份集的。

 

184.Which RMAN backup command is used to create the block-change tracking file?

A. alter database create block change tracking file

B. alter database enable block change file

C. alter database enable block change tracking using file ,,/ora01/opt/ block_change_tracking.fil

D. alter system enable block change tracking using file '/ora01/opt/block_ change_tracking.fil'

E. alter system block change tracking on

 

 

Answer: C

答案解析:

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

You can enable block change tracking when the database is either open or mounted.

To enable block change tracking:

Start SQL*Plus and connect to a target database with administrator privileges.

Ensure that the DB_CREATE_FILE_DEST initialization parameter is set.

SHOW PARAMETER DB_CREATE_FILE_DEST

If the parameter is not set, and if the database is open, then you can set the parameter with the following form of the ALTER SYSTEM statement:

ALTER SYSTEM SET

DB_CREATE_FILE_DEST = '/disk1/bct/'

SCOPE=BOTH SID='*';

Enable block change tracking.

Execute the following ALTER DATABASE statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

You can also create the change tracking file in a location that you choose yourself by using the following form of SQL statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING

USING FILE '/mydir/rman_change_track.f' REUSE;

The REUSE option tells Oracle Database to overwrite any existing block change tracking file with the specified name.

 

185.A shoot-out has erupted between your MS development teams using .NET and your Linux development teams using Java. Knowing that your database is in danger, which command would you use to back up your NOARCHIVELOG mode database using RMAN with compression?
A. backup database all
B. backup compressed database
C. backup as compressed backupset database;
D. backup as compressed backup database plus archivelog all;
E. backup as compressed backupset database plus compress archivelog all;



Answer: C
题目解答:非归档只能 C

 

186.What is the purpose of the RMAN recovery catalog? (Choose all that apply.)
A. Make backups faster
B. Store RMAN metadata
C. Store RMAN scripts
D. Provide the ability to do centralized backup reporting.
E. Make recovery faster

 

Answer: BCD
题目解答: catalog 与速度无关 AE 错误

答案解析:

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

rman恢复目录的目的:

可以存储脚本,可以存储rman元数据,可以集中管理目标数据库等。

 

恢复目录:

• 复制控制文件数据

• 存储更长的备份历史记录

• 服务于多个目标

• 存储RMAN 脚本

RMAN 资料档案库数据始终存储在目标数据库的控制文件中。此外,它也可以存储在一个名为“恢复目录”的单独数据库中。

恢复目录会在单独的数据库中保留备份信息,这在控制文件丢失时尤为有用。这样你可以存储更长的备份历史记录,比基于控制文件的资料档案库所存储的历史记录还要长。使用一个恢复目录可存储多个目标数据库的信息。恢复目录还可用来存放RMAN 存储脚本,这些脚本是RMAN 命令的序列。

如果你的备份管理要求很简单,则Oracle 建议你使用控制文件选项而不要使用恢复目录。拥有恢复目录意味着你需要管理并备份其它数据库。因此,只有在可利用恢复目录所提供的优点(如较长的备份保留时间)时,才使用恢复目录。

 

 

187.RMAN provides more granular catalog security through which feature?

A. Virtual private database

B. Virtual private catalog

C. RMAN virtual database

D. RMAN secure catalog

E. Oracle Database Vault

 

 

Answer: B

答案解析:

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

 

题问:RMAN提供更细化的目录安全功能是通过哪个特性?

 

virtual private catalog

A subset of the metadata in a base recovery catalog to which a database user is granted access. The owner of a base recovery catalog can grant or revoke restricted access to the recovery catalog to other database users. Each restricted user has full read/write access to his own virtual private catalog。

 virtual private catalog 虚拟专用目录(VPC)使用此功能可以合并RMAN 资料档案库并保持职责分离,这是一项基本安全要求。

RMAN 目录已被增强,可用于创建数据库组和用户组的虚拟专用RMAN 目录。该目录的所有者将创建基本目录并为虚拟目录的所有者授予RECOVERY_CATALOG_OWNER权限。目录的所有者可为虚拟目录的所有者授予访问已注册数据库的权限或REGISTER权限。然后,虚拟目录所有者可连接到特定目标的目录,或者注册一个目标数据库。完成配置后,VPC 所有者可像使用标准基本目录一样使用虚拟专用目录。

作为目录所有者,你可以访问该目录中所有已注册的数据库信息。你可以列出使用SQL*Plus 命令注册的所有数据库:

SELECT DISTINCT db_name FROM DBINC;

作为虚拟目录所有者,你只能查看授予了你访问权限的数据库。

注:如果目录所有者未被授予对目标数据库的SYSDBA或SYSOPER权限,则无法执行大多数RMAN 操作。

 

来源: <Oracle DB 使用RMAN恢复目录 - 一抹曦阳-Oracle - 博客频道 - CSDN.NET>

 188.You can back up the RMAN recovery catalog with RMAN.

A. True

B. False

 

Answer: A

答案解析:

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

恢复目录是一个Oracle DB,因此与任何数据库一样,需要进行备份。Oracle 建议使用RMAN 进行备份,当然,应将控制文件而不是恢复目录用作RMAN 资料档案库。千万不要将包含数据库的RMAN 资料档案库的恢复目录存储在与目标数据库相同的数据库中,或与目标数据库相同的磁盘上。只有独立于要保护的数据时,恢复目录才有效。

配置控制文件自动备份,以便每次备份包含恢复目录时,都备份控制文件。任何时候在目标数据库中创建备份时,都可随后备份恢复目录。这样做可保护最新备份记录。

 

189.What RMAN command must you use before you can back up a database using the recovery catalog?

A. create catalog

B. install database

C. catalog database

D. merge Catalog with database

E. register database

 

 

Answer: E

答案解析:题目解答:必须注册才能备份。

Registering a Database with the REGISTER DATABASE Command

The first step in using a recovery catalog with a target database is registering the target database in the recovery catalog. If you use the catalog in a Data Guard environment, then you can only register the primary database in this way.

Use the following procedure:

Start RMAN and connect to a target database and recovery catalog. The recovery catalog database must be open.

For example, issue the following command to connect to the catalog database with the net service name catdb as user rman (who owns the catalog schema):

% rman TARGET / CATALOG rman@catdb

If the target database is not mounted, then mount or open it:

STARTUP MOUNT;

Register the target database in the connected recovery catalog:

REGISTER DATABASE;

RMAN creates rows in the catalog tables to contain information about the target database, then copies all pertinent data about the target database from the control file into the catalog, synchronizing the catalog with the control file.

Verify that the registration was successful by running REPORT SCHEMA:

REPORT SCHEMA;

Report of database schema

File Size(MB) Tablespace RB segs Datafile Name

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

1 307200 SYSTEM NO /oracle/oradata/trgt/system01.dbf

2 20480 UNDOTBS YES /oracle/oradata/trgt/undotbs01.dbf

3 10240 CWMLITE NO /oracle/oradata/trgt/cwmlite01.dbf

4 10240 DRSYS NO /oracle/oradata/trgt/drsys01.dbf

5 10240 EXAMPLE NO /oracle/oradata/trgt/example01.dbf

6 10240 INDX NO /oracle/oradata/trgt/indx01.dbf

7 10240 TOOLS NO /oracle/oradata/trgt/tools01.dbf

8 10240 USERS NO /oracle/oradata/trgt/users01.dbf

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcatdb.htm#i1006311

 

190.You have control-file autobackups enabled. When starting your database from SQL*Plus, you receive the following error message:

SQL> startup ORA-01078: failure in processing system parameters LRM-00109:

could not open parameter file ,,

C:\ORACLE\PRODUCT\11.1.0\DB_1\DATABASE\INITORCL.ORA Using RMAN,

how would you respond to this error?

A. Issue the startup nomount command and then issue the restore parameter file command from the RMAN prompt.

B. Issue the startup nomount command and then issue the restore spfile command from the RMAN prompt.

C. Issue the startup nomount command and then issue the restore spfile from autobackup command from the RMAN prompt.

D. Issue the startup nomount command and then issue the restore spfile from backup command from the RMAN prompt.

E. Issue the restore spfile from autobackup command from the RMAN prompt.

 

 

Answer: C

答案解析:

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

恢复丢失的服务器参数文件

使用FROM MEMORY子句可以创建系统范围内的当前参数设置。

SQL> CREATE PFILE[= 'pfile_name' ] FROM{ { SPFILE [= 'spfile_name'] } | MEMORY} ;

SQL> CREATE SPFILE[= 'spfile_name' ] FROM{ { PFILE [= 'pfile_name' ] } | MEMORY } ;

恢复丢失的服务器参数文件

恢复服务器参数文件的最简单方法是使用FROM MEMORY子句,该子句可以使用系统范围内的当前参数设置来创建文本初始化参数文件(PFILE) 或服务器参数文件(SPFILE)。

在RAC 环境中,所创建的文件包含来自每个实例的参数设置。

在实例启动期间,所有参数设置均记录到alert.log文件中。在Oracle Database 11g中,alert.log参数转储文本是使用有效的参数语法编写的。这便于对参数进行剪切,并将其粘贴到单独的文件中,从而用作后续实例的PFILE。

在实例启动时,PFILE 或SPFILE 的名称被写入到alert.log。使用未知的客户机PFILE 时,预警日志也会对此加以提示。

要支持其它功能,必须将COMPATIBLE初始化参数设置为11.0.0.0 或更高。

从控制文件自动备份还原服务器参数文件

RMAN> STARTUP FORCE NOMOUNT;

RMAN> RESTORE SPFILE FROM AUTOBACKUP;

RMAN> STARTUP FORCE;

从控制文件自动备份还原服务器参数文件

如果服务器参数文件已丢失,并且无法使用FROM MEMORY子句,可以从自动备份来还原该文件。这个过程类似于从自动备份中还原控制文件。

如果自动备份没有位于快速恢复区中,先为你的数据库设置DBID。发出RESTORE SPFILE FROM AUTOBACKUP命令。

如果要将SPFILE 还原到非默认位置,请按以下方式指定命令:

RESTORE SPFILE TO <file_name> FROM AUTOBACKUP

如果要从快速恢复区还原服务器参数文件,请按以下方式指定命令:

RMAN> run {

2> restore spfile from autobackup

3> recovery area = '<flash recovery area destination>'

4> db_name = '<db_name>';

5> }

 

191.While working on a data problem, Curt, Bill, Ben, Mike, and Matt introduced a vast amount of corrupted data into the database. Pablo has discovered this problem and he needs you to recover the database to the point in time prior to the introduction of the corruption. The logical corruption was introduced at 6:30 p.m. on September 6, 2008. Which of the following would be the correct commands to use to restore the database to a point in time before the orruption?

A. restore database until time '06-SEP-2008 06:30:00'); recover database until time '06-SEP-2008

06:30:00'); alter database open;

B. restore database until time '06-SEP-2008 06:30:00'); recover database until time '06-SEP-2008

06:30:00'); alter database open resetlogs;

C. restore database until time '06-SEP-2008 18:29:55'); recover database until time '06-SEP-2008

18:29:55'); alter database open resetlogs;

D. restore database until time '06-SEP-2008 18:29:55'); alter database open resetlogs;

E. restore database until time '06-SEP-2008 18:29:55'); recover database; alter database open resetlogs;

 

 

Answer: C

 

答案解析:

C基于时间点的还原和恢复,最后使用resetlogs打开数据库。

这里需注意B和C的区别。

192.What is the purpose of the until change option of the restore command?

A. It allows you to select the SCN that you want to restore to.

B. It allows you to select the log sequence number you want to restore to.

C. It allows you to select the timestamp you want to restore to.

D. It allows you to manually stop the restore at any time as online redo logs are applied.

E. None of the above.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osrecvry.htm#BRADV219

 

Performing Time-Based or Change-Based Incomplete Recovery

This section describes how to specify an SCN or time for the end point of recovery. If your database is affected by seasonal time changes (for example, daylight savings time), then you may experience a problem if a time appears twice in the redo log and you want to recover to the second, or later time. To handle time changes, perform cancel-based or change-based recovery.

To perform change-based or time-based recovery:

Follows Step 1 through Step 8 in "Performing Closed Database Recovery".

Issue the RECOVER DATABASE UNTIL statement to begin recovery. If recovering to an SCN, then specify as a decimal number without quotation marks. For example, to recover through SCN 10034 issue:

RECOVER DATABASE UNTIL CHANGE 10034;

If recovering to a time, then the time is always specified using the following format, delimited by single quotation marks: 'YYYY-MM-DD:HH24:MI:SS'. The following statement recovers the database up to a specified time:

RECOVER DATABASE UNTIL TIME '2000-12-31:12:47:30'

Apply the necessary redo log files to recover the restored data files. The database automatically terminates the recovery when it reaches the correct time, and returns a message indicating whether recovery is successful.

Note:

Unless recovery is automated, the database supplies the name from LOG_ARCHIVE_DEST_1 and asks you to stop or proceed with after each log. If the control file is a backup, then after the archived logs are applied you must supply the names of the online logs.

Follow Steps 4 and 5 in "Performing Cancel-Based Incomplete Recovery".

 

UNTIL SCN integer

Specifies an SCN as an upper, noninclusive limit.

RMAN selects only files that it can use to restore or recover up to but not including the specified SCN (seeExample 4-38). For example, RESTORE DATABASE UNTIL SCN 1000 chooses only backups that could be used to recover to SCN 1000.

193.What is the purpose of the recover command? (Choose all that apply.)

A. Recover database datafiles from physical disk backup sets.

B. Recover required incremental backups from physical disk backup sets.

C. Recover required archived redo logs from physical disk backup sets.

D. Apply incremental backups to recover the database.

E. Apply archived redo logs to recover the database.

 

 

Answer: BCDE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2001.htm#RCMRF90238

A答案为restore命令。

 

Purpose

Use the RECOVER command to perform one of the following distinct tasks:

Perform complete recovery of the whole database or one or more restored data files

Perform point-in-time recovery of a database (DBPITR) or tablespace (TSPITR)

Apply incremental backups to a data file image copy (not a restored data file) to roll it forward in time

Recover a corrupt data block or set of data blocks within a data file

Incremental Backups and Archived Redo Log Files

Except for RECOVER BLOCK, RMAN can use both incremental backups and archived redo log files for recovery. RMAN uses the following search order:

Incremental backup sets on disk or tape

Archived redo log files on disk

Archived redo log backups on disk

Archived redo log backup sets on tape

When RMAN chooses a destination to restore archived redo log files, it uses the following order of precedence:

SET ARCHIVELOG DESTINATION

The LOG_ARCHIVE_DEST_n parameter whose value is set to LOCATION=USE_DB_RECOVERY_FILE_DEST

LOG_ARCHIVE_DEST_1

RMAN can apply incremental backups to data files that were not restored from an incremental backup. If overlapping levels of incremental backup exist, then RMAN automatically chooses the level covering the longest period of time.

 

 

194.What is an obsolete backup set?

A. A backup set that is missing one or more backup set pieces

B. A backup that has exceeded the retention criteria and is no longer needed

C. A backup set that does not include archived redo logs

D. A backup set that can not be recovered due to corruption

E. A backup set superceded by a datafile copy

 

 

Answer: B

答案解析:

An obsolete backup is, based on the currently configured retention policy, no longer needed to satisfy data recovery goals

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e10897/backrest.htm#ADMQS0956

 

195. What is the purpose of the list expired backup command?

A. Lists all backups impacted by a resetlogs command

B. Lists all backups that are subject to retention criteria

C. Lists all backups that are missing associated physical backup set pieces

D. Lists the status of datafile backup failures due to the use of the duration command

E. Lists backups that cannot be used by the restore command because they have been marked as disabled

 

 

Answer: C

 

答案解析:

LIST EXPIRED过期的,失效的

 主要显示在物理磁盘上没有,而备份信息上有的。

Lists backups or copies that are recorded in the RMAN repository but that were not present at the expected location on disk or tape during the most recent crosscheck. Such backups may have been deleted outside of RMAN.

 

196.What is the purpose of the catalog command?

A. To review RMAN control file and recovery catalog metadata and ensure that its correct

B. To delete RMAN backup-related metadata from the recovery catalog

C. To create metadata in the control file and the recovery catalog related to backup set pieces

D. To create a report that lists database backups

E. To rebuild the recovery catalog

 

 

Answer: C

答案解析:

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

目录命令的目的是在,控制文件和恢复目录中涉及到备份集片中创建元数据。

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta008.htm#RCMRF109

 

CATALOG

Purpose

Use the CATALOG command to do the following:

Add backup pieces and image copies on disk to the RMAN repository

Record a data file copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy

 

197.Which of the following commands will fail?

A. report schema;

B. report need backup;

C. report need backup days 3;

D. report user;

E. report obsolete;

 

 

Answer: D

答案解析:

REPORT NEED BACKUP

Reports which database files must be backed up to meet a configured or specified retention policy

REPORT UNRECOVERABLE

Reports which database files require backup because they have been affected by some NOLOGGING operation such as a direct-path INSERT

REPORT OBSOLETE

Full backups, data file copies, and archived redo logs recorded in the RMAN repository that can be deleted because they are no longer needed

REPORT SCHEMA

The names of all datafiles (permanent and temporary) and tablespaces for the target database at the specified point in time. If you use RMAN in a Data Guard environment, then you can report the schema for a specifiedDB_UNIQUE_NAME.

Using RMAN REPORT NEED BACKUP with Different Retention Policies

You can specify different criteria for REPORT NEED BACKUP, using one of the following forms of the command:

REPORT NEED BACKUP RECOVERY WINDOW OF n DAYS

Displays objects requiring backup to satisfy a recovery window-based retention policy

REPORT NEED BACKUP REDUNDANCY n

Displays objects requiring backup to satisfy a redundancy-based retention policy

REPORT NEED BACKUP DAYS n

Displays files that require more than n days' worth of archived redo log files for recovery

REPORT NEED BACKUP INCREMENTAL n

Displays files that require application of more than n incremental backups for recovery

Using RMAN REPORT NEED BACKUP with Tablespaces and Datafiles

The REPORT NEED BACKUP command can check the entire database, skip specified tablespaces, or check only specific tablespaces or datafiles against different retention policies, as shown in the following examples:

REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE SKIP TABLESPACE TBS_2;

REPORT NEED BACKUP REDUNDANCY 2 DATAFILE 1;

REPORT NEED BACKUP TABLESPACE TBS_3; # uses configured retention policy

REPORT NEED BACKUP INCREMENTAL 2; # checks entire database

Using REPORT NEED BACKUP with Backups on Tape or Disk Only

You can limit the backups tested by the REPORT NEED BACKUP command to disk-based or tape-based backups only, as shown in these examples:

REPORT NEED BACKUP RECOVERY WINDOW OF 2 DAYS DATABASE DEVICE TYPE sbt;

REPORT NEED BACKUP DEVICE TYPE DISK;

REPORT NEED BACKUP TABLESPACE TBS_3 DEVICE TYPE sbt;

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmreprt.htm#CHDDBJHC

198.What are the two different types of database duplication? (Choose two.)

A. Active

B. Passive

C. Online

D. Backup-based

E. Failure driven

 

 

Answer: AD

答案解析:

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

复制数据库有两种:一是从活动的数据,一是从备份

 

 

199. When you are performing a tablespace point-in-time recovery, which tablespaces will always be restored to the auxiliary instance? (Choose all that apply.)

A.  The SYSTEM tablespace.

B.  The UNDO tablespace.

C. All tablespaces with tables.

D. All tablespaces with indexes.

E. No tablespaces are automatically restored.

 

 

Answer: AB

 

答案解析:

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

 

辅助集:对恢复集执行TSPITR 时所必需的,但本身不属于恢复集的数据文件。辅助集通常包括:

- SYSTEM表空间的副本

- 包含来自目标实例的还原段的数据文件

- 某些情况下从辅助实例导出数据库对象期间使用的临时表空间

 

200.Which operation requires that you create an auxiliary instance manually before executing the operation? (Choose all that apply.)

A. Backup-based database duplication.

B. Active database duplication.

C. Tablespace point-in-time recovery.

D. No operation requires the creation of an auxiliary instance.

 

 

Answer: AB

答案解析:

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

 

 

201.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://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_spm.htm#ARPLS68168

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

 

EVOLVE_SQL_PLAN_BASELINE Function

This function evolves SQL plan baselines associated with one or more SQL statements. A SQL plan baseline is evolved when one or more of its non-accepted plans is changed to an accepted plan or plans. If interrogated by the user (parameter verify = 'YES'), the execution performance of each non-accepted plan is compared against the performance of a plan chosen from the associated SQL plan baseline. If the non-accepted plan performance is found to be better than SQL plan baseline performance, the non-accepted plan is changed to an accepted plan provided such action is permitted by the user (parameter commit = 'YES').

The second form of the function employs a plan list format.

Syntax

DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE (

   sql_handle   IN VARCHAR2 := NULL,

   plan_name    IN VARCHAR2 := NULL,

   time_limit   IN INTEGER  := DBMS_SPM.AUTO_LIMIT,

   verify       IN VARCHAR2 := 'YES',

   commit       IN VARCHAR2 := 'YES')

  RETURN CLOB;

 

DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE (

   plan_list    IN DBMS_SPM.NAME_LIST,

   time_limit   IN INTEGER  := DBMS_SPM.AUTO_LIMIT,

   verify       IN VARCHAR2 := 'YES',

   commit       IN VARCHAR2 := 'YES')

  RETURN CLOB;

Parameters

Table 136-9 EVOLVE_SQL_PLAN_BASELINE Function Parameters

Parameter

Description

sql_handle

SQL statement identifier. Unless plan_name is specified, NULL means to consider all statements with non-accepted plans in their SQL plan baselines.

plan_name

Plan identifier. Default NULL means to consider all non- accepted plans in the SQL plan baseline of either the identified SQL statement or all SQL statements if sql_handle is NULL.

plan_list

A list of plan names. Each plan in the list can belong to same or different SQL statement.

time_limit

Time limit in number of minutes. This applies only if verify = 'YES'. The time limit is global and it is used as follows: The time limit for first non-accepted plan verification is set equal to the input value; the time limit for second non-accepted plan verification is set equal to (input value - time spent in first plan verification); and so on.

DBMS_SPM.AUTO_LIMIT (Default) lets the system choose an appropriate time limit based on the number of plan verifications required to be done.

DBMS_SPM.NO_LIMIT means there is no time limit.

A positive integer value represents a user specified time limit.

verify

Specifies whether to execute the plans and compare the performance before changing non-accepted plans into accepted plans. A performance verification involves executing a non-accepted plan and a plan chosen from corresponding SQL plan baseline and comparing their performance statistics. If non-accepted plan shows performance improvement, it is changed to an accepted plan.

'YES' (Default) - verifies that a non-accepted plan gives better performance before changing it to an accepted plan

'NO' - directs not to execute plans but only to change non-accepted plans into accepted plans

commit

Specifies whether to update the ACCEPTED status of non-accepted plans from 'NO' to 'YES'.

'YES' (Default) - perform updates of qualifying non-accepted plans and generate a report that shows the updates and the result of performance verification when verify = 'YES'.

'NO' - generate a report without any updates. Note that commit = 'NO' together with verify = 'NO' represents a no-op.

 

Return Values

A CLOB containing a formatted text report showing non-accepted plans in sequence, each with a possible change of its ACCEPTED status, and if verify = 'YES' the result of their performance verification.

Usage Notes

Invoking this subprogram requires the ADMINISTER SQL MANAGEMENT OBJECT privilege.

 

202.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

答案解析:

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

 

热补丁注意事项

• 可能不是所有平台上都有热补丁程序。当前在以下平台上有热补丁程序:

– 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?
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
题目解答: 压缩可用场合 只能 D

 

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?

A. Set the BACKUP_TAPE_IO_SLAVES parameter to FALSE.

B. Set the BACKUP_TAPE_IO_SLAVES parameter to TRUE.

C. Use compression when performing tape backups.

D. Configure multiple SBT channels.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams021.htm#REFRN10009

BACKUP_TAPE_IO_SLAVES specifies whether I/O server processes (also called slaves) are used by Recovery Manager to back up, copy, or restore data to tape. When the value is set to true, Oracle uses an I/O server process to write to or read from a tape device. When the value is set to false (the default), Oracle does not use I/O server process for backups. Instead, the shadow process engaged in the backup accesses the tape device.

Note:

You cannot perform duplexed backups unless you enable this parameter. Otherwise, Oracle returns an error. When this parameter is enabled, Recovery Manager will configure as many server processes as needed for the number of backup copies requested.

 

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?

A. The database instance starts, and Oracle sets the default value of SGA_TARGET to the same value as SGA_MAX_SIZE.

B. The database instance starts, and Oracle automatically tunes memory and allocates 60 percent to the SGA and 40 percent to the PGA.

C. The database instance starts, but Automatic Memory Management is disabled.

D. The database instance will not start because you did not specify the PGA_AGGREGATE_TARGET or SGA_TARGET parameter.

 

 

Answer: B

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

只需要设置一个目标内存大小初始化参数( MEMORY_TARGET )  和一个最大内存大小初始化参数( MEMORY_MAX_TARGET),数据库就会根据处理需求在SGA 与实例 PGA 之间动态交换内存。

自动内存管理是用两个初始化参数进行配置的:

MEMORY_TARGET:动态控制SGA和PGA时,Oracle总共可以使用的共享内存大小,这个参数是动态的,因此提供给Oracle的内存总量是可以动态增大,也可以动态减小的。它不能超过MEMORY_MAX_TARGET参数设置的大小。默认值是0。

MEMORY_MAX_TARGET:这个参数定义了MEMORY_TARGET最大可以达到而不用重启实例的值,如果没有设置MEMORY_MAX_TARGET值,默认等于MEMORY_TARGET的值。

使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。

重启后,会根据实际情况重新动态分配内存。

 

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.
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
题目解答: BD 说法错误

 

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.)

A. issuing the ALTER SYSTEM ENABLE RESUMABLE; statement

B. issuing the ALTER SESSION ENABLE RESUMABLE; statement

C. modifying the RESUMABLE_TIMEOUT initialization parameter to a nonzero value

D. issuing the ALTER SYSTEM SET RESUMABLE_TIMEOUT=<nonzero value>; statement

 

 

Answer: CD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schema.htm#ADMIN11589

 

Setting the RESUMABLE_TIMEOUT Initialization Parameter

You can specify a default system wide timeout interval by setting the RESUMABLE_TIMEOUT initialization parameter. For example, the following setting of the RESUMABLE_TIMEOUT parameter in the initialization parameter file sets the timeout period to 1 hour:

RESUMABLE_TIMEOUT  = 3600

If this parameter is set to 0, then resumable space allocation is disabled even for sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value.

You can also use the ALTER SYSTEM SET statement to change the value of this parameter at the system level. For example, the following statement disables resumable space allocation for all sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value:

ALTER SYSTEM SET RESUMABLE_TIMEOUT=0;

Modifiable

ALTER SESSIONALTER SYSTEM

RESUMABLE_TIMEOUT enables or disables resumable statements and specifies resumable timeout at the system level.

 

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.

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/stats.htm#PFGRF94725

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;

 

210.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答案:防止自动维护任务消耗过多的系统资源,正确。

 

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

B. 10

C. 100

D. NULL

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schema.htm#ADMIN11589

Setting the RESUMABLE_TIMEOUT Initialization Parameter

You can specify a default system wide timeout interval by setting the RESUMABLE_TIMEOUT initialization parameter. For example, the following setting of theRESUMABLE_TIMEOUT parameter in the initialization parameter file sets the timeout period to 1 hour:

RESUMABLE_TIMEOUT  = 3600

If this parameter is set to 0, then resumable space allocation is disabled even for sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value.

You can also use the ALTER SYSTEM SET statement to change the value of this parameter at the system level. For example, the following statement disables resumable space allocation for all sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value:

ALTER SYSTEM SET RESUMABLE_TIMEOUT=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?

A. It will fail because DB_8K_CACHE_SIZE parameter cannot be changed dynamically

B. It will be successful only if the memory is available from the auto tuned components

C. It will fail because an increase in DB_8K_CACHE_SIZE cannot be accommodated within SGA_TARGET

D. It will fail because an increase in the DB_8K_CACHE_SIZE cannot be accommodated within SGA_MAX_SIZE

 

 

Answer: D

答案解析:

注意:这道题没有说明该数据库的标准块是8K。

其实在大多数我们的数据库标准块的大小为8K,所以就有了以下不能更新的问题,

但如果数据库的标准块不是8K,则是可以更改的。只要满足总的不能超过SGA_MAX_SIZE就可以了。

所以D应该算是对的。

 

13:56:20 sys@TEST1107> ALTER SYSTEM SET DB_8K_CACHE_SIZE=140m;

ALTER SYSTEM SET DB_8K_CACHE_SIZE=140m

*

ERROR at line 1:

ORA-32017: failure in updating SPFILE

ORA-00380: cannot specify db_8k_cache_size since 8K is the standard block size

 

[oracle@rtest ~]$ oerr ora 00380

00380, 00000, "cannot specify db_%sk_cache_size since %sK is the standard block size"

// *Cause:  User specified the parameter db_nk_cache_size (where n is one of

//          2,4,8,16,32), while the standard block size for this database is

//          equal to n Kbytes. This is illegal.

// *Action: Specify the standard block size cache using db_cache_size (DEFAULT

//          pool) (and db_recycle_cache_size, db_keep_cache_size if additional

//          buffer pools are required). Do NOT use the corresponding

//          db_nk_cache_size parameter for the standard block size.

 

14:00:02 sys@TEST1107> ALTER SYSTEM SET db_cache_size=140m;

 

System altered.

 

比如说更新其他的非标准块是可以更新的。

14:04:04 sys@TEST1107> alter system set db_16k_cache_size=10m;

 

System altered.

 

因为总的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?

 

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

答案解析:

参考052的91题:http://blog.csdn.net/rlhua/article/details/10906981

题目解答:先 advise 然后 repair

 

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.
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

题目解答: 只有本地管理的临时表空间才能 shrink

 

215.Which two statements regarding the Flashback Table feature are correct? (Choose two.)

A. Flashback Table can be performed on system tables.

B. Flashback Table operation does not shrink the segments.

C. Flashback Table uses log mining to extract SQL_REDO and SQL_UNDO statements.

D. Flashback Table operation acquires exclusive data manipulation language (DML) locks.

 

 

Answer: BD

 

答案解析:

参考:闪回表:http://blog.csdn.net/rlhua/article/details/12404577

 闪回表操作使用u还原数据,不需要用logminer去钻去redo和undo语句。

闪回表:注意事项

• 整个FLASHBACK TABLE语句是在一个事务处理中执行的。将闪回所有指定表,或者不闪回任何指定表。

 • 在执行操作的整个过程中,闪回表会获取对该语句指定的所有表的数据操纵语言(DML) 排它锁。

 • 不会闪回受影响对象的统计信息。

 • 会保留所有现有索引。不会重新创建删除的索引。还会自动保留相关的提交时实体化视图。

 • 只要不违反任何表约束条件,就会闪回FLASHBACK TABLE语句中指定的表。如果在闪回执行期间违反了任何约束条件,则会中止操作,此时表的状态与调用FLASHBACK TABLE语句之前的状态相同。

 • 不能将表闪回至早于执行数据定义语言(DDL) 操作时的某个特定时间,因为执行数据定义语言(DDL) 操作变更了闪回操作中涉及的表的结构或收缩了表。只更改表的存储属性的DDL 语句不受此限制。故闪回表操作不能收缩段。

 • 不能对系统表、远程表和固定表执行闪回表操作。

 

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN12458

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;

/

题目解答 A 说法不全,事件不内联的或基于事件的调度才行 c 说法不全的,必须是轻量作业的 program 或轻量作业
只能 BDE

 

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?

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/install.112/e47798/postcfg.htm#NTDBI2798

 

utlrp.sql

PL/SQL

SYS

Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types.

 

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?

A. The DATA1 tablespace is automatically taken out of backup mode when the instance aborts.

B. If you restart the database, the DATA1 tablespace will be automatically taken out of backup mode when the database is opened.

C. If you restart the database, the DATA1 tablespace will be automatically taken out of backup mode when the database is mounted.

D. If you restart the database, the database will not be opened.

 

 

Answer: D

答案解析:

验证测试:

1、测试users表空间

sys@TEST0924> alter tablespace users begin backup;

Tablespace altered.

2、模拟断电

sys@TEST0924> shutdown abort;

ORACLE instance shut down.

3、尝试启动,不能打开

sys@TEST0924> startup

ORACLE instance started.

 

Total System Global Area 3340451840 bytes

Fixed Size                  2232960 bytes

Variable Size            3204451712 bytes

Database Buffers          117440512 bytes

Redo Buffers               16326656 bytes

Database mounted.

ORA-10873: file 4 needs to be either taken out of backup mode or media recovered

ORA-01110: data file 4: '+DATA/test0924/datafile/users.260.829650045'

4、在mount状态让其结束备份模式

sys@TEST0924> alter tablespace users end backup;

Tablespace altered.

5、打开数据库

sys@TEST0924> alter database open;

Database altered.

 

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_addm.htm#ARPLS65063

 

INSERT_FINDING_DIRECTIVE Procedure

Creates a directive to limit reporting of a specific finding type.

INSERT_FINDING_DIRECTIVE Procedure

This procedure creates a directive to limit reporting of a specific finding type. The directive can be created for a specific task (only when the task is in INITIALstatus), or for all subsequently created ADDM tasks (such as a system directive).

Syntax

DBMS_ADDM.INSERT_FINDING_DIRECTIVE (

   task_name             IN VARCHAR2,

   dir_name              IN VARCHAR2,

   finding_name          IN VARCHAR2,

   min_active_sessions   IN NUMBER := 0,

   min_perc_impact       IN NUMBER := 0);

Parameters

Table 16-12 INSERT_FINDING_DIRECTIVE Procedure Parameters

Parameter

Description

task_name

Name of the task this directive applies to. If the value is NULL, it applies to all subsequently created ADDM Tasks.

dir_name

Name of the directive. All directives must be given unique names.

finding_name

Name of an ADDM finding to which this directive applies. All valid findings names appear in the NAME column of view DBA_ADVISOR_FINDING_NAMES.

min_active_sessions

Minimal number of active sessions for the finding. If a finding has less than this number, it is filtered from the ADDM result.

min_perc_impact

Minimal number for the "percent impact" of the finding relative to total database time in the analysis period. If the finding's impact is less than this number, it is filtered from the ADDM result.

 

Examples

A new ADDM task is created to analyze a local instance. However, it has special treatment for 'Undersized SGA' findings. The result of GET_REPORT shows only an 'Undersized SGA' finding if the finding is responsible for at least 2 average active sessions during the analysis period, and this constitutes at least 10% of the total database time during that period.

var tname VARCHAR2(60);

BEGIN

  DBMS_ADDM.INSERT_FINDING_DIRECTIVE(

   NULL,

   'Undersized SGA directive',

   'Undersized SGA',

   2,

   10);

  :tname := 'my_instance_analysis_mode_task';

  DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);

END;

To see a report containing 'Undersized SGA' findings regardless of the directive:

SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;

 

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
题目解答: A role 也可以的 E 不同应用无法被限制的

 

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?

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_advis.htm#ARPLS65121

 

 

GET_TASK_SCRIPT Function

Creates and returns an executable SQL script of the Advisor task's recommendations in a buffer

SQL Access Advisor

 

GET_TASK_SCRIPT Function

This function creates a SQL*Plus-compatible SQL script and sends the output to file. The script will contain all of the accepted recommendations from the specified task.

Syntax

DBMS_ADVISOR.GET_TASK_SCRIPT (

   task_name          IN VARCHAR2

   type               IN VARCHAR2 := 'IMPLEMENTATION',

   rec_id             IN NUMBER   := NULL,

   act_id             IN NUMBER   := NULL,

   owner_name         IN VARCHAR2 := NULL,

   execution_name     IN VARCHAR2 := NULL,

   object_id          IN NUMBER   := NULL)

RETURN CLOB;

Parameters

Table 18-19 GET_TASK_SCRIPT Function Parameters

Parameter

Description

task_name

The task name that uniquely identifies an existing task.

type

Specifies the type of script to generate. The possible values are IMPLEMENTATION and UNDO.

rec_id

An optional recommendation identifier number that can be used to extract a subset of the implementation script.

A zero or the value DBMS_ADVISOR.ADVISOR_ALL indicates all accepted recommendations would be included. The default is to include all accepted recommendations for the task.

act_id

Optional action identifier number that can be used to extract a single action as a DDL command.

A zero or the value DBMS_ADVISOR.ADVISOR_ALL indicates all actions for the recommendation would be included. The default is to include all actions for a recommendation.

owner_name

An optional task owner name.

execution_name

An identifier of a specific execution of the task. It is needed only for advisors that allow their tasks to be executed multiple times.

object_id

An identifier of an advisor object that can be targeted by the script.

 

Return Values

Returns the script as a CLOB buffer.

Usage Notes

Though the script is ready to execute, Oracle recommends that the user review the script for acceptable locations for new materialized views and indexes.

For a recommendation to appear in a generated script, it must be marked as accepted.

Examples

DECLARE

  task_id NUMBER;

  task_name VARCHAR2(30);

  workload_name VARCHAR2(30);

  buf CLOB;

BEGIN

  task_name := 'My Task';

  workload_name := 'My Workload';

 

  DBMS_ADVISOR.CREATE_TASK(DBMS_ADVISOR.SQLACCESS_ADVISOR, task_id, task_name);

  DBMS_ADVISOR.CREATE_SQLWKLD(workload_name, 'My Workload');

  DBMS_ADVISOR.ADD_SQLWKLD_REF(task_name, workload_name);

  DBMS_ADVISOR.ADD_SQLWKLD_STATEMENT(workload_name, 'MONTHLY', 'ROLLUP',

                                     100,400,5041,103,640445,680000,2,

                                     1,SYSDATE,1,'SH','SELECT AVG(amount_sold)

                                     FROM sh.sales');

  DBMS_ADVISOR.EXECUTE_TASK(task_name);

    buf := DBMS_ADVISOR.GET_TASK_SCRIPT(task_name);

END;

/

 

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?

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

 

-I

Scans disk headers for information rather than extracting the information from an Oracle ASM instance. This option forces non-connected mode.

-G

Restricts results to only those disks that belong to the group specified by diskgroup.

ASMCMD> lsdsk

Path

/dev/asm-diskb

/dev/asm-diskc

/dev/asm-diskd

/dev/asm-diske

 

ASMCMD> lsdsk -I -d DATA

WARNING:option 'd' is deprecated for 'lsdsk'

please use 'G'

 

ASMCMD> lsdsk -I -G DATA

ASMCMD> 

 

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.
B. Take an immediate AWR snapshot.
C. Decrease the window size for the baseline.
D. Decrease the expiration time for the baseline.

 

Answer: A

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?
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

 

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?

 

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_addm.htm#ARPLS65067


实验验证:

sys@TEST1107> VAR tname VARCHAR2(60);

sys@TEST1107> BEGIN :tname := 'my_instance_analysis_mode_task';

  2  DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(:tname,'Sg_directive','SCOTT');

  3  END;

  4  /

 

PL/SQL procedure successfully completed.

 

sys@TEST1107> SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;

ERROR:

ORA-13631: The most recent execution of task my_instance_analysis_mode_task contains no results.

ORA-06512: at "SYS.PRVT_ADVISOR", line 3189

ORA-06512: at "SYS.DBMS_ADVISOR", line 590

ORA-06512: at line 1

 

no rows selected

 

DBMS_ADDM.ANALYZE_INST缺少分析,会报错。

INSERT_SEGMENT_DIRECTIVE Procedure

Creates a directive to prevent ADDM from creating actions to "run Segment Advisor" for specific segments

 

INSERT_SEGMENT_DIRECTIVE Procedure

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).

Syntax

DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE (

   task_name             IN VARCHAR2,

   dir_name              IN VARCHAR2,

   owner_name            IN VARCHAR2,

   object_name           IN VARCHAR2 := NULL,

   sub_object_name       IN VARCHAR2 := NULL);

 

DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE (

   task_name             IN VARCHAR2,

   dir_name              IN VARCHAR2,

   object_number         IN NUMBER);

Parameters

Table 16-14 INSERT_SEGMENT_DIRECTIVE Procedure Parameters

Parameter

Description

task_name

Name of the task this directive applies to. If the value is NULL, it applies to all subsequently created ADDM Tasks.

dir_name

Name of the directive. All directives must be given unique names.

owner_name

Specifies the owner of the segment/s to be filtered. A wildcard is allowed in the same syntax used for "like" constraints.

object_name

Name of the main object to be filtered. Again, wildcards are allowed. The default value of NULL is equivalent to a value of '%'.

sub_object_name

Name of the part of the main object to be filtered. This could be a partition name, or even sub partitions (separated by a '.'). Again, wildcards are allowed. The default value of NULL is equivalent to a value of '%'.

object_number

Object number of the SEGMENT that this directive is to filter, found in views DBA_OBJECTS or DBA_SEGMENTS

 

Examples

A new ADDM task is created to analyze a local instance. However, it has special treatment for all segments that belong to user SCOTT. The result of GET_REPORT does not show actions for running Segment advisor for segments that belong to SCOTT.

var tname VARCHAR2(60);

BEGIN

  DBMS_ADDM.INSERT_SEGMENT_DIRECTIVE(NULL,

                                     'my Segment directive',

                                     'SCOTT');

  :tname := 'my_instance_analysis_mode_task';

  DBMS_ADDM.ANALYZE_INST(:tname, 1, 2);

END;

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

SELECT DBMS_ADVISOR.GET_TASK_REPORT(:tname, 'TEXT', 'ALL') FROM DUAL;

 

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?

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 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_spm.htm#ARPLS68158

LOAD_PLANS_FROM_CURSOR_CACHE Functions

Loads one or more plans present in the cursor cache for a SQL statement

 

LOAD_PLANS_FROM_CURSOR_CACHE Functions

This function loads one or more plans present in the cursor cache for a SQL statement, or a set of SQL statements. It has four overloads: using SQL statement text, using SQL handle, using SQL ID, or using attribute_name and attribute_value pair.

Syntax

DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (

   sql_id            IN  VARCHAR2,

   plan_hash_value   IN  NUMBER   := NULL,

   sql_text          IN  CLOB,

   fixed             IN  VARCHAR2 := 'NO',

   enabled           IN  VARCHAR2 := 'YES')

RETURN PLS_INTEGER;

 

DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (

   sql_id            IN  VARCHAR2,

   plan_hash_value   IN  NUMBER   := NULL,

   sql_handle        IN  VARCHAR2,

   fixed             IN  VARCHAR2 := 'NO',

   enabled           IN  VARCHAR2 := 'YES')

RETURN PLS_INTEGER;

 

DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (

   sql_id            IN  VARCHAR2,

   plan_hash_value   IN  NUMBER   := NULL,

   fixed             IN  VARCHAR2 := 'NO',

   enabled           IN  VARCHAR2 := 'YES')

RETURN PLS_INTEGER;

 

DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE (

   attribute_name   IN VARCHAR2,

   attribute_value  IN VARCHAR2,

   fixed            IN VARCHAR2 := 'NO',

   enabled          IN VARCHAR2 := 'YES')

  RETURN PLS_INTEGER;

Parameters

Table 136-10 LOAD_PLANS_FROM_CURSOR_CACHE Function Parameters

Parameter

Description

sql_id

SQL statement identifier. Identifies a SQL statement in the cursor cache. Note: In the third overload the text of identified SQL statement is extracted from cursor cache and is used to identify the SQL plan baseline into which the plan(s) are loaded. If the SQL plan baseline doesn't exist it is created.

plan_hash_value

Plan identifier. Default NULL means capture all plans present in the cursor cache for the SQL statement identified by SQL_ID.

sql_text

SQL text to use in identifying the SQL plan baseline into which the plans are loaded. If the SQL plan baseline does not exist, it is created. The use of text is crucial when the user tunes a SQL statement by adding hints to its text and then wants to load the resulting plan(s) into the SQL plan baseline of the original SQL statement.

sql_handle

SQL handle to use in identifying the SQL plan baseline into which the plans are loaded. The sql_handlemust denote an existing SQL plan baseline. The use of handle is crucial when the user tunes a SQL statement by adding hints to its text and then wants to load the resulting plan(s) into the SQL plan baseline of the original SQL statement.

fixed

Default 'NO' means the loaded plans are used as non-fixed plans. Value 'YES' means the loaded plans are used as fixed plans and the SQL plan baseline will not be evolved over time.

attribute_name

One of possible attribute names:

SQL_TEXT''

'PARSING_SCHEMA_NAME'

'MODULE'

'ACTION'

attribute_value

Attribute value is used as a search pattern of LIKE predicate if attribute name is 'SQL_TEXT'. Otherwise, it is used as an equality search value. (for example, for specifying attribute_name => 'SQL_TEXT', andattribute_value => '% HR-123 %' means applying SQL_TEXT LIKE '% HR-123 %' as a selection filter. Similarly, specifying attribute_name => 'MODULE', and attribute_value => 'HR' means applying 'MODULE = 'HR' as a plan selection filter). The attribute value is upper-cased except when it is enclosed in double quotes or attribute name is 'SQL_TEXT'.

enabled

Default 'YES' means the loaded plans are enabled for use by the optimizer, It may be used depending on accepted status.

 

Return Values

Number of plans loaded

Usage Notes

Invoking this subprogram requires the ADMINISTER SQL MANAGEMENT OBJECT privilege.

 

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?

A. Set metric threshold

B. Implement Database Resource Manager

C. Enable resumable timeout for user sessions

D. Add directives to Automatic Database Diagnostic Monitor (ADDM)

 

 

Answer: B

答案解析:

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

题意:你打算控制空闲会话阻塞其他会话执行事务。你的要求,在一个指定的时间内,这些会话仍然闲置,会自动终止这些阻塞的会话。

数据库资源管理器提供了空闲时间限制:可以指定会话的空闲时间,超过该时间后将终止会话(MAX_IDLE_TIME)。你可以进一步限制资源管理器,使其只终止阻止其它会话的会话(MAX_IDLE_TIME_BLOCKER)。

 

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(?1-apr-2007?d-mon-yyyy?),

 PARTITION Q2 VALUES LESS THAN (TO_DATE(?1-jul-2007?d-mon-yyyy?),

 PARTITION Q3 VALUES LESS THAN (TO_DATE(?1-oct - 2007?d-mon-yyyy?), 

PARTITION Q4 VALUES LESS THAN  (TO_DATE(?1-jan-2008?d-mon-yyyy?));

 

CREATE TABLE purchase_order_items (

po_id NUMBER(4) NOT NULL, 

product_id NUMBER(6) NOT NULL, 

unit_price NUMBER(8,2), 

quantity NUMBER(8), 

CONSTRAINT po_items_fk FOREIGN KEY (po_id) REFERENCES purchase_orders(po_id)) PARTITION BY REFERENCE(po_items_fk);

 

What are the two consequences of the above statements? (Choose two.)

A. Partitions of PURCHASE_ORDER_ITEMS have system-generated names.

B. Both PURCHASE_ORDERS and PURCHASE_ORDER_ITEMS tables are created with four partitions each.

C. Partitions of the PURCHASE_ORDER_ITEMS table exist in the same tablespaces as the partitions of the PURCHASE_ORDERS table.

D. The PURCHASE_ORDER_ITEMS table inherits the partitioning key from the parent table by automatically duplicating the key columns.

E. Partition maintenance operations performed on the PURCHASE_ORDER_ITEMS table are automatically reflected in the PURCHASE_ORDERS table.

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25523/part_admin001.htm#i1006455

 

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_2005Q2_2005Q3_2005, and Q4_2005, where each partition contains the order_items rows corresponding to orders in the respective parent partition.

Example 4-9 Creating reference-partitioned tables

CREATE TABLE orders

    ( order_id           NUMBER(12),

      order_date         TIMESTAMP WITH LOCAL TIME ZONE,

      order_mode         VARCHAR2(8),

      customer_id        NUMBER(6),

      order_status       NUMBER(2),

      order_total        NUMBER(8,2),

      sales_rep_id       NUMBER(6),

      promotion_id       NUMBER(6),

      CONSTRAINT orders_pk PRIMARY KEY(order_id)

    )

  PARTITION BY RANGE(order_date)

    ( PARTITION Q1_2005 VALUES LESS THAN (TO_DATE('01-APR-2005','DD-MON-YYYY')),

      PARTITION Q2_2005 VALUES LESS THAN (TO_DATE('01-JUL-2005','DD-MON-YYYY')),

      PARTITION Q3_2005 VALUES LESS THAN (TO_DATE('01-OCT-2005','DD-MON-YYYY')),

      PARTITION Q4_2005 VALUES LESS THAN (TO_DATE('01-JAN-2006','DD-MON-YYYY'))

    );

 

CREATE TABLE order_items

    ( order_id           NUMBER(12) NOT NULL,

      line_item_id       NUMBER(3)  NOT NULL,

      product_id         NUMBER(6)  NOT NULL,

      unit_price         NUMBER(8,2),

      quantity           NUMBER(8),

      CONSTRAINT order_items_fk

      FOREIGN KEY(order_id) REFERENCES orders(order_id)

    )

    PARTITION BY REFERENCE(order_items_fk);

If partition descriptors are provided, then the number of partitions described must exactly equal the number of partitions or subpartitions in the referenced table. If the parent table is a composite partitioned table, then the table has one partition for each subpartition of its parent; otherwise the table has one partition for each partition of its parent.

Partition bounds cannot be specified for the partitions of a reference-partitioned table.

The partitions of a reference-partitioned table can be named. If a partition is not explicitly named, then it inherits its name from the corresponding partition in the parent table, unless this inherited name conflicts with an existing explicit name. In this case, the partition has a system-generated name.

Partitions of a reference-partitioned table collocate with the corresponding partition of the parent table, if no explicit tablespace is specified for the reference-partitioned table's partition.

 

229.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

答案解析:

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

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 、AES128、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

B. It retrieves the oldest version of the table from the recycle bin

C. It retrieves the version of the table for which undo information is available

D. It returns an error because the table name is not specified as per the names in the OBJECT_NAME column

 

 

Answer: A

答案解析:

默认还原最近的。

 

231.You upgraded Oracle Database 10g to Oracle Database 11 g. 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
题目解答 B

 

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

答案解析:

参考: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.

 

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?

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 中。

此方法提供了计划植入进程的最佳形式,因为它有助于在保留数据库升级所带来的性能改进的同时,防止性能回归。

 

234.Which type of backup contains only the blocks that have changed since the last level 0 incremental backup?

A. a cumulative level 1 backup

B. a differential level 1 backup

C. a full backup

D. a whole backup

 

 

Answer: A

答案解析:

如图:

 

 

 

增量累积备份参考:http://blog.csdn.net/rlhua/article/details/11763671

 

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.)

A. The databases configured to use the ASM instance are mounted

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

D. ASM discovers and examines the contents of all files that are in the paths specified in the

ASM_DISKGROUPS initialization parameters

 

 

Answer: BC

答案解析:

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

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

 

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?

A. only the control file, the current SPFILE, and data files

B. only the current SPFILE and data files if autobackup is disabled

C. only the data files and the archived redo logs

D. the control file, current SPFILE file, data files, and archived redo logs

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV002

 

CONFIGURE CONTROLFILE AUTOBACKUP ON

BACKUP DATABASE PLUS ARCHIVELOG;

通过以上,可以备份控制文件,spfile,数据文件和归档日志文件。

 

The RMAN command for making backups is BACKUP. The RMAN BACKUP command supports backing up the following types of files:

Datafiles and control files

Server parameter file

Archived redo logs

RMAN backups

Although the database depends on other types of files, such as network configuration files, password files, and the contents of the Oracle home, you cannot back up these files with RMAN. Likewise, some features of Oracle Database, such as external tables, may depend upon files other than the datafiles, control files, and redo log. RMAN cannot back up these files. Use some non-RMAN backup solution for any files not in the preceding list.

When you execute the BACKUP command in RMAN, the output is always either one or more backup sets or one or more image copies. A backup set is an RMAN-specific proprietary format, whereas an image copy is a bit-for-bit copy of a file. By default, RMAN creates backup sets.

 

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.

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

答案解析:

参考: OCP-1Z0-052-V8.02-92题:http://blog.csdn.net/rlhua/article/details/10908943

 

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN13483

 

B错,应该为 the text alert log file is /u01/oracle/diag/rdbms/orclbi/orclbi/trace

Subdirectory Name

Contents

alert

The XML-formatted alert log

cdump

Core files

incident

Multiple subdirectories, where each subdirectory is named for a particular incident, and where each contains dumps pertaining only to that incident

trace

Background and server process trace files, SQL trace files, and the text-formatted alert log

(others)

Other subdirectories of ADR home, which store incident packages, health monitor reports, and other information

 

Viewing ADR Locations with the V$DIAG_INFO View

The V$DIAG_INFO view lists all important ADR locations for the current Oracle Database instance.

SELECT * FROM V$DIAG_INFO;

 

INST_ID NAME                  VALUE

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

      1 Diag Enabled          TRUE

      1 ADR Base              /u01/oracle

      1 ADR Home              /u01/oracle/diag/rdbms/orclbi/orclbi

      1 Diag Trace            /u01/oracle/diag/rdbms/orclbi/orclbi/trace

      1 Diag Alert            /u01/oracle/diag/rdbms/orclbi/orclbi/alert

      1 Diag Incident         /u01/oracle/diag/rdbms/orclbi/orclbi/incident

      1 Diag Cdump            /u01/oracle/diag/rdbms/orclbi/orclbi/cdump

      1 Health Monitor        /u01/oracle/diag/rdbms/orclbi/orclbi/hm

      1 Default Trace File    /u01/oracle/diag/rdbms/orclbi/orclbi/trace/orcl_ora_22769.trc

      1 Active Problem Count  8

      1 Active Incident Count 20

The following table describes some of the information displayed by this view.

Table 9-3 Data in the V$DIAG_INFO View

Name

Description

ADR Base

Path of ADR base

ADR Home

Path of ADR home for the current database instance

Diag Trace

Location of background process trace files, server process trace files, SQL trace files, and the text-formatted version of the alert log

Diag Alert

Location of the XML-formatted version of the alert log

Default Trace File

Path to the trace file for the current session

 

 

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.

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

答案解析:

启用SecureFiles  存储

使用DB_SECUREFILE 初始化参数,数据库管理员(DBA) 可确定SecureFiles  的使用情况,其中有效值为:

• ALWAYS :尝试将所有LOB 创建为SecureFile LOB,但是仅可将自动段空间管理(ASSM)  表空间外的任何 LOB 创建为BasicFile LOB 

• FORCE:强制将所有LOB 创建为SecureFile LOB 

• PERMITTED:允许创建SecureFiles (默认值)

• NEVER:禁止创建SecureFiles

• IGNORE :禁止创建SecureFiles ,并忽略使用SecureFiles  选项强制创建BasicFiles 而导致的任何错误

如果指定了NEVER,则任何指定为SecureFiles  的LOB 均被创建为BasicFiles。如果对BasicFiles 使用任何SecureFiles  特定的存储选项和功能(如压缩、加密和取消重复),则会导致异常错误。将对任何未指定的存储选项使用BasicFiles 默认值。如果指定了ALWAYS ,则系统中创建的所有LOB 均会被创建为SecureFiles 。必须在ASSM  表空间中创建LOB ,否则会发生错误。将忽略所有指定的BasicFiles 存储选项。可以使用ALTER SYSTEM 命令更改所有存储的SecureFiles  默认值,如幻灯片中所示。也可以通过单击“Server (服务器)”选项卡中的“Initialization Parameters (初始化参数)”链接来使用Enterprise Manager 设置参数。

 

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?

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.

 

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.

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90048

 

keepOption

Overrides any configured retention policy for this backup so that the backup is not considered obsolete, as shown in Example 2-26.

You can use the KEEP syntax to generate archival database backups that satisfy business or legal requirements. The KEEP setting is an attribute of the backup set (not individual backup piece) or image copy.

Note: You cannot use KEEP with BACKUP BACKUPSET.

With the KEEP syntax, you can keep the backups so that they are considered obsolete after a specified time (KEEP UNTIL), or make them never obsolete (KEEP FOREVER). As shown in Example 2-27, you must be connected to a recovery catalog when you specify KEEP FOREVER.

Note: You can use CHANGE to alter the status of a backup generated with KEEP.

See Also: keepOption for more information about backups made with the KEEP option

 

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

B. The recovery catalog is empty

C. The base recovery catalog must be dropped

D. A target database is registered in the recovery catalog

 

 

Answer: A

答案解析:

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

在创建VPC时,首先是目录所有者来创建基本目录,故选A。

 

 

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

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

答案解析:

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

 

 

在“View and Manage Failures(查看和管理故障)”页上单击“Advise(建议)”按钮后,数据恢复指导会生成一个手动核对清单。可显示两种类型的故障。

• 需要人工干预的故障:例如,未插入磁盘电缆的连接故障。

• 可通过撤消以前的错误操作快速修复的故障:例如,如果错误地重命名了数据文件,则与从备份启动RMAN 还原相比,将该文件重命名回以前的名称可以更快地进行修复。

 

244.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 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e23633/upgrade.htm#UPGRD12408

 

The UPGRADE keyword enables you to open a database based on an earlier Oracle Database release. It also restricts logons to AS SYSDBA sessions, disables system triggers, and performs additional operations that prepare the environment for the upgrade.

参考:http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve045.htm#SQPUG128

 

UPGRADE

Starts the database in OPEN UPGRADE mode and sets system initialization parameters to specific values required to enable database upgrade scripts to be run. UPGRADE should only be used when a database is first started with a new version of the Oracle Database Server.

See the Oracle Database Upgrade Guide for details about preparing for, testing and implementing a database version upgrade.

When run, upgrade scripts transform an installed version or release of an Oracle database into a later version, for example, to upgrade an Oracle9i database to Oracle Database 10g. Once the upgrade completes, the database should be shut down and restarted normally.

 

245.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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e10765/dom_idx.htm#ADDCI4490

 

从以下官方文档得知,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.传统的分区修剪和智能化分区连接不支持这些表。

 

Using System Partitioning

System Partitioning enables you to create a single table consisting of multiple physical partitions. System partitioning does not use partitioning keys. Instead, it creates the number of partitions specified. Therefore, the resulting partitions have no bounds (range), values (list), or a partitioning method.

Because there are no partitioning keys, you must explicitly map the distributed table rows to the destination partition. When inserting a row, for example, you must use the partition extended syntax to specify the partition to which a row must be mapped.

Advantages of System Partitioned Tables

The main advantages of system-partitioned tables is that it can be used to create and maintain tables that are equipartitioned with respect to another table. For example, this means that a dependent table could be created as a system-partitioned table, with the same number of partitions as the base table. It follows that such a system-partitioned table can be used to store index data for a domain index, with the following implications:

Pruning follows the base table pruning rules: when a partition is accessed in the base table, the corresponding partition can be accessed in the system-partitioned table.

DDLs of the base table can be duplicated on the system-partitioned table. Therefore, if a partition is dropped on the base table, the corresponding partition on the system-partitioned table is dropped automatically.

 

Creating a System-Partitioned Table

Example 8-16 describes how to create a system-partitioned table with four partitions. Each partition can have different physical attributes.

Example 8-16 Creating a System-Partitioned Table

CREATE TABLE SystemPartitionedTable (c1 integer, c2 integer)

PARTITION BY SYSTEM

(

  PARTITION p1 TABLESPACE tbs_1,

  PARTITION p2 TABLESPACE tbs_2,

  PARTITION p3 TABLESPACE tbs_3,

  PARTITION p4 TABLESPACE tbs_4

);

 

Inserting Data into a System-Partitioned Table

Example 8-17 demonstrates how to insert data into a system-partitioned table. 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. The tuple (4,5) could have been inserted into any of the four partitions created inExample 8-16DATAOBJ_TO_PARTITION can also be used, as demonstrated by Example 8-18.

Example 8-17 Inserting Data into a System-Partitioned Table

INSERT INTO SystemPartitionedTable PARTITION (p1) VALUES (4,5);

Example 8-18 Inserting Data into a System-Partitioned Table Using DATAOBJ_TO_PARTITION

INSERT INTO SystemPartitionedTable PARTITION

  (DATAOBJ_TO_PARTITION (

base_table, :physical_partid

))

  VALUES (...);

Note that the first line of code shows how to insert data into a named partition, while the second line of code shows that data can also be inserted into a partition based on the partition's order. The support for bind variables, illustrated on the third code line, is important because it allows cursor sharing betweenINSERT statements.

 

Deleting and Updating Data in a System-Partitioned Table

While delete and update operations do not require the partition extended syntax, Oracle recommends that you use it if at all possible. Because there is no partition pruning, the entire table is scanned to execute the operation if the partition-extended syntax is omitted. This highlights the fact that there is no implicit mapping between the rows and the partitions.

 

Supporting Operations with System-Partitioned Tables

The following operations continue to be supported by system partitioning:

Partition maintenance operations and other DDLs, with the exception of:

ALTER INDEX SPLIT PARTITION

ALTER TABLE SPLIT PARTITION

CREATE TABLE (as SELECT)

Creation of local indexes, with the exception of unique local indexes because they require a partitioning key D正确

Creation of local bitmapped indexes

Creation of global indexes

All DML operations

INSERT AS SELECT operations with partition extended syntax, as shown in Example 8-19:

Example 8-19 Inserting Data into a Particular Partition of a Table

INSERT INTO TableName

 

  PARTITION (

 

PartitionName

|

    DATAOBJ_TO_PARTITION(

base_table, :physical_partid

))

  AS

SubQuery

The following operations are no longer supported by system partitioning because system partitioning does not use a partitioning method, and therefore does not distribute rows to partitions.

CREATE TABLE AS SELECT An alternative approach is to first create the table, and then insert rows into each partition.

INSERT INTO TableName AS SubQuery

 

 

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.)
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

247.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

 

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 RETENTION POLICY TO RECOVFRY WINDOW OF 7 DAYS;

After configuring the recovery window, you performed the database backup as follows:

A. Backup RB1 at log sequence number 12871 on 5th Jan

B. Backup RB2 at log sequence number 15622 on 12th Jan

C. Backup RB3 at log sequence 16721 on 15th Jan

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV89437

这道题的答案没理解到什么,不过知道CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;是什么意思就可以了。

 

Configuring a Recovery Window-Based Retention Policy

The RECOVERY WINDOW parameter of the CONFIGURE command specifies the number of days between the current time and the earliest point of recoverability. RMAN does not consider any full or level 0 incremental backup as obsolete if it falls within the recovery window. Additionally, RMAN retains all archived logs and level 1 incremental backups that are needed to recover to a random point within the window.

Run the CONFIGURE RETENTION POLICY command at the RMAN prompt. This example ensures that you can recover the database to any point within the last week:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

RMAN does not automatically delete backups rendered obsolete by the recovery window. Instead, RMAN shows them as OBSOLETE in the REPORT OBSOLETE output and in the OBSOLETE column of V$BACKUP_FILES. RMAN deletes obsolete files if you run the DELETE OBSOLETE command.

 

 

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.)

A. FREE_SPACE indicates only the space that is currently unallocated.

B. ALLOCATED_SPACE indicates only the space currently allocated and in use.

C. FREE_SPACE indicates only the space that is currently allocated and available for reuse.

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_5062.htm#REFRN23627

 

sys@TEST1107> SELECT * FROM dba_temp_free_space;

 

TABLESPACE_NAME                TABLESPACE_SIZE     ALLOCATED_SPACE         FREE_SPACE

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

TEMP                                              30408704                30408704                               29360128

 

DBA_TEMP_FREE_SPACE displays temporary space usage information at tablespace level.

Column

Datatype

NULL

Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the tablespace

TABLESPACE_SIZE

NUMBER

 

Total size of the tablespace, in bytes

ALLOCATED_SPACE

NUMBER

 

Total allocated space, in bytes, including space that is currently allocated and used and space that is currently allocated and available for reuse

FREE_SPACE

NUMBER

 

Total free space available, in bytes, including space that is currently allocated and available for reuse and space that is currently unallocated

 

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?

A. Create both jobs by using events raised by the scheduler

B. Create both jobs by using events raised by the application

C. Create a job to rebuild indexes by using events arised by the application and then create another job to perform bulk load by using events raised by the scheduler

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN12361

 

从以下可知,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.

两个都是基于事件的。

 

About Events

An event is a message sent by one application or system process to another to indicate that some action or occurrence has been detected. An event israised (sent) by one application or process, and consumed (received) by one or more applications or processes.

There are two kinds of events consumed by the Scheduler:

Events raised by your application

An application can raise an event to be consumed by the Scheduler. The Scheduler reacts to the event by starting a job. For example, when an inventory tracking system notices that the inventory has gone below a certain threshold, it can raise an event that starts an inventory replenishment job.

See "Starting Jobs with Events Raised by Your Application".

File arrival events raised by a file watcher

You can create a file watcher—a Scheduler object introduced in Oracle Database 11g Release 2—to watch for the arrival of a file on a system. You can then configure a job to start when the file watcher detects the presence of the file. For example, a data warehouse for a chain of stores loads data from end-of-day revenue reports uploaded from the point-of-sale systems in the stores. The data warehouse load job starts each time a new end-of-day report arrives.

See "Starting a Job When a File Arrives on a System"

 

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.

D. They overwrite all stored scripts in the RCO11 catalog with the same name as that in the RCAT10 catalog.

 

 

Answer: ABC

答案解析:

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

使用IMPORT CATALOG命令可将元数据从一个恢复目录方案导入至其它目录方案中。如果创建了不同版本的目录方案来存储多个目标数据库的元数据,则使用此命令可以为所有数据库维护单个目录方案。

RMAN> CONNECT CATALOG rco11/password@catdb

1. RMAN 必须连接到需要将目录数据导入到的目标恢复目录,例如rco11 方案。

注:源恢复目录方案的版本必须等于RMAN 可执行文件的当前版本。导入早期版本的目录之前,必须将早期版本升级至RMAN 可执行文件的版本。

RMAN> IMPORT CATALOG rcat10/oracle@inst1;

2. 在本例中,ract10用户在inst1数据库中拥有一个RMAN 目录。你希望RMAN 导入所有注册的数据库并在源目录中注销这些数据库。

即是说,在RACT10目录中所有所注册的数据库到导入到rco11目录中,然后注销在ract10目录中所注册的数据库。

 

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

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95122

 

15.2.1 Capturing SQL Plan Baselines

During the SQL plan baseline capture phase, the database detects plan changes and records the new plan so that it can be evolved (verified) by the database administrator. To this end, the database maintains a plan history for individual SQL statements. Because ad hoc SQL statements do not repeat and thus do not suffer performance degradation, the database maintains plan history only for repeatable SQL statements.

To recognize repeatable SQL statements, the database maintains a statement log that contains the SQL ID of various SQL statements that the optimizer has evaluated. The database recognizes a SQL statement as repeatable when it is parsed or executed again after it has been logged.

For each repeatable SQL statement, the database maintains a plan history that contains all plans generated by the optimizer. The set of all accepted plans in the plan history is the SQL plan baseline.

You can configure the SQL Plan Baseline Capture phase for automatic capture of plan history and SQL plan baselines for repeatable SQL statements. Alternatively, you can manually load plans as SQL plan baselines.

 

15.6 SQL Management Base

The SQL management base (SMB) is a part of the data dictionary that resides in the SYSAUX tablespace. It stores statement logs, plan histories, SQL plan baselines, and SQL profiles. To allow weekly purging of unused plans and logs, the SMB uses automatic space management.

You can also add plans manually to the SMB for a set of SQL statements. This feature is especially useful when upgrading the database from a version before Oracle Database 11g because it helps to minimize plan regressions resulting from the use of a new optimizer version.

Because the SMB is located entirely within SYSAUX, the database does not use SQL plan management and SQL tuning features when this tablespace is unavailable.

 

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?

A. The tuned plan is not added to the SQL plan baseline.

B. The tuned plan is added to the fixed SQL plan baseline as a fixed plan.

C. The tuned plan is added to the fixed SQL plan baseline as a nonfixed plan.

D. The tuned plan is added to a new nonfixed SQL plan baseline as a nonfixed plan.

 

 

Answer: C

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95120

 

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

255.Which two statements about the SQL Management Base (SMB) are true? (Choose two.)

A. It contains only SQL profiles generated by SQL Tuning Advisor.

B. It stores plans generated by the optimizer using a stored outline.

C. It is part of the data dictionary and stored in the SYSAUX tablespace.

D. It is part of the data dictionary and stored in the SYSTEM tablespace.

E. It contains the statement log, the plan history, plan baselines, and SQL profiles.

 

 

Answer: CE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95122

 

 

The SQL management base (SMB) is a part of the data dictionary that resides in the SYSAUX tablespace. It stores statement logs, plan histories, SQL plan baselines, and SQL profiles. To allow weekly purging of unused plans and logs, the SMB uses automatic space management.

You can also add plans manually to the SMB for a set of SQL statements. This feature is especially useful when upgrading the database from a version before Oracle Database 11g because it helps to minimize plan regressions resulting from the use of a new optimizer version.

Because the SMB is located entirely within SYSAUX, the database does not use SQL plan management and SQL tuning features when this tablespace is unavailable.

 

 

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?

A. It produces an error because data already exists in the table.

B. It produces an error because compression can be enabled at table creation only.

C. It compresses all data added or modified henceforth but the existing data in the table is not compressed immediately.

D. It immediately compresses all existing data as well as new data, resulting from either fresh additions or modifications to existing data.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_7002.htm#SQLRF54485

 

When you enable table compression by specifying COMPRESS FOR OLTP, you enable OLTP table compression. Oracle Database compresses data during all DML operations on the table. This form of compression is recommended for OLTP environments.

Tables with COMPRESS FOR OLTP or NOCOMPRESS use the PCTFREE default value of 10, to maximize compress while still allowing for some future DML changes to the data, unless you override this default explicitly.

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.)

A. flashback query

B. distributed transactions

C. logging in and logging out of sessions

D. all DDL statements having bind variables

E. direct path load of data from external files

 

 

Answer: CD

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41481/dbr_capture.htm#RATUG115

排除法,选CD

同675题:http://blog.csdn.net/rlhua/article/details/14054693

 

The following types of user sessions and client requests are not supported by Database Replay:

Direct path load of data from external files using utilities such as SQL*Loader

Non-PL/SQL based Advanced Queuing (AQ)

Flashback queries

Oracle Call Interface (OCI) based object navigations

Non SQL-based object access

Distributed transactions

Any distributed transactions that are captured will be replayed as local transactions.

XA transactions

XA transactions are not captured or replayed. All local transactions are captured.

JAVA_XA transactions

If the workload uses the JAVA_XA package, JAVA_XA function and procedure calls are captured as normal PL/SQL workload. To avoid problems during workload replay, consider dropping the JAVA_XA package on the replay system to enable the replay to complete successfully.

Database Resident Connection Pooling (DRCP)

Workloads using OUT binds

Multi-threaded Server (MTS) and shared server sessions with synchronization mode set to OBJECT_ID

Migrated sessions

The workload is captured for migrated sessions. However, user logins or session migration operations are not captured. Without a valid user login or session migration, the replay may cause errors because the workload may be replayed by a wrong user.

Typically, Database Replay refrains from capturing these types of non-supported user sessions and client requests. Even when they are captured, Database Replay will not replay them. Therefore, it is usually not necessary to manually filter out non-supported user sessions and client requests. In cases where they are captured and found to cause errors during replay, consider using workload capture filters to exclude them from the workload.

 

258.Which two statements are true regarding the SQL Repair Advisor? (Choose two.)
A. The SQL Repair Advisor can be invoked to tune the performance of the regressed SQL statements.
B. The SQL Repair Advisor can be invoked even when the incident is not active for a SQL statement crash.
C. The SQL Repair Advisor is invoked by the Health Monitor when it encounters the problematic SQL statement.
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

259.Which setting enables the baselines by default in Oracle Database 11g?
A. setting the STATISTICS_LEVEL parameter to TYPICAL
B. adding filters to the Automatic Database Diagnostic Monitor (ADDM)
C. enabling Automated Maintenance Task using Oracle Enterprise Manager
D. setting the OPTIMIZER_USE_PENDING_STATISTICS parameter to TRUE

 

Answer: A

 

260.Which two activities are NOT supported by the Data Recovery Advisor? (Choose two.)

A. Diagnose and repair a data file corruption offline.

B. Diagnose and repair a data file corruption online.

C. Diagnose and repair failures on a standby database.

D. Recover from failures in the Real Application Cluster (RAC) environment.

 

 

Answer: CD

答案解析:

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

Data Recovery Advisor支持的数据库配置:

– 单实例

– 非RAC

– 支持故障转移到备用数据库,但不支持分析和修复备用数据库

 

261.In which cases is reference partitioning effective in enhancing performance?
A. It is effective only in partition pruning.
B. It is effective only in partitionwise joins provided that the query predicates are different from the partitioning key.
C. It is effective in both partition pruning as well as partitionwise joins provided that the query predicates are identical to the partitioning key.
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

 

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

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF008

 

8.1 Overview of SQL Access Advisor

Materialized views, partitions, and indexes are essential when tuning a database to achieve optimum performance for complex, data-intensive queries. SQL Access Advisor helps you achieve your performance goals by recommending the proper set of materialized views, materialized view logs, partitions, and indexes for a given workload. Understanding and using these structures is essential when optimizing SQL as they can result in significant performance improvements in data retrieval. The advantages, however, do not come without a cost. Creation and maintenance of these objects can be time consuming, and space requirements can be significant. In particular, partitioning of an unpartitioned base table is a complex operation that must be planned carefully.

 

 

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?
A. The database must be running in ARCHIVELOG mode.
B. No special setup is required, and the feature is enabled by default.
C. The path for the Automatic Diagnostic Repository (ADR) must be configured with the DIAGNOSTIC_DEST initialization parameter.
D. The Enterprise Manager Support Workbench can be enabled only if the background process manageability monitor (MMON) is configured.
E. Select the Enable option in the Oracle Configuration Manager Registration window during the installation of the Oracle Database 11 g 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

 

 

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta027.htm#RCMRF132

排除法:BC所表达的意思都是list命令能列出在磁盘上能被删除的备份集等。即obsolete状态。而obsolete状态是用report obsolete列出的。

Table 2-24 List of Stored Scripts in the Recovery Catalog (LIST SCRIPT NAMES)

Column

Indicates

Script Name

The name of the stored script.

Description

The comment provided when the script was created. 

 

EXPIRED

Displays backup sets, proxy copies, and image copies marked in the repository as EXPIRED, which means they were not found. See Table 2-8, "List of Backup Sets (for datafile backup sets)" for a description of the output.

To ensure that LIST EXPIRED shows up-to-date output, use a CROSSCHECK command periodically. When you use aCROSSCHECK command, RMAN searches disk and tape for backups and copies recorded in the repository. If it does not find them, then it updates their repository records to status EXPIRED.

 

 

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.
B. Only the procedure and function become invalid and must be recompiled.
C. Only the view becomes invalid and gets automatically revalidated the next time it is used.
D. Only the procedure and function become invalid and get automatically revalidated the next time they are called.

 

Answer: A
题目解答 A
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.
B. The calibration process runs successfully and populates all the bind variables.

C .The calibration process runs successfully but the latency time is not computed.
D. The calibration process runs successfully but only the latency time is computed.

 

Answer: A

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?
A. Set a threshold for the default system-defined moving window baseline.
B. Add directives to the Automatic Database Diagnostic Monitor (ADDM).
C. Modify the profile for the targeted users for which control needs to be imposed.
D. Implement the database resource manager to add the SWITCH_IO_REQS and SWITCH_GROUP
directives.

 

Answer: D

 

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.RMAN> run

{

SET UNTIL TIME 'Nov 15 2007 11:00:00';

RESTORE DATABASE;

RECOVER DATABASE USING BACKUP CONTROLFILE;

}

C.RMAN> run

{

RESTORE DATABASE;

RECOVER DATABASE UNTIL TIME 'Nov 15 2007 11:00:00';

}

D.RMAN> run

{

RESTORE TABLESPACE user_data;

RECOVER TABLESPACE user_data UNTIL TIME 'Nov 15 2007 11:00:00';

}

 

 

Answer: A

答案解析:

答案解析:

参考:执行时间点恢复:http://blog.csdn.net/rlhua/article/details/12346829

可以通过以下步骤执行服务器管理的时间点恢复。数据库必须处于ARCHIVELOG模式。

1.确定还原目标。这可以是日期和时间、SCN、还原点或日志序列号。例如,如果你知道某些错误事务处理是在昨天下午3:00 提交的,则可以选择昨天下午2:59 作为目标还原点时间。

2.设置国家语言支持(NLS) 操作系统环境变量,确保为RMAN 提供的时间常量的格式是正确的。以下是一些示例设置:

$ export NLS_LANG = american_america.us7ascii

$ export NLS_DATE_FORMAT = "yyyy-mm-dd:hh24:mi:ss"

3.装载数据库。如果数据库已打开,则必须先将其关闭,如本例所示:

RMAN> shutdown immediate

RMAN> startup mount

4.创建一个RUN块并运行该块。RECOVER和RESTORE命令应位于同一个RUN块中,这样UNTIL设置可以同时应用于两者。例如,如果选择恢复到特定SCN,则RESTORE命令需要知道该值,以便可以从足够早的备份(即该SCN 之前的备份)还原文件。

以下是RUN块的一个示例:

RUN

{

SET UNTIL TIME '2007-08-14:21:59:00';

RESTORE DATABASE;

RECOVER DATABASE;

}

5.打开数据库进行读/写操作时,会立即完成刚刚执行的还原。因此,先先在READ ONLY模式下打开数据库并查看某些数据,检查恢复操作是否符合预期结果。

RMAN> SQL 'ALTER DATABASE OPEN READ ONLY';

6.如果对恢复结果感到满意,则使用RESETLOGS选项打开数据库,如下所示:

RMAN> ALTER DATABASE OPEN RESETLOGS;

 

269.Examine the following set of RMAN commands:

RMAN> CONFIGURE CHANNEL dc1 DEVICE TYPE DISK FORMAT ?/u02 /backup/ %U' ";

RMAN> RUN

(

ALLOCATE CHANNEL Chi DEVICE TYPE DISK;

EXECUTE SCRIPT full_backup;

)

Which statement is true when the RMAN RUN block Is executed?

A. The execution of the script fails because multiple channels cannot coexist.

B. The script is executed and both the channels are used for the script execution.

C. The new channel, CHI, is Ignored because a channel has been configured already.

D. ration parameter DCI is overridden because a new channel is allocated in RMAN RUN block.

 

 

Answer: D

答案解析:

执行时,使用run块里面的语句来执行,而run块里面的分配的通道是 Chi ,所以,在执行full_backup这个脚本时,使用Chi通道,之前配置的dc1通道被覆盖了

 

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

E. Automatic Database Diagnostics Monitor

 

 

Answer: ACD

答案解析:

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

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

 

题问:以下哪种任务是自动维护任务的一部分,默认情况下自动运行的?

 

自动维护任务:是在创建数据库时自动创建的,并由调度程序进行管理。默认情况下,它会收集数据库中优化程序统计信息缺失或已过时的所有对象的统计信息。可以通过“Automatic Maintenance Tasks(自动维护任务)”页更改默认配置。

 

点击配置后,可见这三个任务默认都是启用的,当然也可以自动配置。

 

 

271.Examine the output of the query that you executed to list the objects in the recycle bin:

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?

A. All three tables in the recycle bin are purged

B. Only the table with the oldest DROPSCN is purged

C. The command returns an error because multiple entries with the same name exist in the recycle bin

D. Only the table with the latest DROPSCN is purged

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9018.htm#SQLRF55167

 

TABLE or INDEX

Specify the name of the table or index in the recycle bin that you want to purge. You can specify either the original user-specified name or the system-generated name Oracle Database assigned to the object when it was dropped.

If you specify the user-specified name, and if the recycle bin contains more than one object of that name, then the database purges the object that has been in the recycle bin the longest.

System-generated recycle bin object names are unique. Therefore, if you specify the system-generated name, then the database purges that specified object.

When the database purges a table, all table partitions, LOBs and LOB partitions, indexes, and other dependent objects of that table are also 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?

A. After two days, a backup will be marked obsolete

B. After two days, a backup will be deleted from the media

C. If the RMAN repository has records of two or more recent backups of a file, then older backups will be deleted from the media.

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

答案解析:

Configuring a Redundancy-Based Retention Policy

The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many full or level 0 backups of each data file and control file that RMAN should keep. If the number of full or level 0 backups for a specific data file or control file exceeds the REDUNDANCY setting, then RMAN considers the extra backups as obsolete. The default retention policy is REDUNDANCY 1.

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#i1019345

 

273.Which statements are true regarding the system-defined moving window baseline in Oracle Database 11g? (Choose all that apply.)

A. It does not allow you to change the moving window size.

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.

D. It is created when the first snapshot is collected by the Automatic Workload Repository (AWR).

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/autostat.htm#PFGRF94179

 

 

Oracle Database automatically maintains a system-defined moving window baseline. The default window size for the system-defined moving window baseline is the current AWR retention period, which by default is 8 days. If you are planning to use adaptive thresholds, consider using a larger moving window—such as 30 days—to accurately compute threshold values. You can resize the moving window baseline by changing the number of days in the moving window to a value that is equal to or less than the number of days in the AWR retention period. Therefore, to increase the size of a moving window, you must first increase the AWR retention period accordingly.

 

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?

A. statistics recommendations

B. SQL profile recommendations

C. index-related recommendations

D. restructuring of SQL recommendations

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/sql_tune.htm#PFGRF95161

 

 SQL Profile Recommendations

During SQL tuning, you select a statement for automatic tuning and run SQL Tuning Advisor. The database can profile the following types of statement:

DML statements (SELECTINSERT with a SELECT clause, UPDATE, and DELETE)

CREATE TABLE statements (only with the AS SELECT clause)

MERGE statements (the update or insert operations)

SQL Tuning Advisor invokes Automatic Tuning Optimizer to generate recommendations. Recommendations to accept SQL profiles occur in a finding.

 

 

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.The following command is executed to create the baseline template:

SQL> EXECUTE

DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE_TEMPLATE(START_TIME=>TO_TIESTAMP(SYSDATE+2),

END_TIME=>TO_TIMESTAMP(SYSDATE+10),

BASELINE_NAME=>'Mybase4',

TEMPLATE_NAME=>'Mytemp4',

EXPIRATION=>NULL);

Which statement is true about the effect of the above command?

A. It creates a baseline template that never expires.

B. It produces an error because no snapshot information is provided to create the baseline.

C. It creates a baseline template that expires after the Automatic Workload Repository (AWR) retention period.

D. It creates a repeating baseline template that repeats after the Automatic Workload Repository (AWR) retention period.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_workload_repos.htm#ARPLS69131

 

Parameters

Table 162-24 CREATE_BASELINE_TEMPLATE Procedure Parameters

Parameter

Description

start_time

Start Time for the baseline to be created'

end_time

End Time for the baseline to be created

baseline_name

Name of baseline to be created

template_name

Name for the template

expiration

Expiration in number of days for the baseline. If NULL, then expiration is infinite, meaning do not drop baseline ever. Defaults to NULL

dbid

Database Identifier for baseline. If NULL, this takes the database identifier for the local database. Defaults toNULL.

day_of_week

Day of week that the baseline should repeat on. Specify one of the following values: SUNDAYMONDAYTUESDAY,WEDNESDAYTHURSDAYFRIDAYSATURDAY.

hour_in_day

Value of 0-23 to specify the Hour in the Day the baseline should start

duration

Duration (in number of hours) after hour in the day that the baseline should last

baseline_name_prefix

Name for baseline prefix. When creating the baseline, the name of the baseline will be the prefix appended with the date information.

 

 

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?

A. Perform EXPORT, DROP, and IMPORT operations on the BOOKINGS table sequentially

B. Shrink the BOOKINGS table by using the ALTER TABLE... SHRINK SPACE command

C. Move the BOOKINGS table to a different location by using the ALTER TABLE... MOVE command

D. Deallocate the space in the BOOKINGS table by using the ALTER TABLE ... DEALLOCATE UNUSED

command

 

 

Answer: B

答案解析:

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

使用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.)

A. It stores only the temporary table but not its indexes.

B. It stores both the temporary table as well as its indexes.

C. It must be a nondefault temporary tablespace for the database.

D. It can be a default or nondefault temporary tablespace for the database.

E. It must be the default temporary tablespace of the user who issues the command.

 

 

Answer: BD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN11633

 

Creating a Temporary Table

Temporary tables are useful in applications where a result set is to be buffered (temporarily persisted), perhaps because it is constructed by running multiple DML operations. For example, consider the following:

A Web-based airlines reservations application allows a customer to create several optional itineraries. Each itinerary is represented by a row in a temporary table. The application updates the rows to reflect changes in the itineraries. When the customer decides which itinerary she wants to use, the application moves the row for that itinerary to a persistent table.

During the session, the itinerary data is private. At the end of the session, the optional itineraries are dropped.

The definition of a temporary table is visible to all sessions, but the data in a temporary table is visible only to the session that inserts the data into the table.

Use the CREATE GLOBAL TEMPORARY TABLE statement to create a temporary table. The ON COMMIT clause indicates if the data in the table is transaction-specific(the default) or session-specific, the implications of which are as follows:

ON COMMIT Setting

Implications

DELETE ROWS

This creates a temporary table that is transaction specific. A session becomes bound to the temporary table with a transactions first insert into the table. The binding goes away at the end of the transaction. The database truncates the table (delete all rows) after each commit.

PRESERVE ROWS

This creates a temporary table that is session specific. A session gets bound to the temporary table with the first insert into the table in the session. This binding goes away at the end of the session or by issuing aTRUNCATE of the table in the session. The database truncates the table when you terminate the session.

 

This statement creates a temporary table that is transaction specific:

CREATE GLOBAL TEMPORARY TABLE admin_work_area

        (startdate DATE,

         enddate DATE,

         class CHAR(20))

      ON COMMIT DELETE ROWS;

Indexes can be created on temporary tables. They are also temporary and the data in the index has the same session or transaction scope as the data in the underlying table.

By default, rows in a temporary table are stored in the default temporary tablespace of the user who creates it. However, you can assign a temporary table to another tablespace upon creation of the temporary table by using the TABLESPACE clause of CREATE GLOBAL TEMPORARY TABLE. You can use this feature to conserve space used by temporary tables. For example, if you must perform many small temporary table operations and the default temporary tablespace is configured for sort operations and thus uses a large extent size, these small operations will consume lots of unnecessary disk space. In this case it is better to allocate a second temporary tablespace with a smaller extent size.

The following two statements create a temporary tablespace with a 64 KB extent size, and then a new temporary table in that tablespace.

CREATE TEMPORARY TABLESPACE tbs_t1

    TEMPFILE 'tbs_t1.f' SIZE 50m REUSE AUTOEXTEND ON

    MAXSIZE UNLIMITED

    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K;

 

CREATE GLOBAL TEMPORARY TABLE admin_work_area

        (startdate DATE,

         enddate DATE,

         class CHAR(20))

      ON COMMIT DELETE ROWS

      TABLESPACE tbs_t1;

 

279.Identify the activities performed as part of the Automatic SQL Tuning process in the maintenance window? (Choose all that apply.)
A. generating the SQL profile

B. testing and accepting the SQL profile
C. generating a list of candidate SQLs for tuning
D. adding tuned SQL plans into the SQL plan baseline
E. tuning each SQL statement in the order of importance
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.

B. The value 100 in the THINK_TIME_SCALE parameter attempts to make the replay client shorten the think time between calls.

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.

E. The value 100 in the CONNECT_TIME_SCALE parameter attempts to connect all sessions

immediately as soon as the replay begins.

 

 

Answer: ACD

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41481/dbr_replay.htm#RATUG141


 

 

 

1.1.6.1 Preserving COMMIT Order

The synchronization parameter controls whether the COMMIT order in the captured workload will be preserved during replay.

If this parameter is set to SCN, the COMMIT order in the captured workload will be preserved during replay and all replay actions will be executed only after all dependent COMMIT actions have completed.

If this parameter is set to OBJECT_ID, all replay actions will be executed only after all relevant COMMIT actions have completed. Relevant COMMIT actions must meet the following criteria:

Issued before the given action in the workload capture

Modified at least one of the database objects for which the given action is referencing, either implicitly or explicitly

Setting this parameter to OBJECT_ID allows for more concurrency during workload replays for COMMIT actions that do not reference the same database objects during workload capture.

You can disable this option by setting the parameter to OFF, but the replay will likely yield significant replay divergence. However, this may be desirable if the workload consists primarily of independent transactions, and divergence during unsynchronized replay is acceptable.

11.1.6.2 Controlling Session Connection Rate

The connect_time_scale parameter enables you to scale the elapsed time between the time when the workload capture began and each session connects. You can use this option to manipulate the session connect time during replay with a given percentage value. The default value is 100, which will attempt to connect all sessions as captured. Setting this parameter to 0 will attempt to connect all sessions immediately.

11.1.6.3 Controlling Request Rate Within a Session

User think time is the elapsed time while the replayed user waits between issuing calls within a single session. To control replay speed, use thethink_time_scale parameter to scale user think time during replay.

If user calls are being executed slower during replay than during capture, you can make the database replay attempt to catch up by setting thethink_time_auto_correct parameter to TRUE. This will make the replay client shorten the think time between calls, so that the overall elapsed time of the replay will more closely match the captured elapsed time.

If user calls are being executed faster during replay than during capture, setting the think_time_auto_correct parameter to TRUE will not change the think time. The replay client will not increase the think time between calls to match the captured elapsed time.

 

 

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?

A. You must have change tracking enabled in your database

B. Your database must be running in NOARCHIVELOG mode

C. To back up a tablespace, it must be in backup mode

D. To back up a tablespace, it must first be taken offline

 

 

Answer: C

答案解析:

S手工热备份脚本参考:http://blog.csdn.net/rlhua/article/details/11850629

手工热备份,先将数据库或表空间置为备份模式,然后开始OS拷贝,最后结束备份模式。

这个数据库为24*7,则可以将各个表空间置为备份模式开始备份。

 

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.
C. The ASM disk is dropped immediately from a disk group when it becomes unavailable.
D. The RDBMS always reads the primary copy of a mirrored extent of the ASM disk group.

 

Answer: AB

 

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.

B. The value of the MEMORY_MAX_TARGET parameter remains zero till it is changed manually.

C. The PGA_AGGREGATE_TARGET and SGA_TARGET parameters are automatically set to zero.

D. The lower bounds of PGA_AGGREGATE_TARGET and SGA_TARGET parameters are set to 90 MB

and 270 MB, respectively.

 

 

Answer: AD

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

只需要设置一个目标内存大小初始化参数( MEMORY_TARGET )  和一个最大内存大小初始化参数( MEMORY_MAX_TARGET),数据库就会根据处理需求在SGA 与实例 PGA 之间动态交换内存。

自动内存管理是用两个初始化参数进行配置的:

MEMORY_TARGET:动态控制SGA和PGA时,Oracle总共可以使用的共享内存大小,这个参数是动态的,因此提供给Oracle的内存总量是可以动态增大,也可以动态减小的。它不能超过MEMORY_MAX_TARGET参数设置的大小。默认值是0。

 

MEMORY_MAX_TARGET:这个参数定义了MEMORY_TARGET最大可以达到而不用重启实例的值,如果没有设置MEMORY_MAX_TARGET值,默认等于MEMORY_TARGET的值。

A对。B错。

使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。但并不会因为设置了MEMORY_TARGET,这两个参数就会自动变回0。

D对。C错。

 

 

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?
A. It executes successfully but partition pruning cannot happen for this partition key.
B. It produces an error because the TOTAL_VALUE column cannot be used as a partition key.
C. It produces an error because compression cannot be used for the TOTAL_VALUE partition key.
D. It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in he partitions.

 

Answer: D

 

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.

B. The failure ID has not been mentioned in the command for data file 5.

C. There are new failures recorded in the Automatic Diagnostic Repository (ADR).

D. The ADVISE FAILURE command has not been issued before the REPAIR FAILURE command.

 

 

Answer: A

答案解析:

实验一把:

sys@TEST1107> startup force                                                                      

ORACLE instance started.

 

Total System Global Area 1269366784 bytes

Fixed Size                  2227984 bytes

Variable Size             872415472 bytes

Database Buffers          385875968 bytes

Redo Buffers                8847360 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 6 - see DBWR trace file

ORA-01110: data file 6: '/u01/app/oracle/oradata/test1107/test01.dbf'

 

第一个rman窗口

RMAN> list failure;

 

using target database control file instead of recovery catalog

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

662        HIGH     OPEN      07-NOV-13     One or more non-system datafiles are missing

 

RMAN> advise failure;

 

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

662        HIGH     OPEN      07-NOV-13     One or more non-system datafiles are missing

 

analyzing automatic repair options; this may take some time

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=3 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=33 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=65 device type=DISK

analyzing automatic repair options complete

 

Mandatory Manual Actions

========================

no manual actions available

 

Optional Manual Actions

=======================

1. If file /u01/app/oracle/oradata/test1107/test01.dbf was unintentionally renamed or moved, restore it

 

Automated Repair Options

========================

Option Repair Description

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

1      Restore and recover datafile 6  

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/test1107/test1107/hm/reco_1906746863.hm

 

RMAN>  repair failure; 

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test1107/test1107/hm/reco_1906746863.hm

 

contents of repair script:

   # restore and recover datafile

   restore datafile 6;

   recover datafile 6;

   sql 'alter database datafile 6 online';

 

Do you really want to execute the above repair (enter YES or NO)? y ---同时执行第二个rman窗口

executing repair script

 

Starting restore at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T210734_97rkv8s7_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T210734_97rkv8s7_.bkp tag=TAG20131107T210734

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

Finished restore at 07-NOV-13

 

Starting recover at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery complete, elapsed time: 00:00:02

 

Finished recover at 07-NOV-13

 

sql statement: alter database datafile 6 online

repair failure complete

 

Do you want to open the database (enter YES or NO)? y

database opened

 

 

同时在第一个rman的Do you really want to execute the above repair (enter YES or NO)? y后在第二个窗口进行repair failure

RMAN> repair failure;

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test1107/test1107/hm/reco_1864566805.hm

 

contents of repair script:

   # restore and recover datafile

   restore datafile 6;

   recover datafile 6;

   sql 'alter database datafile 6 online';

 

Do you really want to execute the above repair (enter YES or NO)? y

executing repair script

 

Starting restore at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

skipping datafile 6; already restored to file /u01/app/oracle/oradata/test1107/test01.dbf

restore not done; all files read only, offline, or already restored

Finished restore at 07-NOV-13

 

Starting recover at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery failed

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of repair command at 11/07/2013 21:29:42

RMAN-03015: error occurred in stored script Repair Script

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed

 datafile 6

ORA-00283: recovery session canceled due to errors

ORA-01124: cannot recover data file 6 - file is in use or recovery

ORA-01110: data file 6: '/u01/app/oracle/oradata/test1107/test01.dbf'

 

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?

A. All archived redo log files backed up at least twice to tape are deleted.

B. All archived redo log files backed up at least once to tape are eligible for deletion.

C. All archived redo log files backed up at least twice to tape are deleted from the flash recovery area.

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

答案解析:

参考:归档重做日志删除策略:http://blog.csdn.net/rlhua/article/details/12306189

可以使用CONFIGURE ARCHIVELOG DELETION POLICY命令指定归档重做日志何时才能删除。该删除策略适用于所有归档目标,包括FRA

归档重做日志可由数据库自动删除,或因用户启动的RMAN 命令而删除:

• 只有FRA 中的日志可由数据库自动删除。对于FRA 中的归档重做日志文件,数据库将尽可能长地保留这些文件,并在需要额外磁盘空间时自动删除符合条件的日志。

• 发出BACKUP ... DELETE INPUT或DELETE ARCHIVELOG时,可以从任何位置(无论在FRA 内部还是外部)手动删除符合条件的日志。

• 默认值为:CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;

简化了多组件环境中的归档日志管理当归档日志由多个组件(例如Streams)使用时,此功能简化了归档日志管理。它还提高了当快速恢复区中的归档日志丢失或无法访问时,备份归档日志时的可用性。增强了删除策略的配置仅当任何必需的组件(如Data Guard、Streams、Flashback Database,等等)都不需要归档重做日志时,才能将归档重做日志删除。配置了归档日志删除策略后,该配置会应用到所有归档目标,包括FRA。BACKUP... DELETE INPUT和DELETE... ARCHIVELOG都使用此配置,FRA 也是。备份恢复区时,如果FRA 中的归档重做日志无法访问或已损坏,则RMAN 可故障转移到其它归档重做日志目标位置。

 

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?
A. The LOB values are automatically compressed.
B. The LOB values are cached by default in the buffer cache.
C. The LOB values are automatically stored in encrypted mode.
D. All LOB data that is identical in two or more rows in a LOB column share the same data blocks.

 

Answer: D

 

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

B. ASM_DISKSTRING

C. ASM_DISKGROUPS

D. INSTANCE_TYPE

 

 

Answer: A

答案解析:

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

ASM 实例由参数文件控制,其方式与常规数据库实例相同。

• INSTANCE_TYPE应该设置为ASM,表示ASM 实例。这是唯一一个必须定义的参数。对于数据库实例,该参数值设置为RDBMS。

• ASM_POWER_LIMIT控制重新平衡操作的速度。值的范围从1 到11,11 表示最快。如果省略,该值默认为1。

• ASM_DISKSTRING是一个与操作系统相关的值,ASM 使用它来限制搜索时考虑的磁盘集。默认值为空字符串,这在大都数情况下就足够了。如上所示的约束性更强的值可以减少ASM 执行搜索所需的时间,从而提高磁盘组装载次数。

• ASM_DISKGROUPS是ASM 实例启动时或使用ALTER DISKGROUP ALL MOUNT命令时,ASM 实例要装载的磁盘组的名称列表。Oracle Restart 会装载列为相关磁盘组的磁盘组,即使这些磁盘组未与ASM_DISKGROUPS参数列在一起也是如此。该参数没有默认值。

 

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?

A. It creates database files for the duplicate database under the Oracle base with a different directory for the duplicate database.

B. It overwrites data files of the target database because a different location for data files is not mentioned for the duplicate database.

C. It creates database files for the duplicate database under the same Oracle home as that of the target database with the same directory structure.

D. It creates database files for the duplicate database under the same Oracle home as that of the target but with a different directory for the duplicate database.

 

 

Answer: B

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90163


 

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.

This option is necessary when you are creating a duplicate database in a different host that has the same disk configuration, directory structure, and file names as the host of the source database. For example, assume that you have a small database located in the /dbs directory of srchost:

/oracle/dbs/system_prod1.dbf

/oracle/dbs/users_prod1.dbf

/oracle/dbs/rbs_prod1.dbf

Assume that you want to duplicate this database to desthost, which has the same file system/oracle/dbs/*, and you want to use the same file names in the duplicate database as in the source database. In this case, specify the NOFILENAMECHECK option to avoid an error message. Because RMAN is not aware of the different hosts, RMAN cannot determine automatically that it should not check the file names.

If duplicating a database on the same host as the source database, then ensure that NOFILENAMECHECK is not set. Otherwise, RMAN can potentially overwrite and corrupt the target database data files, temp files, or online logs. It may also signal the following error:

RMAN-10035: exception raised in RPC:

ORA-19504: failed to create

            file "/oracle/dbs/tbs_01.f"

ORA-27086: skgfglk: unable to lock file - already in use

SVR4 Error: 11: Resource temporarily unavailable

Additional information: 8

RMAN-10031: ORA-19624 occurred during call to

DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE

 

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?

A. The data is decrypted during SORT and JOIN operations.

B. The data remains encrypted when it is read into memory.

C. The data remains encrypted when it is stored in the redo logs.

D. The data remains encrypted in the UNDO tablespace provided that the UNDO tablespace was created with the encryption option enabled.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN12327

 

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 types.

 

 

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.)
A. Its entries are specific to a single database.
B. It contains file systems that have been mounted by Direct NFS.
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?

A. The CHANGE FAILURE command has detected new failures recorded in the Automatic Diagnostic Repository(ADR).

B. The VALIDATE DATABASE command has detected new failures recorded in the Automatic Diagnostic Repository (ADR).

C. The ADVISE FAILURE command has detected new failures recorded in the Automatic Diagnostic

Repository (ADR) since the last LIST FAILURE.

D. The RECOVER command has detected new failures recorded in the Automatic Diagnostic Repository (ADR) since the last LIST FAILURE command was executed.

 

 

Answer: C

答案解析:

实验一把:验证repair failure脚本是存在ADR中

 

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.3.0 - Production on Thu Nov 7 21:27:51 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TEST1107 (DBID=2336818266, not open)

 

RMAN> list failure;

 

using target database control file instead of recovery catalog

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

662        HIGH     OPEN      07-NOV-13     One or more non-system datafiles are missing

 

RMAN> advise failure;

 

List of Database Failures

=========================

 

Failure ID Priority Status    Time Detected Summary

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

662        HIGH     OPEN      07-NOV-13     One or more non-system datafiles are missing

 

analyzing automatic repair options; this may take some time

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=3 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=33 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=65 device type=DISK

analyzing automatic repair options complete

 

Mandatory Manual Actions

========================

no manual actions available

 

Optional Manual Actions

=======================

1. If file /u01/app/oracle/oradata/test1107/test01.dbf was unintentionally renamed or moved, restore it

 

Automated Repair Options

========================

Option Repair Description

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

1      Restore and recover datafile 6  

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/test1107/test1107/hm/reco_1906746863.hm

 

RMAN>  repair failure;

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test1107/test1107/hm/reco_1906746863.hm

 

contents of repair script:

   # restore and recover datafile

   restore datafile 6;

   recover datafile 6;

   sql 'alter database datafile 6 online';

 

Do you really want to execute the above repair (enter YES or NO)? y

executing repair script

 

Starting restore at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T210734_97rkv8s7_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_07/o1_mf_nnndf_TAG20131107T210734_97rkv8s7_.bkp tag=TAG20131107T210734

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

Finished restore at 07-NOV-13

 

Starting recover at 07-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

media recovery complete, elapsed time: 00:00:02

 

Finished recover at 07-NOV-13

 

sql statement: alter database datafile 6 online

repair failure complete

 

Do you want to open the database (enter YES or NO)? y

database opened

 

 

 

sys@TEST1107> select * from v$diag_info;

 

   INST_ID NAME                           VALUE

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

         1 Diag Enabled                   TRUE

         1 ADR Base                       /u01/app/oracle

         1 ADR Home                       /u01/app/oracle/diag/rdbms/test1107/test1107

         1 Diag Trace                     /u01/app/oracle/diag/rdbms/test1107/test1107/trace

         1 Diag Alert                     /u01/app/oracle/diag/rdbms/test1107/test1107/alert

         1 Diag Incident                  /u01/app/oracle/diag/rdbms/test1107/test1107/incident

         1 Diag Cdump                     /u01/app/oracle/diag/rdbms/test1107/test1107/cdump

         1 Health Monitor                 /u01/app/oracle/diag/rdbms/test1107/test1107/hm

         1 Default Trace File             /u01/app/oracle/diag/rdbms/test1107/test1107/trace/test1107_ora_15549.trc

         1 Active Problem Count           0

         1 Active Incident Count          0

 

11 rows selected.

 

294.Which tuning tool recommends how to optimize materialized views so that these views can take advantage of the general query rewrite feature?

A. Segment Advisor

B. SQL Access Advisor

C. Undo Advisor

D. SQL Tuning Advisor

 

 

Answer: B 

答案解析:

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

题问:以下哪一个调优工具可以优化物化视图,以便这些视图充分利用常规查询重写特性?

 

SQL 访问指导:评估 SQL 的全部工作量, 并建议索引, 分区和实体化视图, 它们将改善 SQL 工作量的总体性能。

SQL 访问指导能够为给定工作量建议一组适当的实体化视图、实体化视图日志、分区和索引。了解和使用这些结构在优化SQL 时至关重要,因为这些结构在数据检索时能够极大地改善性能。

SQL 访问指导建议使用位图索引、基于函数的索引和B  树索引。位图索引可减少许多类型的即席查询的响应时间,并且相对于其它索引技术而言降低了存储要求。B  树索引在数据仓库中最为常用,用于为唯一关键字或接近唯一的关键字编制索引。

SQL 访问指导的另一个组件还提供了优化实体化视图的建议,使这些视图可以快速刷新并利用常规查询重写。

 

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.

B. When executing a stored script and a command fails, the remainder of the script is executed, and a message is written to the alert log file.

C. RMAN stored scripts can always be executed against any target database that is registered in the recovery catalog.

D. When you execute a stored script, it always executes using the persistent channel settings previously set with the CONFIGURE command.

 

 

Answer: A

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcatdb.htm#BRADV182

如果要使用RMAN 存储脚本,就必须使用恢复目录。--A正确。

如果脚本中的某一RMAN 命令失败,则不会执行脚本中的后续RMAN 命令。--B错。

A global stored script can be run against any database registered in the recovery catalog--C错,没有指明是否是 global stored script还是 local scrip。

执行脚本时,脚本将使用当时配置的自动通道。如果需要替换已配置的通道,请在脚本中使用ALLOCATE CHANNEL命令--D错误。

Managing Stored Scripts

As explained in "About Stored Scripts", you can store scripts in the recovery catalog. This section explains how to create and manage stored scripts.

About Stored Scripts

You can use a stored script as an alternative to a command file for managing frequently used sequences of RMAN commands. The script is stored in the recovery catalog rather than on the file system.

Stored scripts can be local or global. A local script is associated with the target database to which RMAN is connected when the script is created, and can only be executed when you are connected to that target database. A global stored script can be run against any database registered in the recovery catalog, if the RMAN client is connected to the recovery catalog and a target database.

The commands allowable within the brackets of the CREATE SCRIPT command are the same commands supported within a RUN block. Any command that is legal within a RUN command is permitted in the stored script. The following commands are not legal within stored scripts: RUN@, and @@.

When specifying a script name, RMAN permits but generally does not require that you use quotes around the name of a stored script. If the name begins with a digit or is an RMAN reserved word, however, then you must put quotes around the name to use it as a stored script name. Consider avoiding stored script names that begin with nonalphabetic characters or that are the same as RMAN reserved words.

Consider using a naming convention to avoid confusion between global and local stored scripts. For the EXECUTE SCRIPTDELETE SCRIPT and PRINT SCRIPTcommands, if the script name passed as an argument is not the name of a script defined for the connected target instance, then RMAN looks for a global script by the same name. For example, if the global script global_backup is in the recovery catalog, but no local stored script global_backup is defined for the target database, then the following command deletes the global script:

DELETE SCRIPT global_backup;

To use commands related to stored scripts, even global scripts, you must be connected to both a recovery catalog and a target database instance.


 

 

存储脚本与命令文件不同,命令文件只可在存储它们的系统中使用,存储脚本始终可供连接到目标数据库和恢复目录的任何RMAN 客户机使用。

存储脚本可以定义为全局存储脚本或本地存储脚本。本地存储脚本与创建脚本时RMAN 连接到的目标数据库相关联,只有连接到该目标数据库时才能执行本地存储脚本。全局存储脚本则可针对在恢复目录中注册的任何数据库执行,前提是RMAN 客户机连接到恢复目录和某一目标数据库。

 

如果要使用RMAN 存储脚本,就必须使用恢复目录。创建RMAN 存储脚本时:连接到所需的目标数据库和恢复目录,然后执行CREATE SCRIPT命令即可创建存储脚本。

 

连接到目标数据库和恢复目录,然后使用EXECUTE SCRIPT命令即可执行存储脚本。请注意,EXECUTE SCRIPT命令需要RUN块。如果脚本中的某一RMAN 命令失败,则不会执行脚本中的后续RMAN 命令。

 

执行脚本时,脚本将使用当时配置的自动通道。如果需要替换已配置的通道,请在脚本中使用ALLOCATE CHANNEL命令

 

296.You perform the following activities during the database upgrade from Oracle Database 10g to Oracle Database 11 g: Capture plans for a SQL workload into a SQL Tuning Set (STS) before upgrade. Load these plans from the STS into the SQL plan baseline immediately after the upgrade. What is the reason for performing these activities?
A. to minimize plan regression due to the use of a new optimizer version
B. to completely avoid the use of new plans generated by a new optimizer version
C. to prevent plan capturing when the SQL statement is executed after the database upgrade
D. to keep the plan in the plan history so that it can be used when the older version of the optimizer is used

 

Answer: A

 

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.

B. The index is not used by the optimizer and is not maintained during DML operations.

C. The index is used by the optimizer only if a hint is specified in the query statement and is maintained during DML operations.

D. The index is used by the optimizer only if a hint is specified in the query statement but is not maintained during DML operations.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40540/glossary.htm#CNCPT89261

 

invisible index

An index that is maintained by DML operations, but is not used by default by the optimizer. Making an index invisible is an alternative to making it unusable or dropping it.

 

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?

A. It updates the existing SQL profiles with current statistics.

B. It makes the statistics information available to GATHER_STATS_JOB.

C. It initiates the statistics collection process by running GATHER_STATS_JOB.

D. It logs a warning message in the alert log so that the DBA can perform statistics collection manually.

 

 

Answer: B

答案解析:

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

B. authentication by using certificates over SSL

C. authentication by using the Oracle Internet Directory

D. authentication by using the local OS of the database server

 

 

Answer: A

答案解析:

从$ 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?

A. 1, 4, 5, 2, 3

B. 1, 4, 3, 2, 5

C. 4, 5, 2, 3, 1

D. 2, 3, 4, 5, 1

E. 1, 4, 2, 3, 5

 

 

Answer: B

答案解析:

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

这道题考创建虚拟专用目录以及授权限制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?

A. BACKUP AS COMPRESSED BACKUPSET DATABASE

B. BACKUP AS COMPRESSED COPY OF DATABASE

C. CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET

D. CONFIGURE DEVICE TYPE DISK BACKUP TYPE COMPRESS

E. BACKUP DATABASE COMPRESS

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#RCMRF90087

 

 

BACKUP TYPE TO
   [[COMPRESSED]
   BACKUPSET | COPY]

Configures the default backup type for disk or tape backups. For SBT devices the COPY option is not supported. The default for disk is BACKUPSET.

If BACKUP TYPE is set to BACKUPSET, then the BACKUP command always produces backup sets regardless of which media the backup is created on. With the COMPRESSED option, the backup sets produced use binary compression.

The default location for disk backups is the fast recovery area, if one is configured; otherwise, RMAN stores backups in a platform-specific location. The default format for backup file names is %U.

 

302.You issue the following command:

RMAN>CONFIGURE BACKUP OPTIMIZATION ON;

What is the result of this command on your backups?

A. An incremental backup strategy will be used automatically.

B. Read-only datafiles will not be backed up as long as backups of those files already exist and those backups meet established retention criteria.

C. RMAN will configure itself for maximum performance at the cost of CPU.

D. RMAN will configure itself for minimal OS/CPU impact at the cost of time to back up the database.

E. RMAN will automatically compress backups.

 

 

Answer: B

答案解析:

参考:备份优化:http://blog.csdn.net/rlhua/article/details/12312463

备份优化是指:通过跳过未更改的文件(如已经备份的只读和脱机数据文件)优化整个数据库备份。

启用了备份优化:RMAN> CONFIGURE BACKUP OPTIMIZATION ON;

 

303.What is the purpose of the RMAN recovery catalog? (Choose all that apply.)

A. It must be used because all RMAN-related backup and recovery metadata information is contained in it.

B. It provides a convenient, optional, repository of backup- and recovery-related metadata.

C. It provides the ability to store RMAN scripts for global use by any database that has access to the repository.

D. It provides a means of storing all RMAN backup sets physically in an Oracle database server.

E. It provides the ability to store backup records for more than a year.

 

 

Answer: BCE

答案解析:

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

A,不是必须,也可以使用控制文件来记录备份和恢复的信息。

B,它提供了一个方便,可选的备份和恢复相关的元数据存储库。正确

C,可以存储rman全局脚本,可以让任何注册的数据库访问。正确

D,..它提供了一种存储在Oracle数据库服务器所有RMAN物理备份集,错误,个人认为存在目录数据库,不是存在目标数据库服务器上。

E,可以提供长达一年多的备份记录,正确。

 

304.What privileges must be granted to allow an account to create the recovery catalog? (Choose all that apply.)
A. RECOVERY_CATALOG_OWNER
B. DBA
C. RESOURCE
D. SELECT ANY DICTIONARY
E. CONNECT

 

Answer: AC

305.Which command do you use to create a recovery-catalog schema?

A. create recovery catalog

B. create catalog

C. build catalog

D. catalog create

E. mount catalog

 

 

Answer: B

答案解析:

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

创建恢复目录

• 以目录所有者的身份连接到恢复目录数据库:

$ rman

RMAN> CONNECT CATALOG username/password@net_service_name

• 执行CREATE CATALOG命令:

RMAN> CREATE CATALOG;

 

创建目录所有者后,请使用RMAN CREATE CATALOG命令在目录所有者的默认表空间中创建目录表。

注:与任何数据库一样,如果ORACLE_SID环境变量设置为恢复目录数据库的SID,则不需要在CONNECT语句中提供net_service_name。

 

306.If you back up a database without connecting to the recovery catalog, which operations will cause the recovery catalog to be updated? (Choose all that apply.)

A. The next time you back up the database when you are also connected to the recovery catalog and the target database

B. The next time you are connected to the target database and the recovery catalog database and issue the resync command

C. The next time you connect RMAN to just the recovery catalog

D. The next time you connect to the recovery catalog and the target database with RMAN

E. Connecting to the recovery catalog and issuing the resync all databases command

 

 

Answer: AB

答案解析:

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

RMAN 执行重新同步时,会对恢复目录和目标数据库的当前控制文件或备份/备用控制文件进行比较,然后用缺失或更改的信息来更新恢复目录。

重新同步有两种类型:部分和完全。对于部分重新同步,RMAN 会比较控制文件和恢复目录,并使用与备份、归档重做日志、数据文件副本等有关的任何元数据更新恢复目录。

对于完全重新同步,RMAN 先创建控制文件快照,该快照只是控制文件的临时副本。它使用快照与恢复目录进行比较。它比较和更新部分重新同步处理的所有数据,还包括所有数据库结构更改。例如,完全重新同步包括数据库方案更改或新表空间。

注:数据库方案包括数据文件、重做日志文件、归档日志文件、还原段的名称和位置以及在控制文件中找到的其它信息。

如果只对控制文件中由CONTROL_FILE_RECORD_KEEP_TIME控制的记录进行更改,则使用部分重新同步即可。否则,需使用完全重新同步。也可以通过发出RESYNC CATALOG命令执行完全重新同步。

选项A,在下一次连接恢复目录数据库和目标数据库,在备份时,会自动重新同步。

选项B,或者执行手动命令RESYNC CATALOG来执行同步。

 

307.You have created a script in the recovery catalog called backup_database. Which of the following commands would successfully execute that script?

A. run { open script backup_database; run script backup_database }

B. run { engage script backup_database; }

C. run { run script backup_database; }

D. Run { execute script backup_database; }

E. The name backup_database is an invalid name for an RMAN script. Trying to run it from RMAN would result in an error.

 

 

Answer: D

答案解析:

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

 

执行RMAN 存储脚本

• 执行脚本:

RUN { EXECUTE SCRIPTscript_name

; }

• 执行全局脚本:

 

RUN { EXECUTEGLOBAL SCRIPT script_name

; }

 

连接到目标数据库和恢复目录,然后使用EXECUTE SCRIPT命令即可执行存储脚本。请注意,EXECUTE SCRIPT命令需要RUN块。如果脚本中的某一RMAN 命令失败,则不会执行脚本中的后续RMAN 命令。

执行脚本时,脚本将使用当时配置的自动通道。如果需要替换已配置的通道,请在脚本中使用ALLOCATE CHANNEL命令,如下例所示:

RMAN> RUN

{

ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;

ALLOCATE CHANNEL ch2 DEVICE TYPE DISK;

ALLOCATE CHANNEL ch3 DEVICE TYPE DISK;

EXECUTE SCRIPT full_backup;

}

 

308.In what order would you execute the following steps to create a recovery catalog?

A. Issue the create catalog command.

B. Create the recovery-catalog database.

C. Create the recovery-catalog user.

D. Grant the recovery_catalog_owner privilege to the recovery-catalog user.

E. Issue the register database command from the target database.

F. a, b, c, d, e

G. b, a, d, c, e

H. b, c, d, a, e

I. b, c, d, e, a

J. b, d, c, a, e

 

 

Answer: C

答案解析:

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

创建恢复目录的步骤:

要创建恢复目录,请执行以下三个步骤:

1. 配置要在其中存储恢复目录的数据库。

2. 创建恢复目录所有者

3.授予RECOVERY_CATALOG_OWNER角色。

4. 创建恢复目录。

5.在恢复目录中注册数据库

 

 

309.How would you grant the RVPC user access to specific RMAN database records in the RMAN virtual private catalog?

A. Issue the grant command from the SYS user (or equivalent) of the target database.

B. Issue the grant command from the SYS user (or equivalent) of the recovery-catalog database.

C. Issue the grant command from the recovery catalog-owning schema user account in the recovery catalog.

D. Issue the grant command from RMAN when connected to the recovery catalog-owning schema.

E. Issue the grant command from RMAN when connected to the target database.

 

 

Answer: D

答案解析:

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

题问:会如何​​授予RVPC的的用户在RMAN虚拟专用目录访问特定的RMAN数据库中的记录?

从以下第三个步骤a或b步骤看出,此时的vpcowner就是题中的RVPC,当连接恢复目录所有者即下面的是catowner方案时,通过rman来授予其权限,

 

以下是使用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权限。

 

 

310.The RVPC user can do which of the following? (Choose all that apply.)

A. Register databases if granted the register database privilege

B. See all databases in the recovery-catalog schema

C. See all database-related metadata in the recovery catalog if they are granted access to that database

D. Unregister databases from the RVPC catalog that were not granted to the RVPC catalog owner with the grant command

E. Not be connected to with the RMAN command-line catalog parameter for backup or recovery purposes

 

 

Answer: AC

答案解析:

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

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

从309题中,RVPC为VPN所有者,即是虚拟专用目录的用户,基本目录的所有者可为VPC 所有者授予访问先前注册的数据库的权限或授予REGISTER权限,然后,虚拟目录所有者可连接到特定目标的目录,或者注册一个目标数据库,前提是VPN所有者有相应的权限。配置完VPC 之后,VPC 所有者可像使用标准基本目录一样使用该目录。

 

311.Given the script
create script db_backup_datafile_script
{backup datafile and 1, and2 plus archivelog delete input;}
What is the result of running this command?
Run {execute script db_backup_datafile_script using 2;}
A. The script will fail since you instructed RMAN to back up only one datafile rather than two.
B. The script will successfully back up datafile 3 without error.
C. The script will fail since it uses a substitution variable which is not supported.
D. The execute script command will prompt for the value of and2 since it's not included in the command.
E. The script will fail because you cannot use the plus archivelog command when backing up database datafiles.

 

Answer: D

 

312.Which is the correct way to connect to both the target database and the recovery catalog from the RMAN command line? Assume that the target database is called ORCL and that the recovery catalog database is called RCAT. Also assume that the recovery-catalog owner is called RCAT_OWN. Assume the environment is configured for the ORCL database. (Choose all that apply.)

A. rman target=/ catalog=/@rcat

B. rman target=/ catalog=rcat_own/rcat_own

C. rman target=/ catalog=rcat_own/rcat_own@RCAT

D. rman target=sys/robert@orcl catalog=rcat_own/rcat_own@RCAT

E. You cannot connect to the target database and the recovery catalog at the same time.

 

 

Answer: CD

答案解析:

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

从题中知道,现在的环境为ORCL即是目标数据库。

C,通过OS验证,不用跟密码来连接目标数据库以及目录数据库

D,通过远程密码验证来连接连接目标数据库以及目录数据库

 

以目录所有者的身份连接到恢复目录数据库:CONNECT CATALOG username/password@net_service_name

 

313.What command would you issue to enable automated backups of control files?

A. alter database controlfile autobackup on

B. alter system controlfile autobackup on

C. configure controlfile autobackup on

D. enable controlfile autobackup

 

 

Answer: C

 

答案解析:

RMAN> show all;

 

RMAN configuration parameters for database with db_unique_name TEST0910 are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_test0910.f'; # default

 

将默认值

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

改为

CONFIGURE CONTROLFILE AUTOBACKUP ON就可以自动备份控制文件了。

 

 

 

CONTROLFILE AUTOBACKUP

Controls the control file autobackup feature.

Note: You should enable control file autobackup feature when using RMAN without a recovery catalog.

   ON

Specifies that RMAN should perform a control file autobackup in the following circumstances:

After every BACKUPor CREATE CATALOG command issued at the RMAN prompt.

Whenever a BACKUP command within a RUN block is followed by a command that is not BACKUP.

After every RUN block if the last command in the block was BACKUP.

After structural changes for databases in ARCHIVELOG mode. The autobackup after structural changes does not occur for databases in NOARCHIVELOG mode.

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#i1017491

 

 

314.Given the following RMAN commands, choose the option that reflects the order required to restore your currently operational ARCHIVELOG-mode database.
A. restore database;
B. recover database;
C. shutdown immediate
D. startup
E. restore archivelog all;

F. alter database open
G. a, b, c, d, e, f
H. c, b, a, d, e, f
I. c, b, a, d, f
J. c, a, b, d
K. c, a, e, b, d, f

 

Answer: E

 

315.Which commands are used for RMAN database recovery? (Choose all that apply.)

A. restore

B. repair

C. copy

D. recover

E. replace

 

 

Answer: AD

答案解析:

参考:使用RMAN RESTORE和RECOVER命令:http://blog.csdn.net/rlhua/article/details/12346829

使用RMAN RESTORE和RECOVER命令

从备份中重建整个数据库或数据库某一部分的过程通常包含两个阶段:从备份中检索数据文件的副本,以及从归档和联机重做日志中重新应用自备份以来对文件所做的更改,以使数据库恢复到所需的SCN(通常为最新的SCN)。

• RESTORE {DATABASE | TABLESPACE name[,name]... | DATAFILE name [,name] }...

RESTORE命令将数据文件从磁带、磁盘或其它介质上的备份位置检索到磁盘上,并使其可供数据库服务器使用。RMAN 会从备份中还原恢复操作期间所需的任何归档重做日志。如果备份存储在介质管理器上,则必须配置或分配用于访问存储在介质上的备份的通道。

• RECOVER {DATABASE | TABLESPACE name[,name]... | DATAFILE name [,name] }...

RECOVER命令获取已还原的数据文件副本,并将增量备份和数据库重做日志中记录的更改应用于该副本。

还可以通过Oracle Enterprise Manager 使用恢复向导来执行完全恢复或时间点恢复。在“Availability(可用性)”页上,在“Backup/Recovery(备份/恢复)”部分中单击“Perform Recovery(执行恢复)”。

注:一种自动检测恢复需求并执行该恢复的方法是使用数据恢复指导。

 

316.Given a complete loss of your database, in what order would you need to perform the following

RMAN operations to restore it?

A. restore controlfile

B. restore database

C. restore spfile

D. recover database

E. alter database open

F. alter database open resetlogs

G. b, a, c, d, e

H. a, c, b, d, f

I. c, a, b, d, e

J. c, a, b, d, f

K. e, a, b, d, c

 

 

Answer: D

答案解析:

参考:执行灾难恢复:http://blog.csdn.net/rlhua/article/details/12346829

灾难恢复包括在丢失了整个目标数据库、所有当前控制文件、所有联机重做日志文件、所有参数文件和恢复目录数据库(如果有)后还原和恢复目标数据库。

要执行灾难恢复,至少需要以下备份:

• 数据文件的备份

• 在备份之后生成的相应归档重做日志

• 至少一个控制文件自动备份

执行灾难恢复

基本过程:

• 还原服务器参数文件的自动备份。

• 启动目标数据库实例。

• 从自动备份还原控制文件。

• 装载数据库。

• 还原数据文件。

• 恢复数据文件。

• 使用RESETLOGS选项打开数据库。

 

 

317.If you lost your entire database, including the database spfile, control files, online redo logs, and database datafiles, what kind of recovery would be required with RMAN?

A. Complete database recovery.

B. Incomplete database recovery.

C. Approximate database recovery.

D. Archived database recovery.

E. The database could not be recovered with RMAN.

 

 

Answer: B

答案解析:

控制文件丢失,在打开时数据库时只能使用resetlogs,所以只能做不完全恢复。

 

318.Which command will restore all datafiles to the date 9/30/2008 at 18:00 hours?

A. restore datafiles until time '09/28/2008:21:03:11';

B. restore database files until time '09/28/2008:18:00:00';

C. restore database until time '09/28/2008:18:00:00';

D. recover database until time '09/28/2008:18:00:00';

E. recover database until timestamp '09/28/2008:18:00:00';

 

 

Answer: C

答案解析:

使用restore database until time '09/28/2008:18:00:00';命令进行还原。

 

 

319.What is the end result of these commands if they are successful?

RMAN> show retention policy;

RMAN configuration parameters for database with db_unique_name

ORCL are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

Backup database tag=gold_copy plus archivelog tag=gold_copy delete input; 

Backup database tag=silver_copy plus archivelog tag=silver_copy delete input;

A. Attempting to restore silver_copy will fail.

B. Attempting to restore gold_copy will fail.

C. Both backups will be available for restore without question.

D. Attempting to restore gold_copy may or may not succeed.

E. You will not be able to restore either gold_copy or silver_copy.

 

 

Answer: D

答案解析:

 

因为配置的保留策略为REDUNDANCY 1,故这里有两个备份,其中第一次备份的即gold_copy就会显示为obsolete。

 

320.You are using RMAN to backup your ARCHIVELOG mode database. You have enabled control-file autobackups. Which files are not backed up during the RMAN backup?

A. Database Datafiles

B. Database Control Files

C. Online redo logs

D. Archived redo logs

E. The database SPFILE

F. None of the above, all these files are backed up.

 

 

Answer: C

 

答案解析:

The RMAN command for making backups is BACKUP. The RMAN BACKUP command supports backing up the following types of files:

Datafiles and control files

Server parameter file

Archived redo logs

RMAN backups

Although the database depends on other types of files, such as network configuration files, password files, and the contents of the Oracle home, you cannot back up these files with RMAN. Likewise, some features of Oracle Database, such as external tables, may depend upon files other than the datafiles, control files, and redo log. RMAN cannot back up these files. Use some non-RMAN backup solution for any files not in the preceding list。

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#i1006083

 

 

321.True or false: RMAN offers the equivalent of the SQL command alter database backup controlfile to trace.

A. True

B. False

 

 

Answer: B

 

 

答案解析:

sqlplus下:

sys@TEST1107> alter database backup controlfile to trace;

 

Database altered.

 

rman下报错。所以错误。

RMAN> alter database backup controlfile to trace;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "backup": expecting one of: "mount, open"

RMAN-01007: at line 1 column 16 file: standard input

 

322.You need to restore your database back to 9/30/2008 at 18:00. In what order would you run the following commands to compete this task?

A. restore controlfile until time `09/30/2008:18:00:00';

B. restore database until time `09/30/2008:18:00:00';

C. restore spfile until time `09/30/2008:18:00:00';;

D. recover database until time `09/30/2008:18:00:00';

E. alter database open resetlogs;

F. alter database open;

G. b, d, e

H. b, d, f

I. c, a, b, d, e

J. c, a, b, d, f

K. a, b, d, e

 

 

Answer: A

答案解析:

题目要求数据返回到指定日期。

通过restore-recover-open resetlogs来执行。

 

 

323.What is the correct order of the following commands if you wanted to restore datafile 4, which was accidentally removed from the file system?

A. sql 'alter database datafile 4 online';

B. restore datafile 4;

C. recover datafile 4;

D. sql 'alter database datafile 4 offline';

E. startup

F. shutdown

G. a, c, b, d

H. d, b, c, a

I. f, d, b, c, a, e

J. c, a, b, d, f

K. a, b, d, e

 

 

Answer: B

答案解析:

此题的选项有点问题,故从另一套找来正确的题。

 

 

按题意:数据文件4不小心被删除,现在需要恢复,以下是恢复步骤:

1、实验之前需要先备份:

RMAN> backup datafile 4;

 

Starting backup at 23-SEP-13

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/test0910/users01.dbf

channel ORA_DISK_1: starting piece 1 at 23-SEP-13

channel ORA_DISK_1: finished piece 1 at 23-SEP-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 23-SEP-13

 

2、模拟不小心删除

[oracle@rtest test0910]$ rm /u01/app/oracle/oradata/test0910/users01.dbf

 

3、开始恢复

RMAN> sql 'alter database datafile 4 offline';

 

using target database control file instead of recovery catalog

sql statement: alter database datafile 4 offline

 

RMAN> restore datafile 4;

 

Starting restore at 23-SEP-13

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=224 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/test0910/users01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST0910/backupset/2013_09_23/o1_mf_nnndf_TAG20130923T100457_940ln9o6_.bkp tag=TAG20130923T100457

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 23-SEP-13

 

RMAN> recover datafile 4;

 

Starting recover at 23-SEP-13

using channel ORA_DISK_1

 

starting media recovery

media recovery complete, elapsed time: 00:00:01

 

Finished recover at 23-SEP-13

 

RMAN> sql 'alter database datafile 4 online';

 

sql statement: alter database datafile 4 online

 

 

324.Your database is up and running and one of your three control files is accidentally erased. You start RMAN and run the following command:

RESTORE CONTROLFILE FROM AUTOBACKUP;

Which of the following statements is true? (Choose all that apply.)

A. The command restores only the missing control file.

B. The command restores all the control files.

C. The command fails because the database is running.

D. This is the correct way to address this problem.

E. This is not the correct way to address this problem.

 

 

Answer: CE

答案解析:

恢复控制文件在要在nomount状态下恢复的,所以说这个不是一个正确的解决方法。

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV367

 

If you are not using a recovery catalog, then you must restore your control file from an autobackup. To restore the control file from autobackup, the database must be in a NOMOUNT state. 

 

325.Which of the following are valid until command options when attempting point-in-time recovery in RMAN? (Choose all that apply.)

A. until time

B. until change

C. until sequence

D. until SCN

E. until commit

 

 

Answer: ACD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsubcl019.htm#RCMRF160

 

 

Semantics

Syntax Element

Description

UNTIL SCN integer

Specifies an SCN as an upper, noninclusive limit.

RMAN selects only files that it can use to restore or recover up to but not including the specified SCN (seeExample 4-38). For example, RESTORE DATABASE UNTIL SCN 1000 chooses only backups that could be used to recover to SCN 1000.

UNTIL SEQUENCE integer

Specifies a redo log sequence number and thread as an upper, noninclusive limit.

RMAN selects only files that it can use to restore or recover up to but not including the specified sequence number. For example, REPORT OBSOLETE UNTIL SEQUENCE 8000 reports only backups that could be used to recover through log sequence 7999.

   THREAD integer

Specifies the number of the redo thread.

UNTIL TIME 'date_string'

Specifies a time as an upper, noninclusive limit (see Example 4-39).

RMAN selects only files that it can use to restore and recover up to but not including the specified time. For example, LIST BACKUP UNTIL TIME 'SYSDATE-7' lists all backups that could be used to recover to a point one week ago.

When specifying dates in RMAN commands, the date string must be either:

A literal string whose format matches the NLS_DATE_FORMAT setting.

A SQL expression of type DATE, for example, 'SYSDATE-10' or "TO_DATE('01/30/2007', 'MM/DD/YYYY')". The second example includes its own date format mask and so is independent of the currentNLS_DATE_FORMAT setting.

Following are examples of typical date settings in RMAN commands:

BACKUP ARCHIVELOG FROM TIME 'SYSDATE-31' UNTIL TIME 'SYSDATE-14';

RESTORE DATABASE UNTIL TIME "TO_DATE('09/20/06','MM/DD/YY')";

Note: The granularity of time-based recovery is dependent on time stamps in the redo log. For example, suppose that you specify the following command:

RECOVER DATABASE UNTIL TIME '2007-07-26 17:45:00';

If no redo was written with a time stamp of 17:45:00, then recovery proceeds until it finds the next redo time stamp that is higher. For example, the next redo time stamp may be 17:45:04. You can check for the nearest time for a specific SCN by querying the FIRST_TIME and FIRST_CHANGE# columns in V$LOG_HISTORY TABLE.

 

Examples

Example 4-38 Performing Incomplete Recovery to a Specified SCN

This example, which assumes a mounted database, recovers the database up to (but not including) the specified SCN:

STARTUP FORCE MOUNT

RUN

{

  SET UNTIL SCN 1418901;  # set to 1418901 to recover database through SCN 1418900

  RESTORE DATABASE;

  RECOVER DATABASE;

}

ALTER DATABASE OPEN RESETLOGS;

Example 4-39 Reporting Obsolete Backups

This example enables you to recover to any point within the last week. It considers as obsolete all backups that could be used to recover the database to a point one week ago:

REPORT OBSOLETE UNTIL TIME 'SYSDATE-7';

 

326.Which of the following does the recover command not do?

A. Restore archived redo logs.
B. Apply archived redo logs.
C. Restore incremental backups.
D. Apply incremental backups.
E. Restore datafile images.

 

Answer: A

 

327.You have a database with the following tablespaces: SYSTEM, SYSAUX, UNDO, USERS, TEMP. You want to"roll back" the data in the USERS tablespace to the way it looked yesterday. Which tablespaces do you need to perform a point-in-time restore operation on in order to complete this task? (Choose all that apply.)
A. SYSTEM
B. SYSAUX
C. UNDO
D. USERS
E. TEMP
F. This restore is not possible.

 

Answer: ABCDE

 

328.You have backed up your database using image copies. You have lost the SYSTEM tablespace and need to restart your database as quickly as possible. What is the correct solution?

A. Restore the SYSTEM tablespace from the last backup set and then recover the database.

B. Restore the SYSTEM tablespace image copy using the restore command and then restore the

database.

C. Use the switch datafile command to instantly switch to the datafile copy, recover the tablespace, and open the database.

D. The database is not recoverable in this situation with image copies.

E. Manually copy the datafile image copy to the correct location and then manually restore the database from SQL*Plus.

 

 

Answer: C

答案解析:

因为是image copy,可以使用switch命令,切换system数据文件的地址,然后recover,再打开数据库。

使用switch命令可以快速切换数据文件的地址。

 

 

329.If you find errors in the view V$DATABASE_BLOCK_CORRUPTION with a status of MEDIA_CORRUPT, what RMAN command would you run to correct the problem?

A. recover lost blocks;

B. recover corrupt blocks;

C. recover media corrupt blocks from list;

D. recover corrupt blocks from list;

E. recover corruption list;

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV360

 

Recovering All Blocks in V$DATABASE_BLOCK_CORRUPTION

In this scenario, RMAN automatically recovers all blocks listed in the V$DATABASE_BLOCK_CORRUPTION view.

To recover all blocks logged in V$DATABASE_BLOCK_CORRUPTION:

Start SQL*Plus and connect to the target database.

Query V$DATABASE_BLOCK_CORRUPTION to determine whether corrupt blocks exist. For example, execute the following statement:

SQL> SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;

Start RMAN and connect to the target database.

Recover all blocks marked corrupt in V$DATABASE_BLOCK_CORRUPTION.

The following command repairs all physically corrupted blocks recorded in the view:

RMAN> RECOVER CORRUPTION LIST;

After the blocks are recovered, the database removes them from V$DATABASE_BLOCK_CORRUPTION.

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2001.htm#RCMRF90251

 

ORRUPTION LIST

Recovers all physically corrupt blocks listed in the V$DATABASE_BLOCK_CORRUPTION view. Block media recovery may not be able to repair all listed logically corrupt blocks. In these cases, alternate recovery methods, such as tablespace point-in-time recovery, or dropping and re-creating the affected objects, may repair the corruption.

The V$DATABASE_BLOCK_CORRUPTION view displays blocks marked corrupt by Oracle Database components such as RMAN commands, ANALYZE, dbv, SQL queries, and so on. In short, any process that encounters an ORA-1578error records the block corruption in this view. The following types of corruption result in rows added to this view:

Physical corruption (sometimes called media corruption). The database does not recognize the block at all: the checksum is invalid, the block contains all zeros, or the header and footer of the block do not match.

Logical corruption. The block has a valid checksum, the header and footer match, and so forth, but the contents are logically inconsistent.

The view does not record corruptions that can be detected by validating relationships between blocks and segments, but cannot be detected by a check of an individual block.

Note: Any RMAN command that fixes or detects that a block is repaired updates V$DATABASE_BLOCK_CORRUPTION. For example, RMAN updates the repository at end of successful block media recovery. If a BACKUPRESTORE, orVALIDATE command detects that a block is no longer corrupted, then it removes the repaired block from the view.

 

 

330.What will be the end result of this set of RMAN commands?

shutdown abort

startup mount

restore datafile 4 until time ,,09/30/2008:15:00:00;

recover datafile 4 until time ,,09/29/2008:15:00:00;

alter database open resetlogs;

A. Datafile 4 will be recovered until 9/30/2008 at 15:00 and the database will open.

B. The restore command will fail.

C. The recover command will fail.

D. The alter database open resetlogs command will fail.

E. All these commands will fail because they must be in the confines of a run block.

 

 

Answer: D

答案解析:

recover的时间在restore时间之前,这是错误的。故不能打开数据库。

 

 

 

331.Which of the following represents the correct way to perform an online recovery of datafile 4, which is assigned to a tablespace called USERS?

A. shutdown restore datafile 4; recover datafile 4; alter database open;

B. Sql alter database datafile 4 offline; restore datafile 4; recover datafile 4; alter database open;

C. Sql alter database datafile 4 offline; restore datafile 4; Sql alter database datafile 4 online;

D. Sql alter database datafile 4 offline; restore database datafile 4; recover database datafile 4; Sql alter database datafile 4 online;

E. Sql alter database datafile 4 offline; restore datafile 4; recover datafile 4; Sql alter database datafile 4 online;

 

 

Answer: E

答案解析:

从题中得知,要在线恢复datafile 4。因为datafile 4不是关键数据文件,故可以offline来还原恢复。

恢复步骤为,先offline,在还原恢复,再online即可。

RMAN> repair failure;

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test0924/test0924/hm/reco_172511374.hm

 

contents of repair script:

# restore and recover datafile

sql 'alter database datafile4 offline';

restore datafile 4;

recover datafile 4;

sql 'alter database datafile 4 online';


 

332.David managed to accidentally delete the datafiles for database called DSL. He called Heber and Heber tried to help but he managed to delete the control files of the database. Heber called Bill and Bill saved the day. They are using a recovery catalog for this database. What steps did Bill perform to recover the database and in what order?

A. Restored the control file with the RMAN restore controlfile command.

B. Mounted the DSL instance with the alter database mount command.

C. Restored the datafiles for the DSL database with the RMAN restore command.

D. Opened the DSL database with the alter database open resetlogs command.

E. Recovered the datafiles for the DSL database with the RMAN recover command.

F. Started the DSL instance.

G. Connected to the recovery catalog with RMAN.

H. a, b, c, d, e, f, g

I. b, c, d, g, f, e, a

J. g, f, a, b, c, e, d

K. c, a, d, b, f, e, g

L. g, f, a, b, e, c, d

 

 

Answer: C

答案解析:

题中说,在avid不小心删除的数据库和heber删除了控制文件后,怎么使用恢复目录来恢复数据库,数据路实例名:DSL

1,连接到目录数据库

2,启动DSL数据库实例

3,恢复控制文件

4,启动到mount状态

5,恢复数据文件

6,recover数据文件

7,因为是重新恢复的控制文件,所有用open resetlogs打开数据库

 

333.Which command would you use to determine what database backups are currently available for  restore?

A. list database backup;

B. report database backup;

C. list backup of database;

D. list summary backup;

E. report backup of database;

 

 

Answer: C

答案解析:

使用 list backup of database列出数据库的现在可用的备份。

其他答案语法错误:

 

RMAN>  list database backup;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "database": expecting one of: "all, archivelog, backed, backuppiece, backupset, backup, completed, controlfilecopy, copy, datafilecopy, db_unique_name, device, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag"

RMAN-01007: at line 1 column 7 file: standard input

 

RMAN> report database backup;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "database": expecting one of: "device, need, obsolete, schema, unrecoverable"

RMAN-01007: at line 1 column 8 file: standard input

 

RMAN> list summary backup;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "summary": expecting one of: "all, archivelog, backed, backuppiece, backupset, backup, completed, controlfilecopy, copy, datafilecopy, db_unique_name, device, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag"

RMAN-01007: at line 1 column 6 file: standard input

 

RMAN>  report backup of database;

 

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-00558: error encountered while parsing input commands

RMAN-01009: syntax error: found "backup": expecting one of: "device, need, obsolete, schema, unrecoverable"

RMAN-01007: at line 1 column 9 file: standard input

 

334.What command would you use to ensure that backup records in the control file are pointing to actual physical files on the backup media?

A. crosscheck

B. list backup

C. confirm

D. resync

E. backup validate

 

 

Answer: A

答案解析:

crosscheck使用检查rman备份集和物理磁盘的对应的备份集是否一致。如果物理磁盘上没有,而rman备份集信息中有的话(rman备份的信息记录在控制文件中)就会将这个备份片标志为失效

 

crosscheck backupset 是检查备份集和实际的文件

1 备份集有两种状态A(Available,RMAN认为该项存在于备份介质上)X(Expired,备份存在于控制文件或恢复目录中,但

是并没有物理存在于备份介质上)

2 crosscheck 的目的是检查RMAN 的目录以及物理文件,如果物理文件不存在于介质上,将标记为Expired。如果物理文件

存在,将维持Available。如果原先标记为Expired的备份集再次存在于备份介质上(如恢复了损坏的磁盘驱动器后),

crosscheck将把状态重新从Expired标记回Available。

3 crosscheck 输出分两部分。第一部分列出确定存在于备份介质上的所有备份集片,第二部分列出不存在于备份介质上的

备份集片,并将其标记为Expired。可以使用delete expired backupset来删除失效的备份集。

 

实验一把:

先备份一下一个数据文件

RMAN> backup datafile 6;

 

Starting backup at 08-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: starting piece 1 at 08-NOV-13

channel ORA_DISK_1: finished piece 1 at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T092043_97swsvqb_.bkp tag=TAG20131108T092043 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-NOV-13

 

Starting Control File and SPFILE Autobackup at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830942444_97swsyk3_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-NOV-13

 

OS上删除这个备份集

[oracle@rtest ~]$ rm -f /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T092043_97swsvqb_.bkp

 

使用crosscheck backupset来校验备份集

RMAN> crosscheck backupset;

 

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5r8g_.bkp RECID=44 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5qyb_.bkp RECID=45 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpdxy_.bkp RECID=54 STAMP=830940284

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpfgk_.bkp RECID=55 STAMP=830940285

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpcc6_.bkp RECID=56 STAMP=830940283

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830940663_97sv28vk_.bkp RECID=57 STAMP=830940664

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830942444_97swsyk3_.bkp RECID=59 STAMP=830942446

Crosschecked 7 objects

 

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T092043_97swsvqb_.bkp RECID=58 STAMP=830942443

Crosschecked 1 objects

 

EXPIRED状态,说明物理磁盘上没有,而rman的备份信息里面有。

这时可以删除这个失效的备份集的记录。

 

RMAN> delete expired backupset;

 

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

List of Backup Pieces

BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name

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

58      56      1   1   EXPIRED     DISK        /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T092043_97swsvqb_.bkp

 

Do you really want to delete the above objects (enter YES or NO)? y

deleted backup piece

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T092043_97swsvqb_.bkp RECID=58 STAMP=830942443

Deleted 1 EXPIRED objects

 

再次检查,没有了。

RMAN> crosscheck backupset;

 

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5r8g_.bkp RECID=44 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5qyb_.bkp RECID=45 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpdxy_.bkp RECID=54 STAMP=830940284

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpfgk_.bkp RECID=55 STAMP=830940285

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpcc6_.bkp RECID=56 STAMP=830940283

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830940663_97sv28vk_.bkp RECID=57 STAMP=830940664

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830942444_97swsyk3_.bkp RECID=59 STAMP=830942446

Crosschecked 7 objects

 

345.What view might you use to try to determine how long a particular backup will take?

A. V$SESSION_EVENT

B. V$SESSION

C. V$WAITS

D. V$WAITSTAT

E. V$SESSION_LONGOPS

 

 

Answer: E

 答案解析:

参考如下:

sys@TEST1107> SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,

  2  ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"

  3  FROM V$SESSION_LONGOPS

  4  WHERE OPNAME LIKE 'RMAN%'

  5  AND OPNAME NOT LIKE '%aggregate%'

  6  AND TOTALWORK != 0

  7  AND SOFAR <> TOTALWORK;

 

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK %_COMPLETE

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

       189          7          1      31998      80640      39.68

       156         49          1      31870      92800      34.34

 

V$SESSION_LONGOPS displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.

To monitor query execution progress, you must be using the cost-based optimizer and you must:

Set the TIMED_STATISTICS or SQL_TRACE parameters to true

Gather statistics for your objects with the DBMS_STATS package

 

336.You want to make sure that your database backup does not exceed 10 hours in length. What

command would you issue that would meet this condition?

A. backup database plus archivelog;

B. backup database plus arch ivlog until time 10:00;

C. backup database plus archivelog timeout 10:00;

D. backup database plus archivelog duration 10:00;

E. backup database plus archivelog timeout 10:00;

 

 

Answer: D

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90031

 

DURATION hh:mm

Specifies a maximum time for a backup command to run. If a backup command does not complete in the specified duration, then the backup stops.

Without the PARTIAL option, the backup command is considered to have failed if it does not complete in the specified duration, and RMAN reports an error. If the backup command is part of a RUN block, then subsequent commands in the RUN block do not execute.

 

337.You have lost all your RMAN backup set pieces due to a disk failure. Unfortunately, you have an automated cross-check script that also does a delete expired backupset command. You have restored all the backup set pieces from tape. What command would you use to get those backup set pieces registered in the recovery catalog and the control file of the database again?

A. register database

B. recover catalog

C. load backupset

D. synch metadata

E. catalog start with

 

 

Answer: E

答案解析:

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

题中的问题,想从tape中恢复备份片段和控制文件副本,可以使用CATALOG命令。

 catalog start with:使用此命令可重新将所有任何可用备份列入目录。

 

• CATALOG可用于将不再在控制文件中列出的现有备份文件列入目录。

• 这样,RMAN 即可在执行还原操作期间使用这些文件。

• 使用CATALOG命令可将以下类型的备份文件添加到恢复目录中:

– 控制文件副本

– 数据文件副本

– 备份片段

– 归档重做日志文件

 

如果磁盘上有其它控制文件副本、数据文件副本、备份片段或归档重做日志文件,则可使用CATALOG命令将其列入恢复目录。如果某些备份因时间太早已从控制文件中清除,则可将这些备份列入目录,以便RMAN 在执行还原操作期间使用它们。

 

START WITH选项

使用START WITH选项可将在指定目录树中找到的所有文件列入目录。提供表示目录的前缀以及用于查找的可能的文件前缀。不能使用通配符,仅提供一个前缀。

指定目录和子目录中找到的所有类型的备份文件都被列入目录。假定在/tmp/arch_logs目录中有多个备份文件。下列命令将所有文件列入目录:

RMAN> CATALOG START WITH '/tmp/arch_logs/';

假定你只希望将/tmp目录中文件名以字符串bset开头的文件列入目录。下列命令可实现此目的:

RMAN> CATALOG START WITH '/tmp/bset';

此命令还可将在以/tmp/bset开头的目录树中找到的所有备份文件列入目录。

CATALOG命令可以在不连接到恢复目录的情况下使用。

 

338.You run the following commands:

RMAN> list expired backup;

RMAN> delete expired backup;

What will happen to the backup set pieces associated with the backups that appear in the list expired backup command?

A. They will be renamed.

B. Nothing will happen to them. The backup set pieces do not exist.

C. They will be deleted immediately since they are not in the flash recovery area.

D. You will need to manually remove the physical files listed in the output of the commands.

E. They will become hidden files and removed 10 days later.

 

 

Answer: B

答案解析:

实验验证:

首先备份数据文件6

RMAN> backup datafile 6;

 

Starting backup at 08-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: starting piece 1 at 08-NOV-13

channel ORA_DISK_1: finished piece 1 at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp tag=TAG20131108T093420 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 08-NOV-13

 

Starting Control File and SPFILE Autobackup at 08-NOV-13

piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830943261_97sxmgdc_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-NOV-13

 

OS删除这个备份集

[oracle@rtest ~]$ rm -f /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp

 

使用 list expired backup列出失效的备份集,没有结果。

RMAN>  list expired backup;

 

specification does not match any backup in the repository

 

经过crosscheck backupset找出失效的备份集,然后再使用list expired backup;才能有结果,然后进行删除。故即使有失效的备份集,如果没有经过crosscheck 校验,list expired backup是不会出结果的。

RMAN> crosscheck backupset;

 

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5r8g_.bkp RECID=44 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_annnn_TAG20131108T081845_97ss5qyb_.bkp RECID=45 STAMP=830938727

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpdxy_.bkp RECID=54 STAMP=830940284

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpfgk_.bkp RECID=55 STAMP=830940285

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T084442_97stpcc6_.bkp RECID=56 STAMP=830940283

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830940663_97sv28vk_.bkp RECID=57 STAMP=830940664

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830942444_97swsyk3_.bkp RECID=59 STAMP=830942446

crosschecked backup piece: found to be 'AVAILABLE'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/autobackup/2013_11_08/o1_mf_s_830943261_97sxmgdc_.bkp RECID=61 STAMP=830943262

Crosschecked 8 objects

 

crosschecked backup piece: found to be 'EXPIRED'

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp RECID=60 STAMP=830943260

Crosschecked 1 objects

 

 

RMAN>  list expired backup;

 

 

List of Backup Sets

===================

 

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

58      Full    1.11M      DISK        00:00:00     08-NOV-13      

        BP Key: 60   Status: EXPIRED  Compressed: NO  Tag: TAG20131108T093420

        Piece Name: /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp

  List of Datafiles in backup set 58

  File LV Type Ckp SCN    Ckp Time  Name

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

  6       Full 1546195    08-NOV-13 /u01/app/oracle/oradata/test1107/test01.dbf

 

RMAN> delete expired backupset;

 

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

List of Backup Pieces

BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name

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

60      58      1   1   EXPIRED     DISK        /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp

 

Do you really want to delete the above objects (enter YES or NO)? y

deleted backup piece

backup piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T093420_97sxmdgz_.bkp RECID=60 STAMP=830943260

Deleted 1 EXPIRED objects

 

339.Why would you run the delete obsolete command? (Choose all that apply.)

A. To remove missing backup set pieces physically from disk

B. To remove metadata related to backup set pieces in the control file and the recovery catalog

C. To mark as deleted records in the control file and the recovery catalog associated with obsolete backup sets

D. To delete backup set pieces associated with backups that are no longer needed due to retention criteria

E. To remove old versions of RMAN backups

 

 

Answer: CD

答案解析:

delete obsolete删除任何过时的备份。

包括控制文件里和恢复目录里的过时的备份集,而过时指的是超过了指定的备份策略的不再需要恢复的备份集。

 

340.What does it mean if a backup is expired?

A. The backup set has exceeded the retention criteria set in RMAN and is eligible for removal.

B. The backup set has one or more invalid blocks in it and is not usable for recovery.

C. The backup set contains one or more tablespaces no longer in the database.

D. The backup set contains one or more missing backup set pieces.

E. The backup set is from a previous version of RMAN and was not upgraded.

 

 

Answer: D

答案解析:

参考334题:http://blog.csdn.net/rlhua/article/details/14518285

 

341.If a backup set is expired, what can you do to correct the problem?

A. Change the retention criteria.

B. Make the lost backup set pieces available to RMAN again.

C. Run the crosscheck command to correct the location for the backup set piece contained in the metadata.

D. Nothing. The backup set piece is lost forever.

E. Call Oracle support, their assistance is required.

 

 

Answer: B

答案解析:

参考334题:http://blog.csdn.net/rlhua/article/details/14518285

 

crosscheck backupset 是检查备份集和实际的文件

1 备份集有两种状态A(Available,RMAN认为该项存在于备份介质上)X(Expired,备份存在于控制文件或恢复目录中,但

是并没有物理存在于备份介质上)

2 crosscheck 的目的是检查RMAN 的目录以及物理文件,如果物理文件不存在于介质上,将标记为Expired。如果物理文件

存在,将维持Available。如果原先标记为Expired的备份集再次存在于备份介质上(如恢复了损坏的磁盘驱动器后),

crosscheck将把状态重新从Expired标记回Available。

3 crosscheck 输出分两部分。第一部分列出确定存在于备份介质上的所有备份集片,第二部分列出不存在于备份介质上的

备份集片,并将其标记为Expired。可以使用delete expired backupset来删除失效的备份集。

 

342.How long will this backup be allowed to run? Backup as compressed backupset duration 2:00 minimize load database ;

A. 2 minutes

B. 2 hours

C. 2 days

D. The command will generate an error.

E. This backup is not constrained by any time limitation.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90031

 

DURATION hh:mm

Specifies a maximum time for a backup command to run. If a backup command does not complete in the specified duration, then the backup stops.

Without the PARTIAL option, the backup command is considered to have failed if it does not complete in the specified duration, and RMAN reports an error. If the backup command is part of a RUN block, then subsequent commands in the RUN block do not execute.

 

343.What is the impact of the following backup if it exceeds the duration allowance? (Choose all that apply.)Backup as compressed backupset duration 2:00 partial minimize load database ;

A. The entire backup will fail. It will not be usable for recovery.

B. The entire backup will fail, but any datafile successfully backed up will be usable for recovery.

C. If this backup fails, subsequent backups will prioritize datafiles not backed up.

D. If this backup fails, an error will be raised and any other commands will not be executed.

E. If this backup fails, no error will be raised and any other commands will be executed.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90032

 

 

 MINIMIZE
   {LOAD | TIME}

With disk backups, you can use MINIMIZE TIME run the backup at maximum speed (default), or MINIMIZE LOADto slow the rate of backup to lessen the load on the system. With MINIMIZE LOAD the backup takes the full specified duration.

If you specify TIME, then file most recently backed up is given the lowest priority to back up. This scheduling mechanism provides for the eventual complete backup of the database during successive backup windows, as different data files are backed up in round-robin fashion.

   PARTIAL

With the PARTIAL option, the command is considered to have completed successfully and no error is reported by RMAN even if the whole backup is not completed in the specified duration.

Without the PARTIAL option, the backup command is considered to have failed if it does not complete in the specified duration, and RMAN reports an error. If the backup command is part of a RUN block, then subsequent commands in the RUN block do not execute.

Whether PARTIAL is used or not, all backup sets completed before the backup is interrupted are retained and can be used in RESTORE and RECOVER operations.

 

344.In what view are you likely to see the following output?

SID SERIAL# EVENT SECONDS_IN_WAIT

121 269 RMAN backup & recovery I/O 2

129 415 SQL*Net message from client 63 130 270 SQL*Net message from client

A. V$SESSION_EVENT

B. V$SESSION

C. V$WAITS

D. V$WAITSTAT

E. V$SYSSTAT

 

 

Answer: B

答案解析:

参考以下:

select SID,SERIAL#,EVENT,SECONDS_IN_WAIT from V$SESSION;rom V$SESSION;

 

 

       SID    SERIAL# EVENT                                                            SECONDS_IN_WAIT

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

         1          1 DIAG idle wait                                                                 0

         2          1 rdbms ipc message                                                              0

         3         85 rdbms ipc message                                                             59

         7       2723 wait for unread message on broadcast channel                                   1

         9        205 SQL*Net message to client                                                      0

        32          1 rdbms ipc message                                                              2

        33          5 rdbms ipc message                                                            179

        35          1 Streams AQ: qmn slave idle wait                                               28

        37          1 SQL*Net message from client                                                  226

        38       1899 jobq slave wait                                                                0

        63          1 pmon timer                                                                     3

        64          1 rdbms ipc message                                                              3

        65          3 rdbms ipc message                                                            179

        66          1 Streams AQ: waiting for time management or cleanup tasks                     628

        67         13 SQL*Net message from client                                                    4

        69       1143 jobq slave wait                                                                0

        94          1 rdbms ipc message                                                              1

        95          1 rdbms ipc message                                                              1

        96          9 SQL*Net message from client                                                    9

        98          3 Streams AQ: qmn coordinator idle wait                                         28

        99         17 SQL*Net message from client                                                    6

       100        175 SQL*Net message from client                                                   44

       125          1 VKTM Logical Idle Wait                                                      2404

       126          1 rdbms ipc message                                                              3

       127          3 SQL*Net message from client                                                    1

       128         63 rdbms ipc message                                                              1

       129         23 Streams AQ: waiting for messages in the queue                                  2

       156         49 RMAN backup & recovery I/O                                                     0

       157          1 rdbms ipc message                                                              2

       158          1 smon timer                                                                   298

       159         21 rdbms ipc message                                                              1

       161          7 SQL*Net message from client                                                 2169

       162         85 Space Manager: slave idle wait                                                 2

       187          1 DIAG idle wait                                                                 1

       188          1 rdbms ipc message                                                            421

       189          7 RMAN backup & recovery I/O                                                     0

       190          5 SQL*Net message from client                                                    6

       218          1 rdbms ipc message                                                              2

       219          1 rdbms ipc message                                                              0

       221          3 RMAN backup & recovery I/O                                                     2

       222          7 rdbms ipc message                                                            180

       224          7 SQL*Net message from client                                                 2166

       225          9 SQL*Net message from client                                                 2030

 

43 rows selected.

 

345.What view might you use to try to determine how long a particular backup will take?

A. V$SESSION_EVENT

B. V$SESSION

C. V$WAITS

D. V$WAITSTAT

E. V$SESSION_LONGOPS

 

 

Answer: E

 答案解析:

参考如下:

sys@TEST1107> SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,

  2  ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"

  3  FROM V$SESSION_LONGOPS

  4  WHERE OPNAME LIKE 'RMAN%'

  5  AND OPNAME NOT LIKE '%aggregate%'

  6  AND TOTALWORK != 0

  7  AND SOFAR <> TOTALWORK;

 

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK %_COMPLETE

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

       189          7          1      31998      80640      39.68

       156         49          1      31870      92800      34.34

 

V$SESSION_LONGOPS displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.

To monitor query execution progress, you must be using the cost-based optimizer and you must:

Set the TIMED_STATISTICS or SQL_TRACE parameters to true

Gather statistics for your objects with the DBMS_STATS package

 

346.What is the impact of the results of the output of the following command?

RMAN> report unrecoverable database;

Report of files that need backup due to unrecoverable operations

File Type of Backup Required Name

4 full or incremental C:\ORACLE\ORADATA\ORCL\USERS01.DBF

A. There are no backup sets with any backups of the users01.dbf datafile.

B. The users01.dbf datafile has had unrecoverable operations occur in it. It will need to be backed up or some data loss is possible during a recovery.

C. The users01.dbf datafile is corrupted.

D. The users01.dbf datafile backup exceeds the retention criteria.

E. The last backup of the users01.dbf datafile failed and must be rerun.

 

 

Answer: D

答案解析:

参考官方文档:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmquick.htm#BRADV131

即列出自上次以来的备份中,哪些数据文件的备份已经失效,需要重新备份。

NRECOVERABLE

REPORT UNRECOVERABLE

Lists all data files for which an unrecoverable operation has been performed against an object in the data file since the last backup of the data file.

347.What does the output on this report indicate?

RMAN> report need backup;

RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

Report of files with less than 1 redundant backups

File #bkps Name

5 0 C:\ORACLE\ORADATA\ORCL\MY_DATA_01.DBF

A. The my_data_01.dbf datafile is corrupted and needs to be restored.

B. The my_data_01.dbf datafile has not yet been backed up. This report does not imply that the data in the datafile can not be recovered.

C. The my_data_01.dbf datafile has not yet been backed up. This report implies that the data in the datafile can not be recovered.

D. The my_data_01.dbf datafile no longer meets the retention criteria for backups.

E. Datafile 5 is missing.

 

 

Answer: B

 

NEED BACKUP

Lists all data files in the specified reportObject that require a new backup.

The report assumes that you will restore the most recent backup. If you do not specify any option, then RMAN uses the current retention policy configuration. If the retention policy is disabled (CONFIGURE RETENTION POLICYTO NONE), then RMAN generates an error. 

 

REDUNDANCY integer

Specifies the minimum number of backups or copies that must exist for a data file to be considered not in need of a backup. In other words, a data file needs a backup if there are fewer than integer backups or copies of this file. For example, REDUNDANCY 2 means that if there are fewer than two copies or backups of a data file, then it needs a new backup. See Table 3-5 for description of output.

 

able 3-5 Report of Files with Fewer Than n Redundant Backups

Column

Indicates

File

The absolute data file number of a data file with less than n redundant backups.

#bkps

The number of backups that exist for this file.

Name

The name of the file.

 

从#bkps=0可知,该文件没有备份,但是可以根据redo日志来恢复。

348.What does the minimize load database parameter mean when backing up a database?
A. RMAN will attempt to make the backup run as fast as possible without any IO limitations.
B. RMAN will automatically restrict the number of channels in use to one.
C. RMAN will spread the backup IO over the total duration stated in the backup command.
D. RMAN will skip any datafile that currently is involved in an IO operation. RMAN will retry backing up the datafile later and an error will be raised at the end of the backup if the datafile cannot be backed up.
E. Datafiles will be backed up; those having the lowest current number of IO operations will be backed up first.

 

Answer: C

 

349.What is the result of this command?

RMAN> Report need backup days 3;

A. Lists all datafiles created in the last three days that are not backed up.

B. Lists all datafiles not recoverable based on the current retention criteria.

C. Lists all datafiles not backed up in the last three days. The datafile is not recoverable.

D. Lists all datafiles that need to be backed up due to unrecoverable operations.

E. Lists all datafiles not backed up in the last three days. It does not imply that the datafile is not

recoverable.

 

 

Answer: E

答案解析:

Report need backup days 3;

列出3天以前的可用于恢复的归档日志的数据文件。即该数据文件在3天内没有备份过。但并不是说数据文件是不能恢复的。

RMAN> REPORT NEED BACKUP days 3;

using target database control file instead of recovery catalog

Report of files whose recovery needs more than 3 days of archived logs

File Days Name

 

350.Why would you execute the report obsolete command?

A. To list all backups that were no longer available for restore operations

B. To list all backups that had aged beyond the RMAN retention criteria

C. To list all backup set pieces listed in control-file or recovery-catalog metadata that are not on the backup media

D. To list all datafiles that are no longer part of the database and thus do not need to be backed up

E. To list all archived redo logs that are no longer needed for any database recovery

 

 

Answer: B

答案解析:

 

report obsolete执行这条命令,显示所有过时的备份,过时的意思是超过了保留策略所设定的冗余或者天数。

 

 

351.What information does the report schema command not provide? (Choose all that apply.)

A. Size of the datafiles

B. Size of the tempfiles

C. Date of last backup for datafiles and tempfiles

D. Filenames for each datafile

E. Checkpoint SCN associated with the last RMAN backup

 

 

Answer: CE

答案解析:

 

RMAN> report schema;

 

Report of database schema for database with db_unique_name TEST1107

 

List of Permanent Datafiles

===========================

File Size(MB) Tablespace           RB segs Datafile Name

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

1    720      SYSTEM               ***     /u01/app/oracle/oradata/test1107/system01.dbf

2    620      SYSAUX               ***     /u01/app/oracle/oradata/test1107/sysaux01.dbf

3    115      UNDOTBS1             ***     /u01/app/oracle/oradata/test1107/undotbs01.dbf

4    5        USERS                ***     /u01/app/oracle/oradata/test1107/users01.dbf

5    345      EXAMPLE              ***     /u01/app/oracle/oradata/test1107/example01.dbf

6    10       TESTTBS              ***     /u01/app/oracle/oradata/test1107/test01.dbf

 

List of Temporary Files

=======================

File Size(MB) Tablespace           Maxsize(MB) Tempfile Name

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

1    29       TEMP                 32767       /u01/app/oracle/oradata/test1107/temp01.dbf

 

RMAN>

 

352.If a backup is expired, which of the following is true?

A. It can never be used for a restore/recover operation.

B. Oracle will remove the backup set pieces from the flash recovery area.

C. The backup has been used at least once to restore and recover the database.

D. The backup is no longer valid because of a resetlogs operation.

E. The physical backup set pieces are missing from the media.

 

 

Answer: E

答案解析:

参考334题:http://blog.csdn.net/rlhua/article/details/14518285

crosscheck使用检查rman备份集和物理磁盘的对应的备份集是否一致。如果物理磁盘上没有,而rman备份集信息中有的话(rman备份的信息记录在控制文件中)就会将这个备份片标志为失效

 

crosscheck backupset 是检查备份集和实际的文件

1 备份集有两种状态A(Available,RMAN认为该项存在于备份介质上)X(Expired,备份存在于控制文件或恢复目录中,但

是并没有物理存在于备份介质上)

2 crosscheck 的目的是检查RMAN 的目录以及物理文件,如果物理文件不存在于介质上,将标记为Expired。如果物理文件

存在,将维持Available。如果原先标记为Expired的备份集再次存在于备份介质上(如恢复了损坏的磁盘驱动器后),

crosscheck将把状态重新从Expired标记回Available。

3 crosscheck 输出分两部分。第一部分列出确定存在于备份介质上的所有备份集片,第二部分列出不存在于备份介质上的

备份集片,并将其标记为Expired。可以使用delete expired backupset来删除失效的备份集。

 

353.True or false: tablespace point-in-time recovery is possible only with RMAN.
A. True
B. False

 

Answer: B

 

354.Which command is used to begin a tablespace point-in-time recovery?

A. Restore tablespace

B. Recover tablespace

C. Tablespace recover

D. Recover to time

E. recover datafile

 

 

Answer: B

答案解析:

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

 

执行完全自动执行的TSPITR

1. 配置在目标实例上执行TSPITR 所需的通道。

2. 使用AUXILIARY DESTINATION选项指定辅助目标。

RMAN> CONNECT TARGET

RMAN> RECOVER TABLESPACE users, example

> UNTIL TIME '2007-06-29:08:00:00'

> AUXILIARY DESTINATION

> '/u01/app/oracle/oradata/aux';

3. 备份恢复的表空间并使它们联机。

RMAN>BACKUP TABLESPACE users, example;

RMAN> SQL "ALTER TABLESPACE users, example ONLINE"; 

执行完全自动执行的TSPITR 时,还必须:

• 配置在目标实例上执行TSPITR 所需的任何通道

• 指定RMAN 用于数据文件辅助集和其它辅助实例文件的目标

在TSPITR 完成之后,备份恢复的表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的表空间的备份。

注:此时间格式假定NLS_DATE_FORMAT设置为'yyyy-mm-dd:hh24:mi:ss'且NLS_LANG设置为AMERICAN_AMERICA.WE8MSWIN1252。


 

 

355.When you‘re performing active database duplication, a backup of what kind is required?

A. A current RMAN backup-set backup is required.

B. No backup is required.

C. An RMAN image backup is required.

D. A manual backup is required.

E. A "duplicate" preparatory backup is required.

 

 

Answer: B

答案解析:

可以直接复制一个活动的数据库而不需要任何备份。

 

356.Which of the following commands will perform an active database duplication of the ORCL database to the ORCL2 database?

A. Set oracle_sid=orcl rman target=sys/robert auxname=sys/Robert@orcl2 create duplicate target database to neworcl from active database nofilenamecheck spfile set control_files '

c:\oracle\oradata\neworcl\control01.ctl',

'c:\oracle\oradata\neworcl\control02.ctl' set db_file_name_convert 'c:\oracle\oradata\orcl','

c:\oracle\oradata\neworcl' set log_file_name_convert 'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl';

B. Set oracle_sid=orcl

rman target=sys/robert auxname=sys/Robert@orcl2 duplicate target database nofilenamecheck spfile set control_files

'c:\oracle\oradata\neworcl\control01.ctl',

'c:\oracle\oradata\neworcl\control02.ctl' set db_file_name_convert

'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl' set log_file_name_convert

'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl';

C. Set oracle_sid=orcl rman target=sys/robert auxname=sys/Robert@orcl2 duplicate target database to neworcl nofilenamecheck spfile set control_files 'c:\oracle\oradata\neworcl\control01.ctl',

'c:\oracle\oradata\neworcl\control02.ctl' set db_file_name_convert 'c:\oracle\oradata\orcl','

c:\oracle\oradata\neworcl' set log_file_name_convert 'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl';

D. Set oracle_sid=orcl rman target=sys/robert auxname=sys/Robert duplicate target database to neworcl from active database nofilenamecheck spfile set control_files 'c:\oracle\oradata\neworcl\control01.ctl',

'c:\oracle\oradata\neworcl\control02.ctl' set db_file_name_convert 'c:\oracle\oradata\orcl','

c:\oracle\oradata\neworcl' set log_file_name_convert 'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl';

E. Set oracle_sid=orcl rman target=sys/robert auxname=sys/Robert@orcl2 duplicate target database to neworcl from active database nofilenamecheck spfile set control_files

'c:\oracle\oradata\neworcl\control01.ctl',

'c:\oracle\oradata\neworcl\control02.ctl' set db_file_name_convert 'c:\oracle\oradata\orcl','

c:\oracle\oradata\neworcl' set log_file_name_convert 'c:\oracle\oradata\orcl','c:\oracle\oradata\neworcl';

 

 

Answer: E

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90171

A,create duplicate target database to neworcl from active database ,此处多了create。

B,duplicate target database,此处缺少to neworcl from active database

C,缺少 from active database。

D,auxname=sys/Robert ,此处缺少@orcl2。

E,正确。

 

For active database duplication, you must connect to the source database as TARGET and to the auxiliary instance as AUXILIARY. You must use the same SYSDBA password for both instances and must supply the net service name to connect to the AUXILIARY instance. A recovery catalog connection is optional.

 

Example 24-1 Duplicating to a Host with the Same Directory Structure (Active)

DUPLICATE TARGET DATABASE TO dupdb

  FROM ACTIVE DATABASE

  PASSWORD FILE

  SPFILE

  NOFILENAMECHECK;

 

指定下列参数来显式控制辅助数据库的文件命名:

• CONTROL_FILES

• DB_FILE_NAME_CONVERT

• LOG_FILE_NAME_CONVERT

CONTROL_FILES='/u01/app/oracle/oradata/aux/control01.ctl',

'/u01/app/oracle/oradata/aux/control02.ctl',

'/u01/app/oracle/oradata/aux/control03.ctl'

DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl',

'/u01/app/oracle/oradata/aux'

LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl',

'/u01/app/oracle/oradata/aux'

 

357.How many database instances are used during a database-duplication process?
A. One
B. Two
C. Three
D. Four
E. Five

 

Answer: B

 

358.What command is used to reset a database to a previous incarnation?

A. reset incarnation

B. incarnation reset

C. reset database to incarnation

D. reset database incarnation

E. reset database incarnation number

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2007.htm#RCMRF90293

 

RESET DATABASE

Purpose

Use the RESET DATABASE TO INCARNATION command to reset the incarnation of the target database in the RMAN repository to a previous database incarnation. You are only required to use this command in the following scenarios:

You use RESTORE or RECOVER to return the database to an SCN before the current RESETLOGS timestamp.

You use FLASHBACK DATABASE to rewind the database to an orphaned database incarnation.

See Also:

Oracle Database Backup and Recovery User's Guide to learn about the circumstances in which it is necessary to use the RESET DATABASE command

Prerequisites

Execute RESET DATABASE TO INCARNATION only at the RMAN prompt. RMAN must be connected to a target database.

If RMAN runs in NOCATALOG mode, then the target database must be mounted. The mounted control file must contain a record of the specified database incarnation.

If RMAN runs in CATALOG mode, then the target database can be mounted or unmounted. If the database is mounted, then the control file must contain a record of the specified database incarnation.

Usage Notes

When you use RMAN in NOCATALOG mode, the RESET DATABASE TO INCARNATION command is persistent across RMAN sessions.

Syntax

reset::=


Description of the illustration reset.gif

Semantics

Syntax Element

Description

primaryKey

Changes the current incarnation to a noncurrent database incarnation specified by the primary key of theDBINC record for the database incarnation. An incarnation key is used to uniquely tag and identify a stream of redo.

Run LIST INCARNATION OF DATABASE to obtain possible key values. After you issue RESET DATABASE TO INCARNATION, you can run RMAN commands such as FLASHBACK DATABASERESTORE, and RECOVER.

 

Examples

Example 3-17 Resetting RMAN to a Previous Incarnation in NOCATALOG Mode

In NOCATALOG mode, you must mount a control file that contains information about the incarnation to recover. The following scenario resets the database to an abandoned incarnation of database trgt and performs incomplete recovery.

CONNECT TARGET / NOCATALOG

 

# step 1: start and mount a control file that knows about the incarnation to which

# you want to return. Refer to the RESTORE command for appropriate options.

STARTUP NOMOUNT;

RESTORE CONTROLFILE FROM AUTOBACKUP;

ALTER DATABASE MOUNT;

 

# step 2: obtain the primary key of old incarnation

LIST INCARNATION OF DATABASE trgt;

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS   Reset SCN  Reset Time

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

1       2       TRGT     1334358386       PARENT   154381     OCT 30 2007 16:02:12

1       116     TRGT     1334358386       CURRENT  154877     OCT 30 2007 16:37:39

 

# step 3: in this example, reset database to incarnation key 2

RESET DATABASE TO INCARNATION 2;

 

# step 4: restore and recover the database to a point before the RESETLOGS

RESTORE DATABASE UNTIL SCN 154876;

RECOVER DATABASE UNTIL SCN 154876;

 

# step 5: make this incarnation the current incarnation and list incarnations:

ALTER DATABASE OPEN RESETLOGS;

LIST INCARNATION OF DATABASE trgt;

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

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

1       2       TRGT     1334358386       PARENT  154381     OCT 30 2007 16:02:12

1       116     TRGT     1334358386       PARENT  154877     OCT 30 2007 16:37:39

1       311     TRGT     1334358386       CURRENT 156234     AUG 13 2007 17:17:03

 

359.What view would you use to determine if a given tablespace is fully self-contained for the execution of a tablespace point-in-time recovery?

A. TS_CHECK

B. TPITR_CHECK

C. TS_PITR_CHECK

D. CHECK_TSPITR

E. PITR_TS_CHECK

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_5191.htm#REFRN29021

 

TS_PITR_CHECK

This view, created by catpitr.sql, provides information on any dependencies or restrictions that might prevent tablespace point-in-time recovery from proceeding. This view applies only to the tablespace point-in-time recovery feature.

 

360.When performing a full database disaster recovery with RMAN, in what order would you execute these steps?

A. Restore the control file from autobackups.

B. Run the RMAN restore and recover command.

C. Restore the database spfile from autobackups.

D. Make the RMAN backup set pieces available.

E. Open the database with the alter database open resetlogs command.

F. Open the database with the alter database open command.

G. a, b, c, d, e, f

H. c, d, a, b, f

I. d, c, a, b, f

J. d, b, d, c, e

K. d, c, a, b, e

 

 

Answer: E

答案解析:

参考:执行灾难恢复:http://blog.csdn.net/rlhua/article/details/12346829

执行灾难恢复

灾难恢复包括在丢失了整个目标数据库、所有当前控制文件、所有联机重做日志文件、所有参数文件和恢复目录数据库(如果有)后还原和恢复目标数据库。

要执行灾难恢复,至少需要以下备份:

• 数据文件的备份

• 在备份之后生成的相应归档重做日志

• 至少一个控制文件自动备份

执行灾难恢复

基本过程:

• 还原服务器参数文件的自动备份。

• 启动目标数据库实例。

• 从自动备份还原控制文件。

• 装载数据库。

• 还原数据文件。

• 恢复数据文件。

• 使用RESETLOGS选项打开数据库。

 

 

361.When performing a database duplication, which duplicate database parameter would you set to ensure that the online redo logs are created in the correct location?

A. log_file_name_convert

B. convert_log_file_name

C. file_name_convert_log

D. redo_log_file_name_convert

E. logfile_convert_directory

 

 

Answer: A

答案解析:

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

 

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90171

 

 LOG_FILE_NAME_CONVERT:此参数用于指定辅助数据库的重做日志文件名。其格式为LOG_FILE_NAME_CONVERT = 'string1', 'string2',其中string1是目标数据库文件名的模式,string2是辅助数据库文件名的模式。还可以使用DUPLICATE DATABASE命令的LOGFILE子句来指定重做日志文件名。

RUN

{

  SET NEWNAME FOR DATABASE TO '/oradata1/%b';

  DUPLICATE TARGET DATABASE TO dupdb

    LOGFILE

      GROUP 1 ('/duplogs/redo01a.log',

               '/duplogs/redo01b.log') SIZE 4M REUSE,

      GROUP 2 ('/duplogs/redo02a.log',

               '/duplogs/redo02b.log') SIZE 4M REUSE;

}

 

 

362.Which command would correctly start a TSPITR of the USERS tablespace?

A. recover tablespace users until time ,,10/06/2008:22:42:00 auxiliary ,,c:\oracle\auxiliary;

B. recover tablespace users time ,,10/06/2008:22:42:00 auxiliary destination ,,c:\oracle\auxiliary; time ,,10/06/2008:22:42:00

C. recover tablespace users to point-in- auxiliary destination ,,c:\oracle\auxiliary;

D. recover tablespace users except time ,,10/06/2008:22:42:00 auxiliary destination ,,c:\oracle\auxiliary;

E. recover tablespace users until time ,,10/06/2008:22:42:00 auxiliary destination ,,c:\oracle\auxiliary;

 

 

Answer: E

答案解析:

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

ABCD,语法错误

执行完全自动执行的TSPITR

1. 配置在目标实例上执行TSPITR 所需的通道。

2. 使用AUXILIARY DESTINATION选项指定辅助目标。

RMAN> CONNECT TARGET

RMAN> RECOVER TABLESPACE users, example

> UNTIL TIME '2007-06-29:08:00:00'

> AUXILIARY DESTINATION

> '/u01/app/oracle/oradata/aux';

3. 备份恢复的表空间并使它们联机。

执行完全自动执行的TSPITR 时,还必须:

• 配置在目标实例上执行TSPITR 所需的任何通道

• 指定RMAN 用于数据文件辅助集和其它辅助实例文件的目标

在TSPITR 完成之后,备份恢复的表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的表空间的备份。

 

 

363.True or false: you can perform an active database duplication when the database is in
NOARCHIVELOG mode.
A. True
B. False

 

Answer: B

 

364.When running the tablespace point-in-time command

recover tablespace users

until time ,,10/06/2008:22:42:00

auxiliary destination ,,c:\oracle\auxiliary;

you receive the following error:

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571:

===========================================================

RMAN-03002: failure of recover command at 10/08/2008 16:00:30

RMAN-20202: Tablespace not found in the recovery catalog

RMAN-06019: could not translate tablespace name "USERS"

What is the likely cause of the error?

A. The database is in ARCHIVELOG mode.

B. There is not a current backup of the database available.

C. The USERS tablespace has dependent objects in other tablespaces and can not be a part of a TSPITR alone.

D. The USERS tablespace is not eligible for TSPITR because it has invalid objects.

E. The recover tablespace command is incorrect and generates the error.

 

 

Answer: B

答案解析:

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

该恢复命令是正确的,给出的错误提示是找不到恢复目录,即找不到可用的备份。

 

365.Which of the following restrictions are not true with respect to tablespace point-in-time recovery? (Choose all that apply.)

A. The target database must be in NOARCHIVELOG mode.

B. No backup is required of the database before you perform a TSPITR.

C. You must have all archived redo logs generated since the last backup up to the point to which you want to restore the transport set.

D. If you rename a tablespace, you can not perform a TSPITR to any point in time before that rename operation occurred.

E. If you have tables in tablespace_1 that have associated constraints in tablespace_2, then you must transport both tablespaces.

 

 

Answer: AB

答案解析:

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV161

 

TSPITR Restrictions, Special Cases, and Limitations

Some database problems cannot be resolved with TSPITR. The following list explains when you cannot perform TSPITR:

If there are no archived redo logs or if the database runs in NOARCHIVELOG mode.

If TSPITR is used to recover a renamed tablespace to a point in time before it was renamed, you must use the previous name of the tablespace to perform the recovery operation.

In this case when TSPITR completes, the target database contains two copies of the same tablespace, the original tablespace with the new name and the TSPITR tablespace with the old name. If this is not your goal, then you can drop the new tablespace with the new name.

If constraints for the tables in tablespace tbs1 are contained in tablespace tbs2, then you cannot recover tbs1 without also recovering tbs2.

You cannot use TSPITR to recover the current default tablespace.

You cannot use TSPITR to recover tablespaces containing any of the following objects:

Objects with underlying objects (such as materialized views) or contained objects (such as partitioned tables) unless all of the underlying or contained objects are in the recovery set

Undo or rollback segments

Oracle8-compatible advanced queues with multiple recipients

Objects owned by the user SYS. Examples of these types of objects are: PL/SQL, Java classes, callout programs, views, synonyms, users, privileges, dimensions, directories, and sequences.

 

366.If you are going to run a TSPITR recovery, which view will help you to determine which objects will be lost during the TSPITR?

A. TS_OBJECTS_TO_BE_DROPPED

B. TS_PTTR_OBJECT_DROPPED

C. TS_PITR_OBJECTS_TO_BE_DROPPED

D. TS_OBJECTS_DROPPED

E. TS_DROPPED_OBJECTS

 

 

Answer: C

答案解析:

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

官网参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV89795

 

确定将丢失的对象

• 目标恢复时间之后在表空间中创建的对象会丢失。

• 查询TS_PITR_OBJECTS_TO_BE_DROPPED,确定哪些对象在执行TSPITR 之后会丢失。

• 在执行TSPITR 前后分别使用导出和导入来保留并重新创建丢失的对象。

查询TS_PITR_OBJECTS_TO_BE_DROPPED视图,确定是否存在执行表空间时间点恢复后会丢失的对象。

例如,要对USERS和EXAMPLE表空间执行TSPITR,目标时间为2006 年4 月3 日上午8:30:00。

请通过发出以下查询,确定是否存在执行TSPITR 后会丢失的任何对象:

SELECT OWNER, NAME, TABLESPACE_NAME,

TO_CHAR(CREATION_TIME, 'YYYY-MM-DD:HH24:MI:SS')

FROM TS_PITR_OBJECTS_TO_BE_DROPPED

WHERE TABLESPACE_NAME IN ('USERS','EXAMPLE')

AND CREATION_TIME >

TO_DATE('2006-APR-03:08:30:00','YY-MON-DD:HH24:MI:SS')

ORDER BY TABLESPACE_NAME, CREATION_TIME;

 

Step 3: Identify and Preserve Objects That Are Lost After TSPITR

When you perform RMAN TSPITR on a tablespace, objects created after the target recovery time are lost. You can preserve such objects after they are identified by exporting them before TSPITR with the Data Pump Export utility and reimporting them afterward with Data Pump Import.

To determine which objects are lost in TSPITR, query the TS_PITR_OBJECTS_TO_BE_DROPPED view on the primary database.

 

 367.You’re performing tablespace point-in-time recovery on a tablespace called USERS. If an object in that tablespace has a foreign key constraint owned by another object in the INDEX_TBS, which statement is true?

A. You cannot perform the TSPITR with the constraints enabled.

B. You must perform the TSPITR recovery of both tablespaces for it to be successful.

C. You can perform TSPITR only on the USERS tablespace.

D. RMAN will determine if the INDEX_TBS tablespace must also be duplicated and will duplicate it automatically.

E. The TSPITR will only be successful if the constraint is enabled.

 

 

Answer: B

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV89793

 

题中如果想对USERS表空间执行TSPITR,但是有一个外键约束在INDEX_TBS在这个表空间,可以将两个表空间一起做TSPITR。

选B.

 

Step 2: Determine the Recovery Set

Initially, your recovery set includes the data files for the tablespaces that you intend to recover. However, if objects in the tablespaces that you need have relationships (such as constraints) to objects in other tablespaces, then you must account for these relationships before you can perform TSPITR. You have the following choices when faced with such a relationship:

Add the tablespace including the related objects to your recovery set

Remove the relationship

Suspend the relationship for the duration of TSPITR

Identify and Resolve Dependencies on the Primary Database

RMAN TSPITR requires that the tablespace be self-contained and that no SYS -owned objects reside in the tablespace. You can use theDBMS_TTS.TRANSPORT_SET_CHECK procedure to locate objects outside the tablespace and identify relationships between objects that span the recovery set boundaries. If the TRANSPORT_SET_VIOLATIONS view returns rows, you must investigate and correct the problem according to the choices mentioned earlier in this step.

 

 

368.When issuing the duplicate database command, you use the parameter DB_FILE_NAME_CONVERT. For what purpose do you use this parameter?

A. To indicate the location of the auxiliary-instance online redo logs.

B. To indicate the location of the target database datafiles.

C. To indicate the location of the auxiliary-instance control file and online redo logs.

D. To indicate the location of the auxiliary-instance database datafiles.

E. This is not a valid parameter when duplicating a database.

 

 

Answer: D

答案解析:

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

 

 DB_FILE_NAME_CONVERT:此参数用于指定辅助数据库的数据文件名。其格式为DB_FILE_NAME_CONVERT = 'string1', 'string2',其中string1是目标数据库文件名的模式,string2是辅助数据库文件名的模式。还可以指定DB_FILE_NAME_CONVERT参数作为DUPLICATE DATABASE命令的选项

 

369.Which of the following identifies and creates an index to minimize the DB time for a particular SQL statement?

A. The SGA Tuning Advisor

B. The SQL Access Advisor

C. The SQL Tuning Advisor

D. The Memory Advisor

 

 

Answer: C

答案解析:

下列哪项识别和创建索引,以尽量减少DB时间为特定的SQL语句?

 

SQL优化指导:分析各个 SQL 语句, 并建议 SQL 概要文件, 统计信息, 索引和重构的 SQL 以改善 SQL 性能。

SQL访问指导:评估 SQL 的全部工作量, 并建议索引, 分区和实体化视图, 它们将改善 SQL 工作量的总体性能。

 

The SQL Access Advisor allows the DBA to gather global recommendations for a workload. The SQL Tuning

advisor is more granular, tuning a single statement.

The main functions of the SQL Access advisor is to recommend missing indexes and materialized views, but

a comprehensive task analysis will also create SQL Profiles that can be used within the SQL Tuning advisor.

The DBA defines the SQL used in the SQL Access Advisor task, and can choose current SQL, a user-defined

set of SQL, a historical workload, or a hypotheticalworkload.

A hypothetical workload is very useful because the DBA need-only specify the tables that participate in the

queries, and the SQL Access Advisor gathers the appropriate SQL statements to create theworkload.

http://www.dba-oracle.com/oracle10g_tuning/t_sql_access_advisor.htm

The SQL Tuning Advisor (STA) is primarily designed to replace the manual tuningof SQL statements and

speed up the overall SQL tuning process. The SQL Tuning Advisor studies poorly executing SQL statements

and evaluates resource consumption in terms of CPU, I/O, and temporary space.

The SQL Tuning Advisor (STA) works with the Automatic Tuning Optimizer (ATO) to analyze historical SQL

workload using data from the AWR, and it generates recommendations for new indexes and materialized views

that will reduce the disk I/O associated with troublesome SQL statements.

http://www.dba-oracle.com/oracle10g_tuning/t_sql_tuning_advisor.htm

 

370.Why should you back up a duplicated tablespace after a TSPITR is complete?
A. The tablespace cannot be duplicated or restored to any point in time after the duplication.
B. The tablespace cannot be duplicated or restored to the point in time before the duplication.
C. The entire database cannot be restored after a TSPITR, so a backup is required.
D. You cannot bring the tablespace online until its been backed up.
E. There is no requirement to do so, as RMAN will back up the tablespace after the TSPITR.

 

Answer: B

 

371.In what state are the datafiles of a tablespace after a TSPITR has been successfully completed?

A. The datafiles have an ONLINE status.

B. The datafiles have an OFFLINE status.

C. The datafiles have an ONLINE status and are in hot backup mode prepared for an online backup.

D. The datafiles have an OFFLINE status and are in hot backup mode for an online backup.

E. The datafiles are in STANDBY mode.

 

 

Answer: A

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV89797

 

执行完全自动执行的TSPITR

1. 配置在目标实例上执行TSPITR 所需的通道。

2. 使用AUXILIARY DESTINATION选项指定辅助目标。

RMAN> CONNECT TARGET

RMAN> RECOVER TABLESPACE users, example

> UNTIL TIME '2007-06-29:08:00:00'

> AUXILIARY DESTINATION

> '/u01/app/oracle/oradata/aux';

3. 备份恢复的表空间并使它们联机

RMAN>BACKUP TABLESPACE users, example;

RMAN> SQL "ALTER TABLESPACE users, example ONLINE";

执行完全自动执行的TSPITR 时,还必须:

• 配置在目标实例上执行TSPITR 所需的任何通道

• 指定RMAN 用于数据文件辅助集和其它辅助实例文件的目标

在TSPITR 完成之后,备份恢复的表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的表空间的备份。


 

372.Which command do you use to generate a report of database incarnations?

A. list incarnation of database

B. report incarnation of database

C. list database incarnation

D. database incarnation list

E. report database incarnation

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta027.htm#RCMRF90230

 

RMAN> list incarnation of database;

 

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

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

1       1       TEST1107 2336818266       PARENT  1          17-SEP-11

2       2       TEST1107 2336818266       PARENT  995548     06-NOV-13

3       3       TEST1107 2336818266       CURRENT 1199286    06-NOV-13

 

INCARNATION

Displays information about the incarnations of a database.

Whenever you open a database with the RESETLOGS option, you create a new incarnation of the database. IfLIST INCARNATION displays n incarnations of a database, then you have reset the online redo logs for this database n-1 times.

The LIST output includes the primary keys of all database incarnation records for the specified database name (in the column Inc Key, which contains the incarnation key). Use the key in a RESET DATABASE command to change the incarnation that RMAN considers to be current to a previous incarnation.

See Also: Table 2-24 for an explanation of the column headings of the LIST INCARNATION output table andExample 2-98 for an illustration


   OF DATABASE
   database_name

Specifies the name of the database. If you do not specify the OF DATABASE option, then LIST displays all databases registered in the recovery catalog.

 

Table 2-24 List of Database Incarnations

Column

Indicates

DB Key

When combined with the Inc Key, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key to unregister a database from a recovery catalog, that is, delete all the rows associated with that database from the recovery catalog.

Inc Key

When combined with DB Key, the unique key by which RMAN identifies the database incarnation in the recovery catalog. Use this key in RESET DATABASE TO INCARNATION when recovering the database to a time before the most recent RESETLOGS.

DB Name

The database name as listed in the DB_NAME parameter.

DB ID

The database identification number, which the database generates automatically at database creation.

STATUS

CURRENT for the current incarnation, PARENT for the parent incarnations of the current incarnation, and ORPHANfor orphaned incarnations.

Reset SCN

The SCN at which the incarnation was created.

Reset Time

The time at which the incarnation was created.

 

Example 2-98 Listing Database Incarnations

This example lists all database incarnations recorded in the recovery catalog.

RMAN> LIST INCARNATION;

 

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time

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

78      94      PROD     1619073740       PARENT  1          14-FEB-07

78      79      PROD     1619073740       CURRENT 388003     15-FEB

 

 

373.Which of the following Oracle features utilize the undo tablespace? (Choose all that apply)

A. Flashback Query

B. Flashback Drop

C. Flashback Table

D. Flashback Database

E. Transaction Processing

F. Recycle Bin

 

 

Answer: ACE

 

答案解析:

Transaction Processing事务处理会在undo和redo产生数据。

flashback drop:利用recyelebin 回收站原理

flashback table TEST10 to before drop [rename to test11];可以重命名 

flashback query ,依赖undo数据,先查询,在做insert

insert into test10 select * from test10 as of timestamp to_timestamp('2013-09-23 11:52:06','yyyy-mm-dd hh24:mi:ss'); 

flashback table 依赖undo块

flashback table scott.test10 to scn 1952615

insert into test10 select * from scott.test10 as of scn 1952615;        

flashback database DDL语句,依赖闪回区的闪回日志

flashback database to timestamp to_timestamp('2013-09-23 15:09:52','yyyy-mm-dd hh24:mi:ss');时间减一秒。

374.Which of the following statements are true regarding the Recycle Bin? (Choose all that apply.)

A. The Recycle Bin is a physical storage area for dropped objects.

B. The Recycle Bin is a logical container for dropped objects.

C. The Recycle Bin stores the results of a Flashback Drop operation.

D. The objects in the Recycle Bin are stored in the tablespace in which they were created.

 

 

Answer: BD

答案解析:

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

如果不启用回收站,则删除表时,与该表及其从属对象关联的空间会立即变为可回收(也就是说,该空间可用于其它对象)。

如果启用了回收站,则删除表时,与该表及其从属对象关联的空间不会立即变为可回收,即使该空间确实显示在DBA_FREE_SPACE中。

相反,会在回收站中引用删除的对象,这些对象仍属于其各自的所有者。在空间不紧张时,绝不会把回收站对象使用的空间自动回收。

这样,你就能在尽可能长的期限内恢复回收站对象。

将删除的表“移动”到回收站时,将使用系统生成的名称对该表及其关联对象和约束条件进行重命名。重命名惯例如下:BIN$unique_id$version。

其中,unique_id是该对象的全局唯一标识符,包含26 个字符,用于在所有数据库之间唯一地标识回收站名称,而version是数据库分配的版本号。

回收站本身是一个数据字典表,用于维护已删除对象的原始名称与各自系统生成名称之间的关系。可使用DBA_RECYCLEBIN视图查询回收站。

官网参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#sthref2315

 

375.Over the course of a day, a department performed multiple DML statements (inserts, updates, deletes) on multiple rows of data in multiple tables. The manager would like a report showing the time, table name, and DML type for all changes that were made. Which Flashback technology would be the best choice to produce the list?
A. Flashback Drop
B. Flashback Query
C. Flashback Transaction Query
D. Flashback Versions Query
E. Flashback Table

 

Answer: C

 

376.A user named Arren is executing this query:

select table_name, operation, undo_sql from flashback_transaction_query t,

(select versions_xid as xid from employees versions between scn minvalue and maxvalue

where employee_id = 123) e where t.xid = e.xid;

When the query runs, he receives an ORA-01031: insufficient privileges error. Since the user owns the employees table, you know that it is not the problem. Which of the following SQL statements will correct this problem?

A. GRANT SELECT ANY TRANSACTION TO ARREN;

B. GRANT SELECT ON FLASHBACK_TRANSACTION_QUERY TO ARREN;

C. GRANT SELECT_ANY_TRANSACTION TO ARREN;

D. GRANT FLASHBACK TO ARREN;

E. GRANT SELECT ANY VIEW TO ARREN;

 

 

Answer: A

答案解析:

此题为用户没有足够的权限来查询flashback_transaction_query这张表。

 

 

377.AUM has been retaining about 15 minutes worth of undo. You want to double the retention period, but not at the expense of new transactions failing. You decide to alter the system to set the parameter UNDO_RETENTION=18000. However, AUM still retains only about 15 minutes worth of undo. What is the problem? (Choose the best answer.)

A. You need to alter the undo tablespace to add the RETENTION GUARANTEE setting.

B. You need to increase the size of the undo tablespace.

C. The undo tablespace is not set to auto-extend.

D. You need to alter the Recycle Bin to add the RETENTION GUARANTEE setting.

 

 

Answer: C

答案解析:

题中说希望把保留时间变为30分钟,但是不能让新的事务失败为代价。

如果想把时间变为30分钟,有两个方法,一个是设置RETENTION GUARANTEE,确保保留时间为30分钟。 一个是让undo表空间自动增长。而设置RETENTION GUARANTEE,但undo表空间是固定尺寸的情况下,会让新的事务失败。

故最好的办法就是让undo表空间自动增长。

 

378.In order to perform Flashback Transaction Query operations, which of these steps are required?(Choose all that apply.)

A. Ensure that database is running with version 10.1 compatibility.

B. Enable Flashback Logging.

C. Enable Supplemental Logging.

D. Ensure that the database is running with version 10.0 compatibility.

E. Ensure that the database is in ARCHIVELOG mode

 

 

Answer: CD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS611

 

Configuring Your Database for Oracle Flashback Transaction Query

To configure your database for the Oracle Flashback Transaction Query feature, you or your database administrator must:

Ensure that Oracle Database is running with version 10.0 compatibility.

Enable supplemental logging:

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

 

 

 

 

379.Users notify you that their application is failing every time they try to add new records. Because of poor application design, the actual ORA error message is unavailable. What might be the problem? (Choose the best answers.)

A. The application user has exceeded their undo quota.

B. The FLASHBACK GUARANTEE option is set on the undo tablespace.

C. The table is currently being queried by a Flashback Transaction Query operation.

D. The table is currently being queried by a Flashback Versions Query operation.

E. The RETENTION GUARANTEE option is set on the undo tablespace.

 

 

Answer: AE

答案解析:

题问:用户通知你,他们的应用程序每次尝试添加新记录时失败。由于不好的应用设计,实际ORA错误信息不可用。可能是什么问题?

 

添加新纪录失败,可能是因为用户的undo配额已经溢出。

此题说明(Choose the best answers.),故选A

 

380.Which of the following statements best describes Flashback Versions Query?

A. Flashback Versions Query is used to make changes to multiple versions of data that existed between two points in time.

B. Flashback Versions Query is used to view all version changes on rows that existed between the time the query was executed and a point in time in the past.

C. Flashback Versions Query is used to view version changes and the SQL to undo those changes on rows that existed between two points in time.

D. Flashback Versions Query is used to view all version changes on rows that existed between two points in time.

 

 

Answer: D

 

答案解析:

参考:闪回版本查询:http://blog.csdn.net/rlhua/article/details/12404577

 

闪回版本查询:查看两个时间点之间行的所有版本以及更改了行的事务处理。

使用闪回查询,可对特定时间范围或用户指定的系统更改号(SCN) 范围内的数据库进行查询。通过闪回版本查询功能,可使用VERSIONS子句检索两个时间点或两个SCN 之间的所有行的所有版本。

 

闪回版本查询返回的那些行表示跨事务处理的那些行的更改历史记录。闪回版本查询只检索提交的行。不显示事务处理中未提交的行版本。返回的行还包括行的已删除版本和后来重新插入的版本。

 

可以使用闪回版本查询检索行历史记录。闪回版本查询提供了一种方法,通过这种方法可审计表行,检索影响行的事务处理的有关信息。然后,可以使用返回的事务处理标识符来执行事务处理挖掘(通过使用LogMiner)或执行闪回事务处理查询。

 

注:VERSIONS_XID是返回相应行版本的事务处理标识符的伪列。

 

381.Which pseudocolumn could you use to identify a unique row in a Flashback Versions Query?

A. XID

B. VERSIONS_PK

C. VERSIONS_XID

D. VERSIONS_UNIQUE

 

 

Answer: C

答案解析:

参考:闪回版本查询:http://blog.csdn.net/rlhua/article/details/12404577

 

闪回版本查询:查看两个时间点之间行的所有版本以及更改了行的事务处理。

使用闪回查询,可对特定时间范围或用户指定的系统更改号(SCN) 范围内的数据库进行查询。通过闪回版本查询功能,可使用VERSIONS子句检索两个时间点或两个SCN 之间的所有行的所有版本。

 

闪回版本查询返回的那些行表示跨事务处理的那些行的更改历史记录。闪回版本查询只检索提交的行。不显示事务处理中未提交的行版本。返回的行还包括行的已删除版本和后来重新插入的版本。

 

可以使用闪回版本查询检索行历史记录。闪回版本查询提供了一种方法,通过这种方法可审计表行,检索影响行的事务处理的有关信息。然后,可以使用返回的事务处理标识符来执行事务处理挖掘(通过使用LogMiner)或执行闪回事务处理查询。

 

注:VERSIONS_XID是返回相应行版本的事务处理标识符的伪列。

 

382.Which of the following can be used in conjunction with a Flashback Versions Query to filter the results? (Choose all that apply.)

A. A range of SCN values

B. A list of SCN values

C. A starting and ending timestamp

D. Minimum and maximum sequence values

E. A list of sequence values

 

 

Answer: AC

答案解析:

参考:闪回版本查询:http://blog.csdn.net/rlhua/article/details/12404577

 

闪回版本查询:查看两个时间点之间行的所有版本以及更改了行的事务处理。

使用闪回查询,可对特定时间范围或用户指定的系统更改号(SCN) 范围内的数据库进行查询。通过闪回版本查询功能,可使用VERSIONS子句检索两个时间点或两个SCN 之间的所有行的所有版本。

 

闪回版本查询返回的那些行表示跨事务处理的那些行的更改历史记录。闪回版本查询只检索提交的行。不显示事务处理中未提交的行版本。返回的行还包括行的已删除版本和后来重新插入的版本。

 

可以使用闪回版本查询检索行历史记录。闪回版本查询提供了一种方法,通过这种方法可审计表行,检索影响行的事务处理的有关信息。然后,可以使用返回的事务处理标识符来执行事务处理挖掘(通过使用LogMiner)或执行闪回事务处理查询。

 

注:VERSIONS_XID是返回相应行版本的事务处理标识符的伪列。

 

383.At the request of a user, you issue the following command to restore a dropped table: flashback table "BIN$F2JFfMq8Q5unbC0ceE9eJg==$0" to before drop; Later, the user notifies you that the data in the table seems to be very old and out of date. What might be the problem?

A. Because a proper range of SCNs was not specified, the wrong data was restored.

B. A proper range of timestamps was not specified, so the wrong data was restored.

C. A previous Flashback Drop operation had been performed, resulting in multiple versions of the table being stored in the Recycle Bin.

D. Either option A or B could be correct. Not enough information was provided to determine which.

E. None of the above.

 

 

Answer: C

答案解析:

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

 

使用FLASHBACK TABLE ... TO BEFORE DROP命令从回收站恢复表及其所有可能的从属对象。

但有可能在回收站里表有多个版本。如题,用户使用flashback table

"BIN$F2JFfMq8Q5unbC0ceE9eJg==$0" to before drop;来恢复表,但数据太旧,即恢复了旧版本的数据。

如果要恢复最新数据的,则 dba_recyclebin表的droptime来确定需要恢复的时间点。

 

384.Which of the following statements is true regarding the VERSIONS BETWEEN clause?
A. The VERSIONS BETWEEN clause may be used in DML statements.
B. The VERSIONS BETWEEN clause may be used in DDL statements.
C. The VERSIONS BETWEEN clause may not be used to query past DDL changes to tables.
D. The VERSIONS BETWEEN clause may not be used to query past DML statements to tables.

 

Answer: C
385.Which of the following statements is true regarding implementing a Flashback Table recovery?
A. An SCN is never used to perform a Flashback Table recovery.
B. If a significant number of changes have been made to the table, row movement must be enabled.
C. The tablespace must be offline before performing a Flashback Table recovery.
D. Flashback Table recovery is completely dependent on the availability of undo data in the undo tablespace.

 

Answer: D

 

386.You have just performed a FLASHBACK TABLE operation using the following command:
flashback table employees to scn 123456;The employees table has triggers associated with it. Which of the following statements is true regarding the state of the triggers during the Flashback Table operation?
A. All the triggers are disabled.
B. All the triggers are enabled by default.
C. Enabled triggers remain enabled and disabled triggers remain disabled.
D. Triggers are deleted when a Flashback Table operation is performed.

 

Answer: A

 

387.Which method could be utilized to identify both DML operations and the SQL statements needed to undo those operations for a specific schema owner? (Choose all that apply.)

A. Query DBA_TRANSACTION_QUERY for TABLE_NAME, OPERATION, and UNDO_SQL. Limit rows

by START_SCN and TABLE_OWNER.

B. Query FLASHBACK_TRANSACTION_QUERY for TABLE_NAME, OPERATION, and UNDO_SQL.

Limit rows by START_SCN and TABLE_OWNER.

C. Query FLASHBACK_TRANSACTION_QUERY for TABLE_NAME, OPERATION, and UNDO_SQL.

Limit rows by START_TIMESTAMP and TABLE_OWNER.

D. Query DBA_TRANSACTION_QUERY for TABLE_NAME, OPERATION, and UNDO_SQL. Limit rows

by START_SCN and TABLE_OWNER.

 

 

Answer: BC

 答案解析:

START_SCN和START_TIMESTAMP都是指一个时间点。

FLASHBACK_TRANSACTION_QUERY

FLASHBACK_TRANSACTION_QUERY displays information about all flashback transaction queries in the database. The database must have at least minimal supplemental logging enabled to avoid unpredictable behavior.

Column

Datatype

NULL

Description

XID

RAW(8)

Transaction identifier

 

START_SCN

NUMBER

Transaction start system change number (SCN)

 

START_TIMESTAMP

DATE

Transaction start timestamp

 

COMMIT_SCN

NUMBER

Transaction commit system change number; NULL for active transactions

 

COMMIT_TIMESTAMP

DATE

Transaction commit timestamp; NULL for active transactions

 

LOGON_USER

VARCHAR2(30)

Logon user for the transaction

 

UNDO_CHANGE#

NUMBER

Undo system change number (1 or higher)

 

OPERATION

VARCHAR2(32)

Forward-going DML operation performed by the transaction:

D - Delete

I - Insert

U - Update

B

UNKNOWN

 

TABLE_NAME

VARCHAR2(256)

Name of the table to which the DML applies

 

TABLE_OWNER

VARCHAR2(32)

Owner of the table to which the DML applies

 

ROW_ID

VARCHAR2(19)

Rowid of the row that was modified by the DML

 

UNDO_SQL

VARCHAR2(4000)

SQL to undo the DML indicated by OPERATION

 

来源: <FLASHBACK_TRANSACTION_QUERY>

 

388.Flashback Database relies on which technologies to recover to a point in time?

A. Flashback Data Archive

B. Flashback logs in the flash recovery area

C. Flashback Undo tablespace

D. RMAN command line

E. None of the above

 

 

Answer: B

答案解析:

Enabling Flashback Database

To revert the entire database to a prior point in time, you can either revert the entire database to a prior point in time by restoring a backup and doing point-in-time recovery, or you can enable Flashback Database. When you enable Flashback Database, the database generates flashback logs in the fast recovery area. These logs are used to flash back the database to a specified time. During usual operation, the database occasionally logs images of data blocks to the flashback logs. The database automatically creates, deletes, and resizes flashback logs.

官方参考:http://docs.oracle.com/cd/E16655_01/server.121/e17643/backrest.htm#ADMQS12433

闪回开启及四种闪回类型的原理参考:http://blog.csdn.net/rlhua/article/details/11934831

 

389.The _______ writes the Flashback Database logs in the flash recovery area.

A. FLSH

B. FLDB

C. RVWR

D. RVRW

E. FBDA

 

 

Answer: C

答案解析:

RVWR

Recovery Writer Process

Writes flashback data to the flashback logs in the fast recovery area

RVWR writes flashback data from the flashback buffer in the SGA to the flashback logs. RVWR also creates flashback logs and performs some tasks for flashback log automatic management.

Database instance, Flashback Database

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/bgprocesses.htm#sthref4614

 

390.Which of these are valid Flashback Database recovery point parameters? (Choose all that apply.)

A. SCN

B. Timestamp

C. Named recovery point

D. Transaction ID

E. Session ID

 

 

Answer: ABC

答案解析:

参考:闪回数据库:http://blog.csdn.net/rlhua/article/details/12421005

 

 闪回:以独占模式装载数据库

RMAN> FLASHBACK DATABASE TO TIME =  "TO_DATE('2009-05-27 16:00:00', 'YYYY-MM-DD HH24:MI:SS')";

RMAN> FLASHBACK DATABASE TO SCN=23565;

RMAN> FLASHBACK DATABASE  TO SEQUENCE=223THREAD=1;

 

SQL> FLASHBACK DATABASE  TO TIMESTAMP(SYSDATE-1/24);

SQL> FLASHBACK DATABASE TO SCN53943;

SQL> FLASHBACK DATABASE TO RESTORE POINT b4_load;

通过V$SESSION_LONG视图监视闪回数据库的进度。

• 复查更改:以只读方式打开数据库

• 完成:使用RESETLOGS以读/写方式打开数据库

 

闪回数据库:示例

可以使用RMAN FLASHBACK DATABASE命令执行闪回数据库操作。可以使用SEQUENCE和THREAD指定作为下限的重做日志序列号和线程。

RMAN 只选择可用于闪回到指定序列号(但不包括指定序列号)的文件。

也可以使用SQL FLASHBACK DATABASE命令将数据库返回到过去的某个时间或SCN。

如果使用TO SCN子句,则必须提供一个数字。如果指定TO TIMESTAMP,则必须提供一个时间戳值。还可以指定还原点名称。

可以通过V$SESSION_LONGOPS视图监视闪回数据库进度。

注:必须以独占模式装载数据库,之后才能发出FLASHBACK DATABASE命令;要复查更改,可以按只读方式打开数据库。完成后,必须用RESETLOGS选项以读/写方式打开数据库。

 

391.When setting up the Flashback Data Archive, which of these key parameters are required? (Choose all that apply.)

A. Tablespace name

B. Storage quota

C. Retention

D. Table name

E. Create a default archive

 

 

Answer: AC

 答案解析:

参考:闪回数据归档:http://blog.csdn.net/rlhua/article/details/12221269

 

• 可以为系统指定默认的闪回数据归档(可选)。如果省略此选项,则以后仍可以将此闪回数据归档指定为默认选项。

• 需要提供闪回数据归档的名称。

• 需要提供闪回数据归档的第一个表空间的名称。

• 可以确定表空间中闪回数据归档可以使用的最大空间量。默认设置是不受限制。如果第一个表空间中的空间限额不是无限制的,则必须指定该值,否则会引发ORA-55621。

• 需要提供保留时间(表的闪回数据归档数据的保留天数)。

 

392.To clean up old records that are in a Flashback Data Archive and are past the retention period, what must the DBA do?

A. TRUNCATE the archive table.

B. DROP the Flashback Data Archive.

C. Nothing; expired rows are automatically removed.

D. Nothing; expired rows are moved to an archive table.

E. Delete entries from the archive where the metadata date retained is greater than the retention period.

 

 

Answer: C

答案解析:

参考:闪回数据归档:http://blog.csdn.net/rlhua/article/details/12221269

 

通常会在保留时间到期后的第一天执行自动清除。

 

393.Which of the following initialization parameters have been deprecated in Oracle 11g because of the introduction of the Automatic Workload Repository? (Choose all that apply.)

A. BACKGROUND_DUMP_DEST

B. FOREGROUND_DUMP_DEST

C. CORE_DUMP_DEST

D. USER_DUMP_DEST

E. DIAGNOSTIC_DEST

F. All of the above

 

 

Answer: ACD

答案解析:

 

 Beginning with Release 11g of Oracle Database, because all diagnostic data, including the alert log, are stored in the ADR, the initialization parameters BACKGROUND_DUMP_DEST and USER_DUMP_DEST are deprecated. They are replaced by the initialization parameter DIAGNOSTIC_DEST, which identifies the location of the ADR.

 

sys@TEST1107> select * from v$diag_info;

 

   INST_ID NAME                           VALUE

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

         1 Diag Enabled                   TRUE

         1 ADR Base                       /u01/app/oracle

         1 ADR Home                       /u01/app/oracle/diag/rdbms/test1107/test1107

         1 Diag Trace                     /u01/app/oracle/diag/rdbms/test1107/test1107/trace

         1 Diag Alert                     /u01/app/oracle/diag/rdbms/test1107/test1107/alert

         1 Diag Incident                  /u01/app/oracle/diag/rdbms/test1107/test1107/incident

         1 Diag Cdump                     /u01/app/oracle/diag/rdbms/test1107/test1107/cdump

         1 Health Monitor                 /u01/app/oracle/diag/rdbms/test1107/test1107/hm

         1 Default Trace File             /u01/app/oracle/diag/rdbms/test1107/test1107/trace/test1107_ora_30633.trc

         1 Active Problem Count           0

         1 Active Incident Count          0

 

11 rows selected.

 

sys@TEST1107> show parameter dump

 

NAME                                 TYPE        VALUE

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

background_core_dump                 string      partial

background_dump_dest                 string      /u01/app/oracle/diag/rdbms/test1107/test1107/trace

core_dump_dest                           string      /u01/app/oracle/diag/rdbms/test1107/test1107/cdump

max_dump_file_size                      string      unlimited

shadow_core_dump                      string      partial

user_dump_dest                          string      /u01/app/oracle/diag/rdbms/test1107/test1107/trace

 

从以上可知,background_dump_dest  ,core_dump_dest   ,user_dump_dest   这三个被废弃了。

 

394.Which of the following statements is true regarding the initialization parameter DIAGNOSTIC_DEST? The default value is the value of the environment variable $ORACLE_HOME; if $ORACLE_HOME isn't set,
A. then the default is set to $ORACLE_BASE. The default value is the value of the environment variable $ORACLE_BASE; if $ORACLE_BASE isn't set,
B. then it is set to $ORACLE_HOME.
C. DIAGNOSTIC_DEST is always equal to $ORACLE_HOME.
D. DIAGNOSTIC_DEST is always equal to $ORACLE_BASE.

 

Answer: B

 

395.Which of these formats represents the correct hierarchy for the ADR?

A. <diagnostic_dest>/rdbms/diag/<dbname>/<instname>

B. <diagnostic_dest>/diag/rdbms/<instname>/<dbname>

C. <diagnostic_dest>/diag/rdbms/<dbname>/<instname>

D. None of the above

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams078.htm#REFRN10280

 

 As of Oracle Database 11g Release 1 (11.1), the diagnostics for each database instance are located in a dedicated directory, which can be specified through the DIAGNOSTIC_DEST initialization parameter. The structure of the directory specified by DIAGNOSTIC_DEST is as follows:

<diagnostic_dest>/diag/rdbms/<dbname>/<instname>

This location is known as the Automatic Diagnostic Repository (ADR) Home. For example, if the database name is proddb and the instance name is proddb1, the ADR home directory would be <diagnostic_dest>/diag/rdbms/proddb/proddb1.

 

396.Which of the following are not fundamental tasks of the Support Workbench? (Choose all that apply.)
A. View long-running SQL workloads
B. View problem details
C. Gather additional diagnostic information
D. Create a Service Request
E. Clean up incident data after upload to Oracle Support

 

Answer: AE

 

397.Which of the following tasks does the tool Incident Packaging Service (IPS) perform?

A. Cleans up the ADR by deleting files not associated with an incident uploaded to Oracle Support.

B. Identifies all files associated with a critical error and adds them to a zip file to be sent to Oracle Support.

C. Automatically opens a Service Request with Oracle Support for each critical error and sends all relevant files.

D. Displays a high-level view of critical errors on the database home page.

 

 

Answer: B

 答案解析:

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

快速打包:支持工作台会自动将与问题相关的诊断数据放入意外事件程序包,完成意外事件程序包,创建ZIP  文件,然后上载该文件。使用该方法时,将无法添加、编辑或删除意外事件程序包文件,也不能添加SQL 测试用例等其它诊断数据。

 

398.Choose the correct order to package and upload data for an incident to Oracle Support.
A. Schedule, create new package, view manifest, view contents
B. Create new package, view manifest, view contents, schedule
C. Schedule, create new package, view contents, view manifest
D. Create new package, view contents, view manifest, schedule
E. None of the above.

 

Answer: D

 

399.Which of the following is not an advantage of block media recovery (BMR)?

A. Reduced MTTR.

B. Datafiles remain offline while corrupt blocks are repaired.

C. Datafiles remain online while corrupt blocks are repaired.

D. A and C

 

 

Answer: B

答案解析:

根据

Lowers the mean time to recover (MTTR) because only blocks needing recovery are restored and recovered

Enables affected data files to remain online during recovery

B不是block media recovery (BMR)所特有的。

block media recovery

The recovery of specified blocks within a data file with the Recovery Manager RECOVER ... BLOCK command. Block media recovery leaves the affected data files online and restores and recovers only the damaged or corrupted blocks.

Purpose of Block Media Recovery

You can use block media recovery to recover one or more corrupt data blocks within a data file. Block media recovery provides the following advantages over data file media recovery:

Lowers the mean time to recover (MTTR) because only blocks needing recovery are restored and recovered

Enables affected data files to remain online during recovery

Without block media recovery, if even a single block is corrupt, then you must take the data file offline and restore a backup of the data file. You must apply all redo generated for the data file after the backup was created. The entire file is unavailable until media recovery completes. With block media recovery, only the blocks actually being recovered are unavailable during the recovery.

Block media recovery is most useful for physical corruption problems that involve a small, well-known number of blocks. Block-level data loss usually results from intermittent, random I/O errors that do not cause widespread data loss, and memory corruptions that are written to disk. Block media recovery is not intended for cases where the extent of data loss or corruption is unknown and the entire data file requires recovery. In such cases, data file media recovery is the best solution.

 

400.Which of the following methods can be used to detect block corruption?

A. ANALYZE operations

B. dbv

C. SQL queries that access the potentially corrupt block

D. RMAN

E. All of the above

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89783

 

Identification of Corrupt Blocks

The V$DATABASE_BLOCK_CORRUPTION view displays blocks marked corrupt by database components such as RMAN, ANALYZEdbv, and SQL queries. The following types of corruption result in the addition of rows to this view:

Physical corruption (sometimes called media corruption)

The database does not recognize the block: the checksum is invalid, the block contains all zeros, or the block header is corrupt.

Physical corruption checking is enabled by default. You can turn off checksum checking by specifying the NOCHECKSUM option of the BACKUP command, but other physical consistency checks, such as checks of the block headers and footers, cannot be disabled.

Logical corruption

The block has a valid checksum, the header and footer match, and so on, but the contents are logically inconsistent. Block media recovery may not be able to repair all logical block corruptions. In these cases, alternate recovery methods, such as tablespace point-in-time recovery, or dropping and re-creating the affected objects, may repair the corruption.

Logical corruption checking is disabled by default. You can turn it on by specifying the CHECK LOGICAL option of the BACKUPRESTORERECOVER, and VALIDATEcommands.

The database can detect some corruptions by validating relationships between blocks and segments, but cannot detect them by a check of an individual block. The V$DATABASE_BLOCK_CORRUPTION view does not record at this level of granularity.

 

 

401.Which of the following are correct about block media recovery? (Choose all that apply.)

A. Physical and logical block corruption is recorded automatically in V$DATABASE_BLOCK_
CORRUPTION.
B. Logical corruptions are repairable by BMR.
C. Physical corruptions are repairable by BMR.
D. RMAN can use any backup for a BMR restore.
E. ARCHIVELOG mode is not required if you have both a full and incremental backup for restore.

 

Answer: AC

 

402.While querying the EMPLOYEES table, you receive an ORA-01578 message indicating block

corruption in File# 1201 and Block# 1968. You analyze the table and the corruption is verified. Which RMAN command do you use to perform BMR and repair the corrupt block?

A. RECOVER FILE=1201 BLOCK=1968;

B. RECOVER CORRUPTION LIST;

C. RECOVER DATAFILE 1201 BLOCK 1968;

D. RECOVER BLOCK CORRUPTION LIST;

E. None of the above

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2001.htm#RCMRF90244

 

 

 

403.To view the results of the most recent Automatic SQL Tuning Advisor task, which sequence should you follow?

A. EM Database home page, Software and Support, SQL Advisors, Automatic SQL Tuning Advisor

B. EM Database home page, Software and Support, Advisor Central, SQL Advisors, Automatic SQL

Tuning Advisor

C. EM Database home page, Software and Support, Support Workbench, Advisor Central, SQL Advisors, Automatic SQL Tuning Advisor

D. Either B or C

E. All of the above

 

 

Answer: D

答案解析:

进入指导中心就可以进去SQL指导,然后在SQL优化指导。

 

 

 

 

404.When creating a SQL tuning set, which of the following steps allows the DBA to reduce the size of the SQL set by selecting specific operators and values?

A. Filter versions

B. Filter loads

C. Filter tasks

D. Filter options

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10822/tdppt_sqltune.htm#TDPPT157

 

Creating a SQL Tuning Set: Filter Options

After the load method is selected, you can apply filters to reduce the scope of the SQL statements found in the SQL tuning set. While using filters is optional, it can be very beneficial due to the following:

Using filters directs the various advisors that use the SQL tuning set as a workload source, such as SQL Tuning Advisor, SQL Access Advisor, and SQL Performance Analyzer, to make recommendations based on a specific subset of SQL statements, which may lead to better recommendations.

Using filters removes extraneous SQL statements from the SQL tuning set, which may greatly reduce processing time when it is used as a workload source for the various advisors.

Tip:

Before you can specify the filter options for the SQL tuning set, do the following:

Create a SQL tuning set and specify the initial options, as described in "Creating a SQL Tuning Set: Options"

Select the load method, as described in "Creating a SQL Tuning Set: Load Method"

To specify filter options for a SQL tuning set: 

On the Create SQL Tuning Set: Filter Options page, specify the values of filter conditions that you want use in the search in the Value column, and an operator or a condition in the Operator column.

Only the SQL statements that meet all of the specified filter conditions will be added to the SQL tuning set. Unspecified filter values will not be included as filter conditions in the search.

By default, the following filter conditions are displayed:

Parsing Schema Name

SQL Text

SQL ID

Elapsed Time (sec)

To add filter conditions, under Filter Conditions, select the filter condition you want to add and click Add a Filter or Column.

After the desired filter conditions have been added, specify their values in the Value column, and an operator or a condition in the Operator column.

To remove any unused filter conditions, click the icon in the Remove column for the corresponding filter condition you want to remove.

Click Next.

The Create SQL Tuning Set: Schedule page appears.

Proceed to the next step, as described in "Creating a SQL Tuning Set: Schedule".

 

405.To view the results of a manual SQL Tuning Advisor task, which steps should the DBA take?

A. From the Advisor Central home page, select the tuning task from the Advisor Tasks section.

B. From Advisor Central, choose SQL Advisors, SQL Tuning Advisors, Manual Tuning Task Results.

C. From Advisor Central, choose SQL Advisors, Manual SQL Tuning Advisors, Tuning Task Results.

D. Either B or C.

 

 

Answer: A

答案解析:

参考403题:http://blog.csdn.net/rlhua/article/details/14088141

 

406.Which of these appropriately describes the results of a manual SQL Tuning Advisor task?

A. A list of SQL statements and recommendations for tuning

B. A list of SQL statements that have been tuned by the Advisor, with before and after metrics

C. Graphs showing the actual performance improvement made by the Advisor after it implemented the recommended changes

D. All of the above

 

 

Answer: A

答案解析:

SQL优化指导:分析各个 SQL 语句, 并建议 SQL 概要文件, 统计信息, 索引和重构的 SQL 以改善 SQL 性能。

 

407.Which of the following is a potential performance tuning recommendation from the SQL Access Advisor?

A. Create new indexes.

B. Modify existing indexes.

C. Implement partitioning on a nonpartitioned table.

D. Create materialized views.

E. All of the above

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF94876

 

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.

In addition, you can use SQL Access Advisor API to do the following:

Perform a quick tune using a single SQL statement.

Show how to make a materialized view fast refreshable.

Show how to change a materialized view so that general query rewrite is possible.

 

408.Which statement most accurately describes the implementation of a SQL Access Advisor

recommendation?

A. SQL Access Advisor recommendations are automatically implemented.

B. Individual SQL Access Advisor recommendations can be scheduled for implementation.

C. All SQL Access Advisor recommendations for a specific task must be implemented at the same time.

D. SQL Access Advisor recommendations are automatically scheduled for implementation during the maintenance window.

E. None of the above.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10822/tdppt_sqlopt.htm#TDPPT192

 

Implementing the SQL Access Advisor Recommendations

A SQL Access Advisor recommendation can range from a simple suggestion to a complex solution that requires partitioning a set of existing base tables and implementing a set of database objects such as indexes, materialized views, and materialized view logs. You can select the recommendations for implementation and schedule when the job should be executed.

To implement the SQL Access Advisor recommendations: 

On the Results for Tasks page, click Recommendations.

The Recommendations subpage appears.

Under Select Recommendations for Implementation, select the recommendation you want to implement and then click Schedule Implementation.

In the following example, the recommendation with ID value 4 is selected.

 

The Schedule Implementation page appears.

 

 

409.Which of the following represents the correct sequence of events for Database Replay?

A. Capture, analyze, preprocess, replay

B. Capture, preprocess, analyze, replay

C. Capture, preprocess, replay, analyze

D. Analyze, capture, preprocess, replay

E. None of the above

 

 

Answer: C

答案解析:

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

数据库重放的步骤为:捕获工作量--预处理工作量--重放工作量--分析

 

 

410.Which of these recommendations should be followed before capturing a workload? (Choose all that apply.)
A. Make sure your replay database has the same structure as the capture database, except without data.
B. Make sure the replay and capture databases are similar in data content.
C. Perform a clean shutdown and restart of the capture database before beginning a workload capture.
D. Start the capture database in UNRESTRICTED mode, then start the capture.
E. Define inclusion and exclusion filters.

 

Answer: BC

 

411.Which is true concerning Database Replay in an Oracle Real Application Cluster (RAC) database?
A. Workload capture is per instance.
B. You only need to restart one instance to begin workload capture.
C. Specifically in RAC, you shut down all instances, restart them individually, and begin workload capture with the last instance started.
D. RAC does not support workload capture, but it does support workload replay.
E. None of the above.

 

Answer: E

 

412.Performance divergence indicated in the Workload Replay report is most likely due to what?
A. DML and SQL statement results that do not match between the capture and replay systems
B. When errors that occur in the capture system don’t occur in the replay system
C. Top SQL statements
D. Infrastructure or system-configuration differences
E. Time-of-day differences between capture and replay systems

 

Answer: D

 

413.Which of the following Oracle features is enabled by setting a nonzero value for the MEMORY_TARGET initialization parameter?

A. Automatic PGA Memory Management

B. Automatic SGA Memory Management

C. Automatic Shared Memory Management

D. Automatic Memory Management

E. Manual SGA Memory Management

F. None of the above

 

 

Answer: D

答案解析:

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

只需要设置一个目标内存大小初始化参数( MEMORY_TARGET )  和一个最大内存大小初始化参数( MEMORY_MAX_TARGET),数据库就会根据处理需求在SGA 与实例 PGA 之间动态交换内存。

自动内存管理是用两个初始化参数进行配置的:

MEMORY_TARGET:动态控制SGA和PGA时,Oracle总共可以使用的共享内存大小,这个参数是动态的,因此提供给Oracle的内存总量是可以动态增大,也可以动态减小的。它不能超过MEMORY_MAX_TARGET参数设置的大小。默认值是0。

 

MEMORY_MAX_TARGET:这个参数定义了MEMORY_TARGET最大可以达到而不用重启实例的值,如果没有设置MEMORY_MAX_TARGET值,默认等于MEMORY_TARGET的值。

使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。

 

 

414.By setting the value of MEMORY_TARGET to zero and setting the value of SGA_TARGET to a nonzero value, you will enable which of the following memory-management options?

A. Automatic PGA Memory Management

B. Automatic SGA Memory Management

C. Automatic Shared Memory Management

D. Automatic Memory Management

E. Manual SGA Memory Management

F. None of the above

 

 

Answer: C

答案解析:

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

 

要从自动内存管理模式更改为ASMM,请执行以下操作:

1. 将初始化参数MEMORY_TARGET 设置为0。

ALTER SYSTEM SET MEMORY_TARGET = 0;

数据库将根据当前的SGA 内存分配设置SGA_TARGET。

2. 将自动设置大小的SGA 组件的值设置为0。完成后,重新启动实例。

 

415.For Oracle 11g, Oracle strongly recommends that you configure your database to use which of the following memory-management features?

A. Automatic PGA Memory Management

B. Automatic SGA Memory Management

C. Automatic Shared Memory Management

D. Automatic Memory Management

E. Manual SGA Memory Management

F. None of the above

 

 

Answer: D

答案解析:

参考:管理内存:http://blog.csdn.net/rlhua/article/details/12493791

自动内存管理(AMM),Oracle DB 可以自动管理SGA 内存以及实例PGA 内存的大小。

 

416.To manually configure the SGA components using Oracle Enterprise Manager Memory Advisor, you can set values for which of the following initialization parameters? (Choose all that apply.)

A. DB_CACHE_SIZE

B. SHARED_POOL_SIZE

C. LARGE_POOL_SIZE

D. JAVA_POOL_SIZE

E. SGA_MAX_SIZE

F. SORT_AREA_SIZE

 

 

Answer: ABCD

答案解析:

 

 

 

417.When manually configuring the SGA, which of the following parameter changes requires an instance restart to take effect?

A. DB_CACHE_SIZE

B. SHARED_POOL_SIZE

C. LARGE_POOL_SIZE

D. JAVA_POOL_SIZE

E. SGA_MAX_SIZE

F. SORT_AREA_SIZE

 

 

Answer: E

答案解析:

 

sys@TEST1107> desc v$sgainfo

 Name                                                  Null?    Type

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

 NAME                                                          VARCHAR2(32)

 BYTES                                                          NUMBER

 RESIZEABLE                                               VARCHAR2(3)

 

 RESIZEABLE  为YES,则可以在线更改,及时生效,如果为NO,则只能重启生效。

sys@TEST1107> select * from v$sgainfo;

 

NAME                                  BYTES RES

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

Fixed SGA Size                      2227984 No

Redo Buffers                        8847360 No

Buffer Cache Size                 352321536 Yes

Shared Pool Size                  335544320 Yes

Large Pool Size                    16777216 Yes

Java Pool Size                     16777216 Yes

Streams Pool Size                  16777216 Yes

Shared IO Pool Size                       0 Yes

Granule Size                       16777216 No

Maximum SGA Size                 1269366784 No

Startup overhead in Shared Pool    97589480 No

Free SGA Memory Available         520093696

 

12 rows selected.

 

 

sys@TEST1107> alter system set sga_max_size=1200M;

alter system set sga_max_size=1200M

                 *

ERROR at line 1:

ORA-02095: specified initialization parameter cannot be modified

 

 

sys@TEST1107> alter system set sga_max_size=1200M scope=spfile;

 

System altered.

 

如果不加scope,则不能修改,如果加了scope=spfile,意味着重启后生效。

 

sys@TEST1107> alter system set large_pool_size=20M;

 

System altered.

 

sys@TEST1107> select * from v$sgainfo;

 

NAME                                  BYTES RES

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

Fixed SGA Size                      2227984 No

Redo Buffers                        8847360 No

Buffer Cache Size                 335544320 Yes

Shared Pool Size                  335544320 Yes

Large Pool Size                    33554432 Yes

Java Pool Size                     16777216 Yes

Streams Pool Size                  16777216 Yes

Shared IO Pool Size                       0 Yes

Granule Size                       16777216 No

Maximum SGA Size                 1269366784 No

Startup overhead in Shared Pool    97589480 No

Free SGA Memory Available         520093696

 

12 rows selected.

 

418.Using Oracle Enterprise Manager to set SGA pool values manually, for which of the following pools does Oracle EM offer advice to set the value appropriately? (Choose all that apply.)

A. DB_CACHE_SIZE

B. SHARED_POOL_SIZE

C. LARGE_POOL_SIZE

D. JAVA_POOL_SIZE

E. SGA_MAX_SIZE

F. SORT_AREA_SIZE

 

 

Answer: AB

答案解析:

当不是AMM后者ASMM管理的时候,在EM上的内存知道A,B两个选项旁边会有建议合适的值。

 

419.In Oracle 11g, by default which one of the following conditions implicitly enables Automatic PGA Memory Management?

A. Setting a nonzero value for SGA_TARGET

B. Configuring Automatic Shared Memory Management

C. Configuring Automatic Memory Management

D. Setting a nonzero value for SGA_MAX_SIZE and PGA_AGGREGATE_TARGET

E. None of the above

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10897/instance.htm#ADMQS12038

 

About Memory Management

Memory management involves maintaining optimal sizes for the Oracle instance memory structures as demands on the database change. The memory that must be managed is the System Global Area (SGA) memory and the instance Program Global Area (PGA) memory. The instance PGA memory is the collection of memory allocations for all individual PGAs.

Beginning with Oracle Database 11g release 1 (11.1), you can let the database manage the SGA memory and instance PGA memory completely. You designate only the total memory size to be used by the instance, and Oracle Database dynamically exchanges memory between the SGA and the instance PGA as needed to meet processing demands. This capability is referred to as automatic memory management. In this memory management mode, the database also dynamically tunes the sizes of the individual SGA components and the sizes of the individual PGAs.

To have more direct control over the sizes of the SGA and instance PGA, use the Memory Advisors page of Database Control to disable automatic memory management and enable automatic shared memory management.

With automatic shared memory management, you set target and maximum sizes for the SGA. Oracle Database then tunes the total size of the SGA to your designated target, and dynamically tunes the sizes of all SGA components.

When you enable automatic shared memory management, you also implicitly enable automatic PGA memory management. With automatic PGA memory management, you set a target size for the instance PGA. The database then tunes the size of the instance PGA to your target, and dynamically tunes the sizes of individual PGAs.

If you want complete control of individual SGA component sizes, then use the Memory Advisors page of Database Control to disable both automatic memory management and automatic shared memory management. This is called manual shared memory management. In this mode, you set the sizes of several individual SGA components, thereby determining the overall SGA size. You then manually tune these individual SGA components on an ongoing basis.

Manual shared memory management mode is intended for experienced DBAs only. Note that in this mode, automatic PGA memory management remains enabled.

 

 

420.Automatic PGA Memory Management eliminates the need to manually configure which of the following initialization parameters? (Choose all that apply.)

A. SORT_AREA_SIZE

B. HASH_AREA_SIZE

C. BITMAP_MERGE_AREA_SIZE

D. CREATE_BITMAP_AREA_SIZE

E. PGA_AGGREGATE_TARGET

 

 

Answer: ABCD

 答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#ADMIN11208

Using Manual PGA Memory Management

Oracle Database supports manual PGA memory management, in which you manually tune SQL work areas.In releases earlier than Oracle Database 10g, the database administrator controlled the maximum size of SQL work areas by setting the following parameters:SORT_AREA_SIZEHASH_AREA_SIZEBITMAP_MERGE_AREA_SIZE and CREATE_BITMAP_AREA_SIZE. Setting these parameters is difficult, because the maximum work area size is ideally selected from the data input size and the total number of work areas active in the system. These two factors vary greatly from one work area to another and from one time to another. Thus, the various *_AREA_SIZE parameters are difficult to tune under the best of circumstances.

For this reason, Oracle strongly recommends that you leave automatic PGA memory management enabled.

If you decide to tune SQL work areas manually, you must set the WORKAREA_SIZE_POLICY initialization parameter to MANUAL.

Note:

The initialization parameter WORKAREA_SIZE_POLICY is a session- and system-level parameter that can take only two values:MANUAL or AUTO. The default is AUTO. You can set PGA_AGGREGATE_TARGET, and then switch back and forth from auto to manual memory management mode. When WORKAREA_SIZE_POLICY is set to AUTO, your settings for *_AREA_SIZE parameters are ignored.

 

421.When tuning Automatic PGA Memory Management, which of the following views will provide the information specified?

A. The V$PGA_TARGET_ADVICE view shows the predicted cache hit-ratio improvement if you increase PGA_AGGREGATE_TARGET.

B. The V$PGA_TARGET_ADVICE view shows how the V$SQL_WORKAREA histogram will change if you change the value of PGA_AGGREGATE_TARGET.

C. The V$PGA_TARGET_ADVICE_HISTOGRAM view shows how the V$SQL_WORKAREA_HISTOGRAM will change if you switch between Manual and Automatic PGA Memory Management.

D. The V$PGA_TARGET_ADVICE view shows how performance will improve for the different work areas if you switch from Manual to Automatic PGA Memory Management.

 

 

Answer: A

答案解析:

V$PGA_TARGET_ADVICE predicts how the cache hit percentage and over allocation count statistics displayed by the V$PGASTAT performance view would be impacted if the value of the PGA_AGGREGATE_TARGET parameter is changed. The prediction is performed for various values of the PGA_AGGREGATE_TARGET parameter, selected around its current value. The advice statistic is generated by simulating the past workload run by the instance.

The content of the view is empty if PGA_AGGREGATE_TARGET is not set. In addition, the content of this view is not updated if the STATISTICS_LEVEL parameter is set to BASIC. Base statistics for this view are reset at instance startup and when the value of the PGA_AGGREGATE_TARGET initialization parameter is dynamically modified.

 

422.To enable resumable space allocation for the instance, which of the following initialization parameters should you set to a nonzero value?

A. RESUMABLE_SPACE_TIME

B. RESUMABLE_SPACE

C. RESUMABLE_TIME

D. RESUMABLE_TIMEOUT

E. TIME_RESUMABLE

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schema.htm#ADMIN11589

 

 

Setting the RESUMABLE_TIMEOUT Initialization Parameter

You can specify a default system wide timeout interval by setting the RESUMABLE_TIMEOUT initialization parameter. For example, the following setting of theRESUMABLE_TIMEOUT parameter in the initialization parameter file sets the timeout period to 1 hour:

RESUMABLE_TIMEOUT  = 3600

If this parameter is set to 0, then resumable space allocation is disabled even for sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value.

You can also use the ALTER SYSTEM SET statement to change the value of this parameter at the system level. For example, the following statement disables resumable space allocation for all sessions that run an ALTER SESSION ENABLE RESUMABLE statement without a timeout value:

ALTER SYSTEM SET RESUMABLE_TIMEOUT=0;

 

 

423.Which of the following describes how a distributed resumable transaction behaves?
A. The resumable setting on the initiating session determines the resumable conditions for the entire distributed transaction.
B. The resumable setting for the initiating instance determines the resumable conditions for the entire distributed transaction.
C. The resumable setting on the initiating session controls only that part of the transaction that occurs within the local instance; remote resumable settings determine the behavior of the distributed parts of the transaction.
D. None of the above.

 

Answer: C

 

424.Which of these components correctly identify the unique value of the NAME column in the DBA_RESUMABLE view?

A. Username, instance number, session ID

B. Instance number, username, session ID

C. Instance number, session ID, username

D. Username, session ID, instance number

E. None of the above

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e22490/ldr_params.htm#SUTIL1039

 

RESUMABLE_NAME

Default: 'User USERNAME (USERID), Session SESSIONID, Instance INSTANCEID'

The value for this parameter identifies the statement that is resumable. This value is a user-defined text string that is inserted in either the USER_RESUMABLE orDBA_RESUMABLE view to help you identify a specific resumable statement that has been suspended.

This parameter is ignored unless the RESUMABLE parameter is set to true to enable resumable space allocation.

 

 

425.Which of the following are included in a transportable tablespace set? (Choose all that apply.)
A. The datafiles that make up a self-contained group of tablespaces required for copy
B. The system tablespace
C. An export of the tablespace metadata
D. The spfile
E. All of the above

 

Answer: AC

 

426.The following query will provide what information about transportable tablespaces for the current database? (Choose all that apply.)

select d.platform_name "Source", t.platform_name
"Compatible Targets", endian_format
from v$transportable_platform t, v$database d
where t.endian_format = (select endian_format
from v$transportable_platform t,
v$database d
where d.platform_name =
platform_name);
A. The list of target platforms having the same endian format as the source database
B. The list of target platforms requiring endian conversion
C. The list of target platforms that will not require endian conversion
D. The list of all target platforms that can receive transportable tablespaces from the source database
E. None of the above

 

Answer: AC

 

 

427.When exporting metadata for the transportable tablespaces, what is the correct next step after confirming endian format?
A. Export the tablespaces using data pump.
B. Determine if the transportable set is self-contained.
C. Convert the datafiles using RMAN.
D. Copy the datafiles from source to destination.

 

Answer: B

 

428.Which of the following are prerequisite steps to transport a database? (Choose all that apply.)
A. Query the V$TRANSPORTABLE_PLATFORMS view in the source database to determine if the intended destination is listed.
B. Verify that there are no restrictions or limitations that the source or destination database may encounter.
C. Verify that the source and destination have the same Oracle version, critical updates, patch-set version, and patch- set exceptions.
D. Determine if you will perform the conversion on the source or destination platform.
E. None of the above.

 

Answer: ABD

 

429.Which of the following supplied functions is used to identify external tables, directories, and BFILES?

A. DBMS_TDB.CHECK_DIRECTORIES

B. DBMS_TDB.CHECK_EXTERNAL

C. DBMS_TDB.CHECK_BFILE

D. DBMS_TDB.CHECK_EXT

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_tdb.htm#ARPLS68854

 

 

The DBMS_TDB package reports whether a database can be transported between platforms using the RMAN CONVERT DATABASE command. The package verifies that databases on the current host platform are of the same endian format as the destination platform, and that the state of the current database does not prevent transport of the database.

 

Overview

In many cases, Oracle supports transporting databases between platforms which have the same endian format. However, even when the endian formats are the same, a database must undergo a conversion process to move from one platform to another. There are also preconditions required for the process of transporting a database, such as having the database to be transported open read-only.

The DBMS_TDB package serves two purposes:

Confirming that Oracle supports transporting a database from a given source platform to a given target platform

Determining whether a database to be transported has been properly prepared for transport, and if not, identifying the condition that prevents database transport

The actual conversion is performed using the Recovery Manager CONVERT DATABASE command. For a complete discussion of the requirements for transporting a database, the process of converting a database for transport across platforms, and examples of the use of the DBMS_TDB subprograms in the conversion process, see Oracle Database Backup and Recovery User's Guide.

 

CHECK_EXTERNAL Function

This function determines whether a database has external tables, directories, or BFILEs.

Syntax

DBMS_TDB.CHECK_EXTERNAL

   RETURN BOOLEAN;

Return Values

If the database has external tables, directories, or BFILEs, return TRUE. Otherwise, return FALSE.

Usage Notes

If SERVEROUTPUT is ON, then the function will output the names of the external tables, directories, and BFILEs in the database.

The database must be open read-write.

Examples

This example illustrates the use of CHECK_EXTERNAL with a database that has several external tables, directories, and BFILEs:

SQL> SET SERVEROUTPUT ON

SQL> DECLARE

        external BOOLEAN;

     BEGIN

       external := DBMS_TDB.CHECK_EXTERNAL;

     END;

     /

The following external tables exist in the database:

SH.SALES_TRANSACTIONS_EXT

The following directories exist in the database:

SYS.MEDIA_DIR, SYS.DATA_FILE_DIR, SYS.LOG_FILE_DIR, SYS.DATA_PUMP_DIR

The following BFILEs exist in the database:

PM.PRINT_MEDIA

 

PL/SQL procedure successfully completed.

 

 

430.Which of the following is a prerequisite for running DBMS_TDB.CHECK_DB to a successful completion?

A. The database must be in read-write mode.

B. The database must have no external files.

C. The database must open in read-only mode.

D. The database must be mounted but not opened.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_tdb.htm#ARPLS68864

 

CHECK_DB Function

This function checks whether a database can be transported to a target platform. It tests whether transport is supported at all for a given source and destination platform, and whether the database is currently in the correct state for transport.

You can specify whether to skip checking parts of the database that are read-only or offline, if you do not plan to transport them.

The function is overloaded. The different functionality of each form of syntax is presented along with the definition.

Syntax

DBMS_TDB.CHECK_DB (

     target_platform_name   IN VARCHAR2,

     skip_option            IN  NUMBER)

   RETURN BOOLEAN;

 

DBMS_TDB.CHECK_DB (

     target_platform_name   IN VARCHAR2)

   RETURN BOOLEAN;

 

DBMS_TDB.CHECK_DB

   RETURN BOOLEAN;

Parameters

Table 151-3 CHECK_DB Function Parameters

Parameter

Description

target_platform_name

The name of the destination platform, as it appears in V$DB_TRANSPORTABLE_PLATFORM.

skip_option

Specifies which, if any, parts of the database to skip when checking whether the database can be transported. Supported values are listed in Table 151-1, "DBMS_TDB Constants".

 

Return Values

If the database cannot be transported to the target platform or is not ready to be transported, returns FALSE. If the database is ready for transport, returnsTRUE.

Usage Notes

If SERVEROUTPUT is ON, then the output will contain the reasons why the database cannot be transported and how to fix the problems. For details on possible reasons and fixes, see Table 151-4, "Reasons for CHECK_DB Function to Return FALSE".

Table 151-4 Reasons for CHECK_DB Function to Return FALSE

Cause

Action

Unrecognized target platform name.

Check V$DB_TRANSPORTABLE_PLATFORM for recognized platform names.

Target platform has a different endian format.

Conversion is not supported.

Database is not open read-only.

Open database read-only and retry.

There are active or in-doubt transactions in the database.

Open the database read-write. After the active transactions are rolled back, open the database read-only and retry the operation.

This situation can occur if users flash back the database and open it read only. The active transactions will be rolled back when the database is opened read-write.

Deferred transaction rollback needs to be done.

Open the database read-write and bring online the necessary tablespaces. Once the deferred transaction rollback is complete, open the database read-only and retry the operation.

Database compatibility version is below 10.0.0.

Change the COMPATIBLE initialization parameter to 10.0.0 or higher, open the database read-only, and retry the operation.

Some tablespaces have not been open read-write with compatibility version is 10.0.0 or higher.

Change the COMPATIBLE initialization parameter to 10.0.0 or higher, then open the affected tablespaces read-write. Shut down the database, open it read-only, and retry the operation.

 

Examples

This example illustrates the use of CHECK_DB with a database that is open read-write:

SQL> SET SERVEROUTPUT ON

SQL> DECLARE

       db_ready BOOLEAN;

     BEGIN

       db_ready := DBMS_TDB.CHECK_DB('Microsoft Windows IA (32-bit)');

     END;

     /

 

Database is not open READ ONLY. Please open database READ ONLY and retry.

 

PL/SQL procedure successfully completed.

 

 

 

431.Which of the following options describes Segment Shrink?

A. Reclaims space above and below the high-water mark without using additional space

B. Moves rows to a new physical location, resetting the high-water mark, but uses additional space during the operation

C. Deallocates space above the high-water mark that is currently not in use

D. None of the above

 

 

Answer: A

答案解析:

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

段收缩:主要就是调整高水位来利用更多的空闲空间

 

432.For which of the following can you use Segment Shrink? (Choose all that apply.)

A. Heap tables

B. Tables with function-based indexes

C. Indexes

D. Partitions and subpartitions

E. None of the above

 

 

Answer: ACD

答案解析:

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

 

• 候选段类型包括:

– 按堆组织的表和索引表

– 索引

– 分区和子分区

– 实体化视图和实体化视图日志

 

 

433.When shrinking a table segment, you choose to shrink all the indexes for that table using the SHRINK SPACE command. Which clause should you use?

A. INCLUDING DEPENDENCIES

B. INCLUDING DEPENDENCIES CASCADE

C. COMPACT

D. CASCADE

E. None of the above

 

 

Answer: D

答案解析:

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

 

使用SHRINK SPACE子句可以收缩段中的空间。如果指定了CASCADE,则收缩行为将级联到所有支持收缩操作的从属段,但实体化视图、LOB 索引和IOT(索引表)映射表例外。

 

CASCADE If you specify CASCADE, then Oracle Database performs the same operations on all dependent objects of table, including secondary indexes on index-organized tables.

 

434.Which of these represent the main components of Database Resource Manager? (Choose all that apply.)

A. Resource consumer groups

B. Resource plans

C. Resource-plan groups

D. Resource-plan directives

E. All of the above

 

 

Answer: ABD

答案解析:

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

主要由以下三个组成:

“资源使用者组”定义了具有相似的系统或数据库资源使用需求的一组用户或会话。

“资源计划”指定如何在各个资源使用者组之间分配资源。使用数据库资源管理器还可以在计划中创建计划,这称为“子计划”。

“资源计划指令”指定如何在使用者组或子计划之间共享某个特定资源。通过计划指令,可以将资源使用者组及子计划与特定的资源计划关联起来。

 

435.Every resource plan must contain an allocation to which consumer group?

A. LOW_GROUP

B. SYS_GROUP

C. DEFAULT_GROUP

D. BASE_GROUP

E. OTHER_GROUPS

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN11846

题意问:每一个资源计划必须包含一个分配到哪一个消费群?

here are special consumer groups that are always present in the data dictionary. They cannot be modified or deleted. They are:

SYS_GROUP

This is the initial consumer group for all sessions created by user accounts SYS or SYSTEM. This initial consumer group can be overridden by session-to–consumer group mapping rules.

OTHER_GROUPS

This consumer group contains all sessions that have not been assigned to a consumer group. Every resource plan must contain a directive toOTHER_GROUPS.

 

436.Which DBMS_RESOURCE_MANAGER procedure prioritizes consumer-group mappings?
A. CREATE_MAPPING_PRIORITY
B. SET_MAPPING_PRIORITY
C. SET_MAPPING_ORDER
D. PRIORITIZE_MAPPING_ORDER
E. This functionality is not available through the DBMS_RESOURCE_MANAGER package.

 

Answer: B

 

437.Within a resource-plan definition, what differentiates a top-level plan from a subplan?
A. A subplan has the PLAN_SUB parameter value set to SUB.
B. A top-level plan has the GROUP_OR_PLAN parameter set to the name of the subplan in the
resource-plan definition.
C. There is no difference in the resource-plan definition.
D. A subplan always has the CPU_MTH parameter value set to RATIO.
E. The string TOP_LEVEL is appended to the name of top-level resource plans.

 

Answer: C

 

438.When setting arguments for a job, which procedure do you use for types that cannot be implicitly converted to and from a VARCHAR2 datatype?

A. SET_JOB_ARGUMENT_VALUE

B. SET_JOB_VALUE_ANYDATA

C. SET_JOB_ANYDATA_VALUE

D. SET_SPECIAL_JOB_VALUE

E. SET_JOB_ANYTYPE_VALUE

 

 

Answer: C 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN12386

 

 SET_JOB_ANYDATA_VALUE is used for complex data types that cannot be represented as a VARCHAR2 string.

 

 

439.Which DBMS_SCHEDULER procedures can be used to enable a program? (Choose all that apply.)
A. ENABLE
B. ENABLE_PROGRAM

C.VALIDATE_PROGRAM

D.SET_ATTRIBUTE
E. SET_ENABLED

 

Answer: AD

 

440.Which of the following is not a valid calendaring syntax element?
A. FREQ
B. BYHOUR

C.RUNDATE

D.INTERVAL

E.BYMINUTE

 

Answer: C

 

441.Which Scheduler view(s) can be queried to see which jobs are currently executing? (Choose all that apply.)

A. DBA_SCHEDULER_JOB_RUN_DETAILS

B. DBA_SCHEDULER_RUNNING_JOBS

C. DBA_SCHEDULER_CURRENT_JOBS

D. DBA_SCHEDULER_JOBS

E. DBA_SCHEDULER_EXECUTING_JOBS

 

 

Answer: BD

答案解析:

 

 

BA_SCHEDULER_JOB_RUN_DETAILS displays log run details for all Scheduler jobs in the database. Its columns are the same as those inALL_SCHEDULER_JOB_RUN_DETAILS.

 

DBA_SCHEDULER_RUNNING_JOBS displays information about all running Scheduler jobs in the database. Its columns are the same as those inALL_SCHEDULER_RUNNING_JOBS.

 

DBA_SCHEDULER_CURRENT_JOBS没有这个

 

DBA_SCHEDULER_JOBS displays information about all Scheduler jobs in the database. Its columns are the same as those in ALL_SCHEDULER_JOBS.

 

DBA_SCHEDULER_EXECUTING_JOBS没有这个

 

 

442.A schedule defined entirely within the confines of a Scheduler job object is known as a (n)
A. Fixed schedule
B. Inline schedule
C. Stored schedule
D. Hard-coded schedule
E. None of the above

 

Answer: B

 

443.Which DBMS_SCHEDULER procedure(s) can be used to alter an existing job? (Choose all that apply.)

A. SET_ATTRIBUTE_NULL

B. ALTER_JOB

C. ALTER_JOB_PARAMETERS

D. ALTER

E. SET_ATTRIBUTE

 

 

Answer: AE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#ARPLS72402

题问:哪一个DBMS_SCHEDULER包的存储过程可以用来改变现有存在的作业?

 

SET_ATTRIBUTE Procedure

Changes an attribute of a job, schedule, or other Scheduler object

SET_ATTRIBUTE_NULL Procedure

Changes an attribute of an object to NULL

 

SET_ATTRIBUTE Procedure

This procedure modifies an attribute of a Scheduler object. It is overloaded to accept values of various types. To set an attribute to NULL, use theSET_ATTRIBUTE_NULL procedure. The attributes that can be set depend on the object being altered. All object attributes can be changed, except the object name.

 

SET_ATTRIBUTE_NULL Procedure

This procedure sets an attribute of an object to NULL. The attributes that can be set depend on the object being altered. If the object is enabled, it is disabled before being altered and reenabled afterward. If the object cannot be reenabled, an error is generated and the object is left in a disabled state.

 

 

444.What is the default value for the ENABLED attribute of a job or program when it is created?

A. TRUE
B. FALSE
C. There is no default. It must be defined at creation time.
D. PENDING
E. NULL

 

Answer: B

 

445.To set the history retention period for either window logging or job logging individually, which parameters of the SET_SCHEDULER_ATTRIBUTE procedure need to be used? (Choose all that apply.)

A. LOG_HISTORY

B. JOB_LOG_RETENTION

C. WINDOW_LOG_RETENTION

D. WHICH_LOG

E. LOG_NAME

 

 

Answer: AD

 

SET_SCHEDULER_ATTRIBUTE Procedure

This procedure sets the value of a Scheduler attribute. This takes effect immediately but the resulting changes may not be seen immediately.

Table 129-97 provides short attribute descriptions for the SET_SCHEDULER_ATTRIBUTE procedure. For complete descriptions, see section "Setting Scheduler Preferences" in Oracle Database Administrator's Guide.

Syntax

DBMS_SCHEDULER.SET_SCHEDULER_ATTRIBUTE (

   attribute      IN VARCHAR2,

   value          IN VARCHAR2);

Parameters

Table 129-97 SET_SCHEDULER_ATTRIBUTE Procedure Parameters

Parameter

Description

attribute

The name of the Scheduler attribute. Possible values are:

'default_timezone': Repeating jobs and windows that use the calendaring syntax retrieve the time zone from this attribute when start_date is not specified. See "Calendaring Syntax" for more information.

'email_server': The SMTP server address that the Scheduler uses to send e-mail notifications for job state events. E-mail notifications cannot be sent if this attribute is NULL.

'email_sender': The default e-mail address of the sender of job state e-mail notifications.

'email_server_credential': The schema and name of an existing credential object that SYS has execute object privileges on. Default is NULL. The username and password stored in this credential are used to authenticate with the e-mail server when sending e-mail notifications.

This functionality is available with Oracle Database 11g Release 2 (11.2.0.2).

'email_server_encryption': This attribute indicates whether or not encryption is enabled for this email server connection, and if so, at what point encryption starts, and with which protocol. Values are:

NONE: the default, indicating no encryption used

SSL_TLS: indicating that either SSL or TLS are used, from the beginning of the connection

STARTTLS:indicating that the connection starts unencrypted, but the command STARTTLS is sent to the e-mail server and starts encryption

This functionality is available starting with Oracle Database 11g Release 2 (11.2.0.2).

'event_expiry_time': The time, in seconds, before a job state event generated by the Scheduler expires from the Scheduler event queue. If NULL, job state events expire after 24 hours.

'log_history': The number of days that log entries for both the job log and the window log are retained. Default is 30 and the range of valid values is 0 through 1000000.

'max_job_slave_processes': This Scheduler attribute is not used.

value

The new value of the attribute

 

Usage Notes

To run SET_SCHEDULER_ATTRIBUTE, you must have the MANAGE SCHEDULER privilege.


 

 

 

PURGE_LOG Procedure

By default, the Scheduler automatically purges all rows in the job log and window log that are older than 30 days. The PURGE_LOG procedure is used to purge additional rows from the job and window log.

Rows in the job log table pertaining to the steps of a chain are purged only when the entry for the main chain job is purged (either manually or automatically).

Syntax

DBMS_SCHEDULER.PURGE_LOG (

   log_history             IN PLS_INTEGER  DEFAULT 0,

   which_log               IN VARCHAR2     DEFAULT 'JOB_AND_WINDOW_LOG',

   job_name                IN VARCHAR2     DEFAULT NULL);

Parameters

Table 129-69 PURGE_LOG Procedure Parameters

Parameter

Description

log_history

This specifies how much history (in days) to keep. The valid range is 0 - 1000000. If set to 0, no history is kept.

which_log

This specifies the log type. Valid values are: job_logwindow_log, and job_and_window_log.

job_name

This specifies which job-specific entries must be purged from the jog log. This can be a comma-delimited list of job names and job classes. Whenever job_name has a value other than NULL, the which_log argument implicitly includes the job log.

 

Usage Notes

This procedure requires the MANAGE SCHEDULER privilege.

Examples

The following completely purges all rows from both the job log and the window log:

DBMS_SCHEDULER.PURGE_LOG();

The following purges all rows from the window log that are older than 5 days:

DBMS_SCHEDULER.PURGE_LOG(5, 'window_log');

The following purges all rows from the window log that are older than 1 day and all rows from the job log that are related to jobs in jobclass1 and older than 1 day:

DBMS_SCHEDULER.PURGE_LOG(1, 'job_and_window_log', 'sys.jobclass1');

 

 

446.Consider the following code snippet:

BEGIN

DBMS_SCHEDULER.SET_ATTRIBUTE (

name => ,,lne_job1,

attribute => ,,job_priority,

value => 1);

END;

/

If this code were executed, which of the following statements would be true?

A. The priority of the lne_job1 job would be set to 1.

B. The lne_job1 job would be executed synchronously.

C. The lne_job1 job would run immediately in the users current session.

D. The lne_job1 job would retain its current priority.

E. The job will immediately take priority over all running jobs.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#ARPLS72409

 

 

SET_ATTRIBUTE Procedure

This procedure modifies an attribute of a Scheduler object. It is overloaded to accept values of various types. To set an attribute to NULL, use theSET_ATTRIBUTE_NULL procedure. The attributes that can be set depend on the object being altered. All object attributes can be changed, except the object name.

Syntax

DBMS_SCHEDULER.SET_ATTRIBUTE (

   name           IN VARCHAR2,

   attribute      IN VARCHAR2,

   value          IN {BOOLEAN|DATE|TIMESTAMP|

                        TIMESTAMP WITH TIME ZONE|TIMESTAMP WITH LOCAL TIME ZONE|

                        INTERVAL DAY TO SECOND});

 

DBMS_SCHEDULER.SET_ATTRIBUTE (

   name           IN VARCHAR2,

   attribute      IN VARCHAR2,

   value          IN VARCHAR2,

   value2         IN VARCHAR2 DEFAULT NULL);

Parameters

Table 129-79 SET_ATTRIBUTE Procedure Parameters

Parameter

Description

name

The name of the object

attribute

See Table 129-81 through Table 129-91.

value

The new value being set for the attribute. This cannot be NULL. To set an attribute value to NULL, use the SET_ATTRIBUTE_NULLprocedure.

value2

The value2 argument is for an optional second value. Most attributes have only one value associated with them, but some can have two.

 

job_priority

This attribute specifies the priority of this job relative to other jobs in the same class as this job. If multiple jobs within a class are scheduled to be executed at the same time, the job priority determines the order in which jobs from that class are picked up for execution by the job coordinator. It can be a value from 1 through 5, with 1 being the first to be picked up for job execution.

If no job priority is specified when creating a job, the default priority of 3 is assigned to it.

 

 

447.Which of the following calendaring syntax expressions would evaluate to the last day of every month?

A. FREQ = MONTHLY; BYMONTHDAY = 31

B. FREQ = MONTHLY; BYMONTHDAY = -1

C. FREQ = DAILY; BYDAY = -1

D. FREQ = MONTHLY; BYDAY = 31

E. FREQ = DAILY; BYMONTHDAY = LAST_DAY

 

 

Answer: B

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN12676

 

Run on the last day of every month.

FREQ=MONTHLY; BYMONTHDAY=-1;

 

 

448.Which of the following tasks is not performed by the job coordinator?
A. Update job log when a job completes
B. Spawn and remove job slaves
C. Write/read job info to/from memory cache

D. Query job table
E. Pass job information to job slaves

 

Answer: A

 

449.Which of the following objects can be directly referenced by a window object? (Choose all that apply.)
A. Schedule object
B. Program object
C. Job object
D. Resource plan
E. Resource consumer group

 

Answer: AD

 

 

450.Which of the following are valid program types for a lightweight job? (Choose all that apply.)

A. PLSQL_BLOCK

B. EXECUTABLE

C. JAVA_STORED_PROCEDURE

D. STORED_PROCEDURE

E. EXTERNAL

 

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schedover.htm#ADMIN12357

 

Programs

A program object (program) describes what is to be run by the Scheduler. A program includes:

An action: For example, the name of a stored procedure, the name of an executable found in the operating system file system (an "external executable"), or the text of a PL/SQL anonymous block.

A type: STORED_PROCEDUREPLSQL_BLOCK, or EXTERNAL, where EXTERNAL indicates an external executable.

Number of arguments: The number of arguments that the stored procedure or external executable accepts.

A program is a separate entity from a job. A job runs at a certain time or because a certain event occurred, and invokes a certain program. You can create jobs that point to existing program objects, which means that different jobs can use the same program and run the program at different times and with different settings. With the right privileges, different users can use the same program without having to redefine it. Therefore, you can create program libraries, where users can select from a list of existing programs.

If a stored procedure or external executable referenced by the program accepts arguments, you define these arguments in a separate step after creating the program. You can optionally define a default value for each argument.

 

 

451.Which of the following is not a valid setting for the PROGRAM_TYPE parameter in a program object or the JOB_TYPE parameter in a job object?

A. PLSQL_BLOCK

B. JAVA_STORED_PROCEDURE

C. STORED_PROCEDURE

D. EXECUTABLE

E. None of the above are invalid settings.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#ARPLS72307

 

 

program_type

This attribute specifies the type of program you are creating. If it is not specified then you get an error. There are three supported values for program_type:

'PLSQL_BLOCK'

This specifies that the program is a PL/SQL block. Job or program arguments are not supported when the job or program type is PLSQL_BLOCK. In this case, the number of arguments must be 0.

'STORED_PROCEDURE'

This specifies that the program is a PL/SQL or Java stored procedure, or an external C subprogram. Only procedures, not functions with return values, are supported. PL/SQL procedures with INOUT or OUT arguments are not supported.

'EXECUTABLE'

This specifies that the program is external to the database. External programs imply anything that can be executed from the operating system command line. AnyData arguments are not supported with job or program type EXECUTABLE.

 

452.Which of the following Scheduler elements encourage object reuse? (Choose all that apply.)
A. Schedule objects
B. Program arguments
C. Job classes
D. Job arguments
E. All of the above

 

Answer: ABD

 

453.What is the danger associated with stopping a running job by using the STOP_JOB procedure?

A. The job will need to be reenabled before it will execute again.

B. The job may hold locks on objects referenced within it.

C. All jobs within the job group will also be stopped.

D. The job may leave data in an inconsistent state.

E. There is no danger in using the STOP_JOB procedure.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN12399

 

Stopping Jobs

You stop one or more running jobs using the STOP_JOB procedure or Enterprise Manager. STOP_JOB accepts a comma-delimited list of jobs, job classes, and job destination IDs. A job destination ID is a number, assigned by the Scheduler, that represents a unique combination of a job, a credential, and a destination. It serves as a convenient method for identifying a particular child job of a multiple-destination job and for stopping just that child. You obtain the job destination ID for a child job from the *_SCHEDULER_JOB_DESTS views.

If a job class is supplied, all running jobs in the job class are stopped. For example, the following statement stops job job1, all jobs in the job class dw_jobs, and two child jobs of a multiple-destination job:

BEGIN

  DBMS_SCHEDULER.STOP_JOB('job1, sys.dw_jobs, 984, 1223');

END;

/

All instances of the designated jobs are stopped. After stopping a job, the state of a one-time job is set to STOPPED, and the state of a repeating job is set toSCHEDULED (because the next run of the job is scheduled). In addition, an entry is made in the job log with OPERATION set to 'STOPPED', and ADDITIONAL_INFO set to 'REASON="Stop job called by user: username"'.

By default, the Scheduler tries to gracefully stop a job using an interrupt mechanism. This method gives control back to the slave process, which can collect statistics of the job run. If the force option is set to TRUE, the job is abruptly terminated and certain run-time statistics might not be available for the job run.

Stopping a job that is running a chain automatically stops all running steps (by calling STOP_JOB with the force option set to TRUE on each step).

You can use the commit_semantics argument of STOP_JOB to control the outcome if multiple jobs are specified and errors occur when trying to stop one or more jobs. If you set this argument to ABSORB_ERRORS, the procedure may be able to continue after encountering an error and attempt to stop the remaining jobs. If the procedure indicates that errors occurred, you can query the view SCHEDULER_BATCH_ERRORS to determine the nature of the errors. See "Dropping Jobs" for a more detailed discussion of commit semantics.

See Oracle Database PL/SQL Packages and Types Reference for detailed information about the STOP_JOB procedure.

Caution:

When a job is stopped, only the current transaction is rolled back. This can cause data inconsistency.

 

 

454.If a job references a schedule that has been disabled, what will be the result?
A. The job will be automatically disabled.
B. The job will never execute.
C. The job will attempt to execute but will fail.
D. The job will inherit the DEFAULT_SCHEDULE schedule.
E. A schedule object cannot be disabled.

 

Answer: E

 

455.When a job exceeds the date specified in its END_DATE attribute, which of the following will happen?(Choose all that apply.)
A. The job will be dropped automatically if the value of the AUTO_DROP attribute is TRUE.

B. The job will only be disabled if the value of the AUTO_DROP attribute is FALSE.
C. The STATE attribute of the job will be set to COMPLETED if the value of the AUTO_DROP attribute is FALSE.
D. All objects referenced by the job will be dropped if the value of the AUTO_DROP attribute is TRUE and the value of the CASCADE attribute is TRUE.
E. The STATE column of the job table will be set to COMPLETED for the job.

 

Answer: ABE

 

456.Which of the following is true about job chains?

A. They consist of one or more Scheduler programs.

B. They are used to implement dependency scheduling.

C. They are used to implement time-based scheduling.

D. They are used to implement event-based scheduling.

E. None of the above.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/scheduse.htm#ADMIN10021

 

Creating and Managing Job Chains

A job chain ("chain") is a named series of tasks that are linked together for a combined objective. Chains are the means by which you can implement dependency based scheduling, in which jobs are started depending on the outcomes of one or more previous jobs

 

 

457.If two windows overlap, which window attribute will determine whether one should be chosen over the other?

A. WINDOW_PRIORITY

B. PRIORITY

C. PRIORITY_LEVEL

D. WINDOW_PRIORITY_LEVEL

E. OVERLAP_RULE

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#ARPLS72311

 

 

WINDOW_PRIORITY

VARCHAR2(4)

 

Priority of the job relative to other windows:

HIGH

LOW

 

window_priority

This attribute is only relevant when two windows overlap. Because only one window can be in effect at one time, the window priority determines which window opens. The two possible values for this attribute are 'HIGH' and 'LOW'. A high priority window has precedence over a low priority window, therefore, the low priority window does not open if it overlaps a high priority window. By default, windows are created with priority 'LOW'.

 

 

 

458.Globalization support is implemented through the text- and character-processing functions provided by which Oracle feature?
A. RSTLNE
B. NLSRTL
C. LISTENER
D. NLSSORT
E. Linguistic sorts

 

Answer: B

 

459.What elements of globalization can be explicitly defined using the NLS_LANG environment variable?(Choose all that apply.)

A. NLS_LANGUAGE

B. NLS_SORT

C. NLS_CALENDAR

D. NLS_CHARACTERSET

E. NLS_TERRITORY

 

 

Answer: ADE

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch3globenv.htm#NLSPG193

 

NLS_LANG

(Read-only) The NLS_LANG option specifies the current language, territory, and database character set, which are determined by session-wide globalization parameters.

xample 5-75 Checking the Current Value of NLS_LANG

SHOW NLS_LANG statement might produce the following.

AMERICAN_AMERICA.WE8ISO8859P1

 

Choosing a Locale with the NLS_LANG Environment Variable

A locale is a linguistic and cultural environment in which a system or program is running. Setting the NLS_LANG environment parameter is the simplest way to specify locale behavior for Oracle Database software. It sets the language and territory used by the client application and the database server. It also sets the client's character set, which is the character set for data entered or displayed by a client program.

NLS_LANG is set as an environment variable on UNIX platforms. NLS_LANG is set in the registry on Windows platforms.

The NLS_LANG parameter has three components: language, territory, and character set. Specify it in the following format, including the punctuation:

NLS_LANG = language_territory.charset

For example, if the Oracle Universal Installer does not populate NLS_LANG, then its value by default is AMERICAN_AMERICA.US7ASCII. The language is AMERICAN, the territory is AMERICA, and the character set is US7ASCII. The values in NLS_LANG and other NLS parameters are case-insensitive.

Each component of the NLS_LANG parameter controls the operation of a subset of globalization support features:

language

Specifies conventions such as the language used for Oracle Database messages, sorting, day names, and month names. Each supported language has a unique name; for example, AMERICANFRENCH, or GERMAN. The language argument specifies default values for the territory and character set arguments. If the language is not specified, then the value defaults to AMERICAN.

territory

Specifies conventions such as the default date, monetary, and numeric formats. Each supported territory has a unique name; for example, AMERICA,FRANCE, or CANADA. If the territory is not specified, then the value is derived from the language value.

charset

Specifies the character set used by the client application (normally the Oracle Database character set that corresponds to the user's terminal character set or the OS character set). Each supported character set has a unique acronym, for example, US7ASCIIWE8ISO8859P1WE8DECWE8MSWIN1252, orJA16EUC. Each language has a default character set associated with it.

NLS_LANGUAGE

Language

Derived from NLS_LANG

I, A

 

NLS_TERRITORY

Territory

Derived from NLS_LANG

I, A

 

460.Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B? (Choose all that apply.)
A. A must contain all of the characters defined in B.
B. A must be Unicode.
C. The encoded values in A must match the encoded values in B for all characters defined in B.
D. A must be a multibyte character set.
E. The encoded values in A must match the encoded values in B for all numeric and alphabetic characters in B.

 

Answer: AC

 

461.The NLS_SORT parameter sets the default sort method for which of the following operations?(Choose all that apply.)
A. WHERE clause
B. ORDER BY clause
C. BETWEEN clause
D. NLSSORT function
E. NLS_SORT function

 

Answer: AD

 

462.Which view shows all valid values for the NLS_LANGUAGE, NLS_SORT, NLS_TERRITORY, and NLS_CHARACTERSET parameters?

A. V$VALID_NLS_VALUES

B. NLS_VALID_VALUES

C. NLS_VALUE_OPTIONS

D. V$NLS_VALUE_OPTIONS

E. V$NLS_VALID_VALUES

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_2076.htm#REFRN30160

 

V$NLS_VALID_VALUES lists all valid values for NLS parameters.

Column

Datatype

Description

PARAMETER

VARCHAR2(64)

Parameter name (LANGUAGE | SORT | TERRITORY | CHARACTERSET)

VALUE

VARCHAR2(64)

NLS parameter value

ISDEPRECATED

VARCHAR2(5)

Indicates whether the parameter has been deprecated (TRUE) or not (FALSE)

 

463.Which of the following datatypes store time-zone information in the database?

A. TIMESTAMP

B. DATE

C. TIMESTAMP WITH TIME ZONE

D. TIMESTAMP WITH LOCAL TIME ZONE

E. DATETIME

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#SQLRF00205

 

TIMESTAMP WITH TIME ZONE Data Type

TIMESTAMP WITH TIME ZONE is a variant of TIMESTAMP that includes a time zone region name or a time zone offset in its value. The time zone offset is the difference (in hours and minutes) between local time and UTC (Coordinated Universal Time—formerly Greenwich Mean Time). This data type is useful for preserving local time zone information.

Specify the TIMESTAMP WITH TIME ZONE data type as follows:

TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONE

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this data type, the value can be a number in the range 0 to 9. The default is 6.

Oracle time zone data is derived from the public domain information available at http://www.iana.org/time-zones/. Oracle time zone data may not reflect the most recent data available at this site.


 

TIMESTAMP WITH LOCAL TIME ZONE Data Type

TIMESTAMP WITH LOCAL TIME ZONE is another variant of TIMESTAMP that is sensitive to time zone information. It differs from TIMESTAMP WITH TIME ZONE in that data stored in the database is normalized to the database time zone, and the time zone information is not stored as part of the column data. When a user retrieves the data, Oracle returns it in the user's local session time zone. This data type is useful for date information that is always to be displayed in the time zone of the client system in a two-tier application.

Specify the TIMESTAMP WITH LOCAL TIME ZONE data type as follows:

TIMESTAMP [(fractional_seconds_precision)] WITH LOCAL TIME ZONE

where fractional_seconds_precision optionally specifies the number of digits Oracle stores in the fractional part of the SECOND datetime field. When you create a column of this data type, the value can be a number in the range 0 to 9. The default is 6.

Oracle time zone data is derived from the public domain information available at http://www.iana.org/time-zones/. Oracle time zone data may not reflect the most recent data available at this site.

 

464.Which of the following are valid settings for the NLS_COMP parameter? (Choose all that apply.)

A. ASCII

B. ANSI

C. BINARY

D. MONOLINGUAL

E. MULTILINGUAL

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams145.htm#REFRN10117

 

NLS_COMP specifies the collation behavior of the database session.

Values:

BINARY

Normally, comparisons in the WHERE clause and in PL/SQL blocks is binary unless you specify the NLSSORT function.

LINGUISTIC

Comparisons for all SQL operations in the WHERE clause and in PL/SQL blocks should use the linguistic sort specified in the NLS_SORT parameter. To improve the performance, you can also define a linguistic index on the column for which you want linguistic comparisons.

ANSI

A setting of ANSI is for backwards compatibility; in general, you should set NLS_COMP to LINGUISTIC

Note:

Unless you explicitly set the value for NLS_COMP in your initialization parameter file, a default value of NULL is shown in the following views: V$PARAMETERV$SYSTEM_PARAMETERV$PARAMETER2V$SYSTEM_PARAMETER2, and NLS_INSTANCE_PARAMETERS. However, the actual default value, and behavior, is BINARY. Note that you cannot change the default to NULL, because NULL is not among the valid values.

Note:

The value of this initialization parameter NLS_COMP is used to initialize the session value of this parameter, which is the actual value referenced by the SQL query processing. This initial value is overridden by a client-side value if the client uses the Oracle JDBC driver or if the client is OCI-based and the NLS_LANG client setting (environment variable) is defined. The initialization parameter value is, therefore, usually ignored.


 

465.NLS parameters can be set using the five methods listed. Put the methods in order from highest to lowest according to Oracles order of precedence:
A. Default setting
B. Client environment variable
C. Explicit ALTER SESSION statement
D. Inside SQL function
E. Server initialization parameter
F. b, d, e, a, c
G. e, a, b, c, d
H. d, c, b, e, a
I. a, b, d, c, e J.
d, c, b, a, e

 

Answer: C

 

466.What can you determine about the following linguistic sorts based only on their names?

1. GERMAN

2. FRENCH_M

A. 1 is a monolingual sort.

B. 2 is a monolingual sort.

C. 1 is case insensitive.

D. Both 1 and 2 are case insensitive.

E. Case sensitivity is unknown.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions113.htm#SQLRF51562

1是monolingual collations。

2应该是multilingual collations。

 

For monolingual collations, for example FRENCH, the prefix length is typically 1000 characters. For multilingual collations, for example GENERIC_M, the prefix is typically 500 characters. The exact length may be lower or higher depending on the collation and the characters contained in char.

 

467.In a database with the database character set of US7ASCII and a national character set of UTF-8,which datatypes would be capable of storing Unicode data by default?

A. VARCHAR2

B. CHAR

C. NVARCHAR2

D. CLOB

E. LONG

 

 

Answer: C

 

NVARCHAR2 Data Type

The NVARCHAR2 data type is a Unicode-only data type. When you create a table with an NVARCHAR2 column, you supply the maximum number of characters it can hold. Oracle subsequently stores each value in the column exactly as you specify it, provided the value does not exceed the maximum length of the column.

The maximum length of the column is determined by the national character set definition. Width specifications of character data type NVARCHAR2 refer to the number of characters. The maximum column size allowed is 4000 bytes.

 

468.Automatic data conversion will occur if which of the following happens?
A. The client and server have different NLS_LANGUAGE settings.
B. The client and server character sets are not the same, and the database character set is not a strict superset of the client character set.
C. The client and server are in different time zones.
D. The client requests automatic data conversion.
E. The AUTO_CONVERT initialization parameter is set to TRUE.

 

Answer: B

 

469.Which of the following NLS_SORT parameter values would result in case-insensitive and accent-insensitive binary sorts?

A. NLS_SORT = BINARY

B. NLS_SORT = BINARY_AI

C. NLS_SORT = BINARY_CI

D. NLS_SORT = BINARY_AI_CI

E. Binary sorts are case insensitive and accent insensitive by default.

 

 

Answer: B

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/timesten.112/e21643/attribute.htm#TTREF179

 

NLS_SORT

The NLS_SORT attribute indicates which collating sequence to use for linguistic comparisons. It accepts the values listed in "Supported Linguistic Sorts." All these values can be modified to do case-insensitive sorts by appending _CI to the value. To perform accent-insensitive and case-insensitive sorts, append _AI to the value.

For materialized views and cache groups, TimesTen recommends that you explicitly specify the collating sequence using the NLSSORT SQL function rather than using this attribute in the connection string or DSN definition.

Operations involving character comparisons support linguistic case-sensitive collating sequences. Case-insensitive sorts may affect DISTINCT value interpretation.

NLS_SORT may affect many operations. The supported operations that are sensitive to collating sequence are:

MINMAX

BETWEEN

=<>>>=<<=

DISTINCT

CASE

GROUP BY

HAVING

ORDER BY

IN

LIKE

Only BINARY sort is supported with the TIMESTEN8 character set.

NLS_SORT settings other than BINARY may have significant performance impact on character operations.

Note:

Primary key indexes are always based on the BINARY collating sequence. Use of non-BINARY NLS_SORT equality searches cannot use the primary key index


 

470.Which NLS parameter can be used to change the default Oracle sort method from binary to linguistic for the SQL SELECT statement?
A. NLS_LANG
B. NLS_COMP
C. NLS_SORT
D. None of the above

 

Answer: D

 

471.Which of the following would be affected by setting NLS_LENGTH_SEMANTICS=CHAR?
A. All objects in the database
B. Tables owned by SYS and SYSTEM
C. Data dictionary tables
D. NCHAR columns
E. CHAR columns

 

Answer: E

 

472.Which is not a valid locale definition file type?

A. Language

B. Linguistic sort

C. Calendar

D. Territory

E. Character set

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch13custlocale.htm#NLSPG558

 

Existing Definitions Dialog Box

When you choose New Language, New Territory, New Character Set, or New Linguistic Sort, the first tab page that you see is labeled General. ClickShow Existing Definitions to see the Existing Definitions dialog box.

The Existing Definitions dialog box enables you to open locale objects by name. If you know a specific language, territory, linguistic sort (collation), or character set that you want to start with, then click its displayed name. For example, you can open the AMERICAN language definition file as shown in Figure 13-2.

Figure 13-2 Existing Definitions Dialog Box


Description of "Figure 13-2 Existing Definitions Dialog Box"

Choosing AMERICAN opens the lx00001.nlb file. An NLB file is a binary file that contains the settings for a specific language, territory, character set, or linguistic sort.

Language and territory abbreviations are for reference only and cannot be opened.

 

473.How many different calendars does Oracle 11g support?

A. 22

B. 7

C. 6

D. 15

E. 2

 

 

Answer: B

答案解析:

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch3globenv.htm#NLSPG215

NLS_CALENDAR

Property

Description

Parameter type

String

Parameter scope

Initialization parameter, environment variable, ALTER SESSION, and SQL functions

Default value

Gregorian

Range of values

Any valid calendar format name

 

Many different calendar systems are in use throughout the world. NLS_CALENDAR specifies which calendar system Oracle Database uses.

NLS_CALENDAR can have one of the following values:

Arabic Hijrah

English Hijrah

Gregorian

Japanese Imperial

Persian

ROC Official (Republic of China)

Thai Buddha

 

474.Which NLS parameter directly governs linguistic searches?

A. NLS_SEARCH_L

B. NLS_SORT

C. NLS_SEARCH

D. NLS_SORT_L

E. None of the above

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams155.htm#REFRN10127

 

NLS_SORT specifies the collating sequence for character value comparison in various SQL operators and clauses, for example, ORDER BYGROUP BY, comparison conditions (=<><=>=), INBETWEENLIKEMIN/MAXGREATEST/LEAST, and INSTR.

If the value is BINARY, then comparison is based directly on byte values in the binary encoding of the character values being compared. The ordering depends on the character set of the compared values, which is either the database character set (for VARCHAR2CHARLONG, and CLOB) or the national character set (for NVARCHAR2NCHAR, and NCLOB).

If the value is a named linguistic sort, then comparison is defined by this sort. A linguistic sort uses various rules to achieve ordering expected by speakers of one or more natural languages. This is usually the same ordering that is used in dictionaries and/or telephone directories in those languages.

The exact operators and query clauses that obey the NLS_SORT parameter depend on the value of the NLS_COMP parameter. If an operator or clause does not obey the NLS_SORT value, as determined by NLS_COMP, the collation used is BINARY.

The BINARY comparison is faster and uses less resources than any linguistic comparison but for text in a natural language, it does not provide ordering expected by users.

The value of NLS_SORT affects execution plans of queries. Because a standard index cannot be used as a source of values sorted in a linguistic order, an explicit sort operation must usually be performed instead of an index range scan. A functional index on the NLSSORT function may be defined to provide values sorted in a linguistic order and reintroduce the index range scan to the execution plan.

 

475.Case-insensitive sorts are always accent insensitive by default.
A. True
B. False

 

Answer: B

 

476.What is the name of the file that identifies the set of available locale definitions?
A. locale.def
B. lxdef.ora
C. lx1boot.nlb
D. lx1boot.ora
E. lang.def

 

Answer: C

 

477.Which of the following is not a valid linguistic sort element?

A. Accent expansion

B. Canonical equivalence

C. Reverse secondary sorting

D. Ignorable characters

E. Character rearrangement

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch5lingsort.htm#NLSPG276

 

Linguistic Sort Features

This section contains information about different features that a linguistic sort can have:

Base Letters

Ignorable Characters

Contracting Characters

Expanding Characters

Context-Sensitive Characters

Canonical Equivalence

Reverse Secondary Sorting

Character Rearrangement for Thai and Laotian Characters

Special Letters

Special Combination Letters

Special Uppercase Letters

Special Lowercase Letters

You can customize linguistic sorts to include the desired characteristics.

 

 

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

 

Answer: AC

 

479.Which two statements about workload capture and replay operations are true? (Choose two.)

A. The clients must be created manually on the test machines to perform more realistic testing.
B. Restart the database in RESTRICTED mode before beginning workload replay to enable a clean state for workload replay.
C. Restart the database in RESTRICTED mode before beginning workload capture to enable a clean state for capturing the workload.
D. The application state of the capture system must be identical to the application state of the replay system when the workload replay begins.

 

Answer: CD

 

480.View the Exhibit exhibit1 to examine the series of SQL commands.View the Exhibit exhibit2 to examine the plans available in the SQL plan baseline. The baseline in the first row of the Exhibit is created when OPTIMIZER_MODE was set to FIRST_ROWS. Which statement is true if the SQL query in exhibit1 is executed again when the value of OPTIMIZER_MODE is set to FIRST_ROWS?

 

 

A.The optimizer uses a new plan because none of the plans in the exhibit2 are fixed plans.
B. The optimizer uses the plan in the second row of the exhibit2 because it is an accepted plan.
C. The optimizer uses the plan in the first row of the exhibit2 because it is the latest generated plan.

D.The optimizer uses the plan in the first row of the exhibit2 because OPTIMIZER_MODE was set to FIRST_ROW during its creation.

 

Answer: B

481.Which statement is true about a running session that belongs to the online transaction processing (OLTP) group?

 

A. It permanently switches to the low_group consumer group if the session exceeds 10,000 I/O requests or 2,500 MB of data transfer.

B. It performs the first 10000 I/O requests or 2,500 MB of data transfer in the LOW-GROUP consumer group, and then switches to the original group.

C. It switches to the LOW_GROUP consumer group if the session exceeds 10000 I/O requests or 2500 MB of data transfer and returns to the original group after the operation.

D. It switches to the LOW_GROUP consumer group if the session exceeds 10000 I/O requests or 2500 MB of data transfer for queries, but not for data manipulation language (DML) operations.

 

 

Answer: D

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_resmgr.htm#ARPLS67611

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/dbrm.htm#ADMIN12659

 

 

Example 2

The following PL/SQL block creates a resource plan directive for the OLTP group that temporarily switches any session in that group to the LOW_GROUP consumer group if the session exceeds 10,000 I/O requests or exceeds 2,500 Megabytes of data transferred. The session is returned to its original group after the offending top call is complete.

BEGIN

  DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (

   PLAN                => 'DAYTIME',

   GROUP_OR_SUBPLAN    => 'OLTP',

   COMMENT             => 'OLTP group',

   MGMT_P1             => 75,

   SWITCH_GROUP        => 'LOW_GROUP',

   SWITCH_IO_REQS      => 10000,

   SWITCH_IO_MEGABYTES => 2500,

   SWITCH_FOR_CALL     => TRUE);

END;

/


 

Parameters

Table 120-7 CREATE_PLAN_DIRECTIVE Procedure Parameters

Parameter

Description

plan

Name of the resource plan

group_or_subplan

Name of the consumer group or subplan

comment

Comment for the plan directive

cpu_p1

-- deprecated: use mgmt_p1 instead

cpu_p2

-- deprecated: use mgmt_p2 instead)

cpu_p3

-- deprecated: use mgmt_p3 instead)

cpu_p4

-- deprecated: use mgmt_p4 instead)

cpu_p5

-- deprecated: use mgmt_p5 instead)

cpu_p6

-- deprecated: use mgmt_p6 instead)

cpu_p7

-- deprecated: use mgmt_p7 instead)

cpu_p8

-- deprecated: use mgmt_p8 instead)

active_sess_pool_p1

Specifies maximum number of concurrently active sessions for a consumer group. Default is NULL, which means unlimited.

queueing_p1

Specified time (in seconds) after which a job in the inactive session queue (waiting for execution) will time out. Default is NULL, which means unlimited.

parallel_degree_limit_p1

Specifies a limit on the degree of parallelism for any operation. Default is NULL, which means unlimited.

switch_group

Specifies consumer group to switch to, once a switch condition is met. If the group name is 'CANCEL_SQL', then the current call is canceled when the switch condition is met. If the group name is 'KILL_SESSION', then the session is killed when the switch condition is met. Default is NULL.

switch_time

Specifies time (in CPU seconds) that a session can execute before an action is taken. Default is NULL, which means unlimited.

switch_estimate

If TRUE, tells Oracle to use its execution time estimate to automatically switch the consumer group of an operation before beginning its execution. Default is FALSE.

max_est_exec_time

Specifies the maximum execution time (in CPU seconds) allowed for a session. If the optimizer estimates that an operation will take longer than MAX_EST_EXEC_TIME, the operation is not started and ORA-07455 is issued. If the optimizer does not provide an estimate, this directive has no effect. Default is NULL, which means unlimited.

undo_pool

Limits the size in kilobytes of the undo records corresponding to uncommitted transactions by this consumer group

max_idle_time

Indicates the maximum session idle time. Default is NULL, which means unlimited.

max_idle_blocker_time

Maximum amount of time in seconds that a session can be idle while blocking another session's acquisition of a resource

switch_time_in_call

Deprecated. If this parameter is specified, switch_time is set to switch_time_in_call (in seconds) and switch_for_call is effectively set to TRUE. It is better to use switch_time andswitch_for_call.

mgmt_p1

Resource allocation value for level 1 (replaces cpu_p1):

EMPHASIS - specifies the resource percentage at the first level

RATIO - specifies the weight of resource usage

mgmt_p2

Resource allocation value for level 2 (replaces cpu_p2)

EMPHASIS - specifies the resource percentage at the second level

RATIO - non-applicable

mgmt_p3

Resource allocation value for level 3 (replaces cpu_p3)

EMPHASIS - specifies the resource percentage at the third level

RATIO - non-applicable

mgmt_p4

Resource allocation value for level 4 (replaces cpu_p4)

EMPHASIS - specifies the resource percentage at the fourth level

RATIO - non-applicable

mgmt_p5

Resource allocation value for level 5 (replaces cpu_p5)

EMPHASIS - specifies the resource percentage at the fifth level

RATIO - non-applicable

mgmt_p6

Resource allocation value for level 6 (replaces cpu_p6)

EMPHASIS - specifies the resource percentage at the sixth level

RATIO - non-applicable

mgmt_p7

Resource allocation value for level 7 (replaces cpu_p7)

EMPHASIS - specifies the resource percentage at the seventh level

RATIO - non-applicable

mgmt_p8

Resource allocation value for level 8 (replaces cpu_p8)

EMPHASIS - specifies the resource percentage at the eighth level

RATIO - non-applicable

switch_io_megabytes

Specifies the amount of I/O (in MB) that a session can issue before an action is taken. Default is NULL, which means unlimited.

switch_io_reqs

Specifies the number of I/O requests that a session can issue before an action is taken. Default is NULL, which means unlimited.

switch_for_call

Specifies that if an action is taken because of the switch_timeswitch_io_megabytes, orswitch_io_reqs parameters, the consumer group is restored to its original consumer group at the end of the top call. Default is FALSE, which means that the original consumer group is not restored at the end of the top call.

max_utilization_limit

Specifies the maximum percentage of CPU that this Consumer Group or Sub-Plan can utilize. Valid values are 0% to 100%. NULL implies that there is no limit, or equivalently 100%. You can specify this attribute and leave mgmt_p1 through mgmt_p8 NULL.

parallel_target_percentage

Specifies the maximum percentage of the target number of parallel servers in an Oracle RAC environment that a consumer group can use. Any additional parallel statements that are launched from this consumer group will be queued. The default is NULL, which means that the limit is 100% of the target number. Valid values for queuing are in the range of 0 to 100 (%). For updates to the plan directive, the value of -1 will reset the value to NULL.

If a consumer group does not have any parallel statements running within an Oracle RAC database, the first parallel statement is allowed to exceed this limit.

The target number of parallel servers in an Oracle RAC environment is the sum of the parameter parallel_servers_target across all instances.

parallel_queue_timeout

Specifies the time (in seconds) that a query may remain in its Consumer Group's parallel statement queue before it is removed and terminated with an error (ORA- 07454).

 

Usage Notes

All parameters default to NULL. However, for the EMPHASIS CPU resource allocation method, this case would severely limit resources to all the users.

For max_idle_time and max_idle_blocker_timePMON will check these limits once a minute. If it finds a session that has exceeded one of the limits, it will forcibly kill the session and clean up all its state.

The parameter switch_time_in_call is mostly useful for three-tier applications where the mid-tier server is implementing session pooling. By using switch_time_in_call, the resource usage of one client will not affect a future client that happens to be executed on the same session.

 

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

 

Answer: ABC

 

483.Evaluate the following block of code:

BEGIN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL ( acl =>

'mycompany-com-permissions.xml', principal => 'ACCT_MGR', is_grant => TRUE, privilege => 'connect');

DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL ( acl => 'mycompany-com-permissions.xml', host =>

'*.mycompany.com');

END;

What is the outcome of the above code?

A. It produces an error because a fully qualified host name needs to be specified.

B. It produces an error because the range of ports associated with the hosts has not been specified.

C. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT and RESOLVE privileges.

D. It creates an access control list (ACL) with the user ACCT_MGR who gets the CONNECT privilege but not the RESOLVE privilege.

 

 

Answer: C

答案解析:

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

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

 

 

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

 

Answer: B

 

485.You want to back up your 100-GB database on a remote tape device. You are required to ensure that minimum network bandwidth is consumed while transferring the backups to the tape device. The current consumption of your CPU is approximately 40 percent. Which type of backup should you perform?

A. standard backup set

B. image copy

C. compressed backup

D. user-managed backup

 

 

Answer: C

答案解析:

使用压缩备份,可以节省空间,减小带宽。

 

COMPRESSED

Enables binary compression.

RMAN compresses the data written into the backup set to reduce the overall size of the backup set. All backups that create backup sets can create compressed backup sets. Restoring compressed backup sets is no different from restoring uncompressed backup sets.

RMAN applies a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many media manager vendors. When backing up to a locally attached tape device, compression provided by the media management vendor is usually preferable to the binary compression provided by BACKUP AS COMPRESSED BACKUPSET. Therefore, use uncompressed backup sets and turn on the compression provided by the media management vendor when backing up to locally attached tape devices. You should not use RMAN binary compression and media manager compression together.

Some CPU overhead is associated with compressing backup sets. If the target database is running at or near its maximum load, then you may find the overhead unacceptable. In most other circumstances, compressing backup sets saves enough disk space to be worth the CPU overhead.

 

 

486.You execute the following Recovery Manager (RMAN) commands in (he following order:

BACKUP VALIDATE DATABAE RECOVER CORRUPTION LIST;Which (two tasks are performed by these commands? (Choose two.)

A. Repair the corrupted blocks. If any. In the backup created.

B. Populate VSCOPV_CORRUPTION with names of files that have corrupted blocks-

C. Back up the database after checking whether array of the files have corrupted blocks.

D. Discover any corrupt blocks that are viewable with the VSDATABASE_BIOCK_CORBUPTION view.

E. Repair all corrupted blocks that have been logged in the VSDATABASE_BLOCK_ CORRUPTION

 

 

Answer: DE

答案解析:

根据官方文档可知,此题选DE

 

VALIDATE

Scans the specified files and verifies their contents, testing whether this file can be backed up and whether the data blocks are corrupt.

RMAN creates no output files. This option is equivalent to using the VALIDATE command on the database files specified in the backup.

If you do not specify CHECK LOGICAL, then BACKUP VALIDATE checks for physical corruption only. If you specifyCHECK LOGICAL, then BACKUP VALIDATE checks for both physical and logical corruption. RMAN populates theV$DATABASE_BLOCK_CORRUPTION view with any corruptions that it finds.

You can use the SET MAXCORRUPT command to set a limit for the number of corrupt blocks tolerated during the backup validation. The default is zero.

If you execute BACKUP INCREMENTAL with VALIDATE, then the behavior depends on whether block change tracking is enabled. If change tracking is enabled, then RMAN validates only changed blocks; otherwise, RMAN validates all blocks in the files included in the backup.

Note: You cannot validate backups of backup sets.

 

 

V$DATABASE_BLOCK_CORRUPTION

V$DATABASE_BLOCK_CORRUPTION displays information about database blocks that were corrupted after the last backup.

Column

Datatype

Description

FILE#

NUMBER

Absolute file number of the datafile that contains the corrupt blocks

BLOCK#

NUMBER

Block number of the first corrupt block in the range of corrupted blocks

BLOCKS

NUMBER

Number of corrupted blocks found starting with BLOCK#

CORRUPTION_CHANGE#

NUMBER

Change number at which the logical corruption was detected. Set to 0 to indicate media corruption.

CORRUPTION_TYPE

VARCHAR2(9)

Type of block corruption in the datafile:

ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.

FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.

CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it probably fails because sectors in the middle of the block are from different versions.

CORRUPT - Block is wrongly identified or is not a data block (for example, the data block address is missing)

LOGICAL - Block is logically corrupt

NOLOGGING - Block does not have redo log entries (for example, NOLOGGING operations on primary database can introduce this type of corruption on a physical standby) 

 

 

Prerequisites Specific to RECOVER BLOCK

The following prerequisites apply to RECOVER BLOCK:

The target database must run in ARCHIVELOG mode and be open or mounted with a current control file.

RMAN can only recover blocks marked media corrupt. The V$DATABASE_BLOCK_CORRUPTION view indicates which blocks in a file were marked corrupt since the most recent BACKUP or BACKUP ... VALIDATE command was run against the file.

The backups of the data files containing the corrupt blocks must be full backups and not proxy backups. If only proxy backups exist, then you can restore them to a nondefault location on disk, in which case RMAN considers them data file copies. You can then use the data file copies for block media recovery.

RMAN can use only archived redo log files for recovery. Block media recovery cannot survive a missing or inaccessible log, although it can sometimes survive missing or inaccessible records (see Oracle Database Backup and Recovery User's Guide).

For RMAN to be able to search the flashback logs for good copies of corrupt blocks, Flashback Database must be enabled on the target database.

For RMAN to be able to search a standby database for good copies of corrupt blocks, the target database must be associated with a physical standby database in a Data Guard environment. In addition, the physical standby database must be open read-only in managed recovery.

 

 

blockObject

This subclause specifies the data blocks that require recovery. Refer to blockObject::= for the syntax diagram. Refer to "Prerequisites Specific to RECOVER BLOCK" for prerequisites specific to block media recovery.

You can either use RECOVER CORRUPTION LIST to recover all blocks reported in the V$DATABASE_BLOCK_CORRUPTION view, or specify the data file number and block number or the tablespace and data block address (DBA). RMAN can only perform complete recovery of individual blocks.

By default, if Flashback Database is enabled, then RMAN searches the flashback logs for good copies of corrupt blocks. By default, if the target database exists in a Data Guard environment, then RECOVER BLOCK command can automatically retrieve blocks from a physical standby database to a primary database and vice-versa.

Syntax Element

Description

CORRUPTION LIST

Recovers all physically corrupt blocks listed in the V$DATABASE_BLOCK_CORRUPTION view. Block media recovery may not be able to repair all listed logically corrupt blocks. In these cases, alternate recovery methods, such as tablespace point-in-time recovery, or dropping and re-creating the affected objects, may repair the corruption.

The V$DATABASE_BLOCK_CORRUPTION view displays blocks marked corrupt by Oracle Database components such as RMAN commands, ANALYZEdbv, SQL queries, and so on. In short, any process that encounters an ORA-1578error records the block corruption in this view. The following types of corruption result in rows added to this view:

Physical corruption (sometimes called media corruption). The database does not recognize the block at all: the checksum is invalid, the block contains all zeros, or the header and footer of the block do not match.

Logical corruption. The block has a valid checksum, the header and footer match, and so forth, but the contents are logically inconsistent.

The view does not record corruptions that can be detected by validating relationships between blocks and segments, but cannot be detected by a check of an individual block.

Note: Any RMAN command that fixes or detects that a block is repaired updates V$DATABASE_BLOCK_CORRUPTION. For example, RMAN updates the repository at end of successful block media recovery. If a BACKUPRESTORE, orVALIDATE command detects that a block is no longer corrupted, then it removes the repaired block from the view.

 

 

 

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

 

Answer: AC
题目解答 Ac
488.You are managing an Oracle Database 11g database with the ASM storage. The database is having big file tablespaces. You want files to open faster and less memory to be used in the shared pool to manage the extent maps. What configuration would you effect to achieve your objective? (Choose all that apply.)
A. Set the ASM compatibility attribute for the ASM disk group to 11.1.0.
B. Set the RDBMS compatibility attribute for the ASM disk group to 11.1.0.
C. Set the COMPATIBLE initialization parameter for the ASM instance to 11.1.0.
D. Set the COMPATIBLE initialization parameter for the database instance to 11.1.0.

 

Answer: AD

 

489.For which two database objects can the VERSIONS clause of the Flashback Versions Query be used?(Choose two.)

A.views

B.fixed tables

C.heap tables

D.external tables

E.temporary tables

F.index-organized tables (IOT)

 

 

Answer: CF

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_10002.htm#SQLRF55624

排除法,选择CF

 

Restrictions on Flashback Queries These queries are subject to the following restrictions:

You cannot specify a column expression or a subquery in the expression of the AS OF clause.

You cannot specify the AS OF clause if you have specified the for_update_clause.

You cannot use the AS OF clause in the defining query of a materialized view.

You cannot use the VERSIONS clause in flashback queries to temporary or external tables, or tables that are part of a cluster.

You cannot use the VERSIONS clause in flashback queries to views. However, you can use the VERSIONS syntax in the defining query of a view.

You cannot specify the flashback_query_clause if you have specified query_name in the query_table_expression.

 

 

 

 参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01005

 

Flashback Version Query allows index-only access only with IOTs (index-organized tables), but index fast full scan is not allowed.

 

490.View the Exhibit.

Examine the following command that is executed for the TRANSPORT table in the SH schema:

SQL> SELECT DBMS_STATS.CREATE_EXTENDED_STATS('sh', 'customers_obe', '(country_id, cust_state_province)') FROM dual;

Which statement describes the significance of this command?

 

A. It collects statistics into the pending area in the data dictionary.

B. It creates a virtual hidden column in the CUSTOMERS_OBE table.

C. It collects statistics with AUTO_SAMPLE_SIZE for ESTIMATE_PERCENT.

D. It creates a histogram to hold skewed information about the data in the columns.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/stats.htm#PFGRF94739

 

CREATE_EXTENDED_STATS Function

Creates a virtual column for a user specified column group or an expression in a table

 

Creating a Column Group

Use the CREATE_EXTENDED_STATISTICS function to create a column group. The CREATE_EXTENDED_STATISTICS function returns the system-generated name of the newly created column group. Table 13-5 lists the input parameters for this function.

Table 13-5 Parameters for the create_extended_statistics Function

Parameter

Description

ownname

Schema owner. NULL indicates current schema.

tabname

Name of the table to which the column group is added.

extension

Columns in the column group.

 

For example, to add a column group consisting of the cust_state_province and country_id columns to the customers table in SH schema, run the following PL/SQL block:

DECLARE

  cg_name VARCHAR2(30);

BEGIN

  cg_name := DBMS_STATS.CREATE_EXTENDED_STATS(null,'customers', 

             '(cust_state_province,country_id)');

END;

/


 

 

491.Examine the exhibit to view the parameters set in your parameter file. (Click the Exhibit(s) button.)You restart the instance.To what value will the MEMORY_MAX_TARGET parameter be set by default?

A. 120M

B. 320M

C. 480M

D. 600M

 

 

Answer: D

这个没图。

 

The MEMORY_MAX_TARGET parameter will be set to 600M by default. Oracle 11g has two new Automatic

Memory Management initializati on parameters, namelyMEMORY_TARGET and MEMORY_MAX_TARGET.

MEMORY_TARGET represents the total amount of memory that can be allocated to SGA and PGA memory

structures. If the SGA_TARGET and PGA_AGGREGATE_TARGET parameters are specified and

MEMORY_TARGET is set to a value greater than zero, theyrepresent the minimum sizes of the SGA and

PGA. MEMORY_TARGET should be no less than the sum of SGA_TARGET and

PGA_AGGREGATE_TARGET.

If not explicitly specified, MEMORY_TARGET defaults to 0. The MEMORY_MAX_TARGET parameter

represents the largest possible value to which MEMORY_TARGET can be set. The MEMORY_MAX_TARGET

parameter can be manually set, or it will be derived. If you specify a nonzero value for MEMORY_TARGET

and do not set MEMORY_MAX_TARGET, MEMORY_MAX_TARGET will be set to the same value as

MEMORY_TARGET by default, which is 600M in this scenario. MEMORY_MAX_TARGET is set to 0 if

MEMORY_TARGET is not set or is explicitly set to 0.

All of the other options are inco  rrect because if MEMORY_TARGET is set to a nonzero value and

MEMORY_MAX_TARGET is not set, MEMORY_MAX_TARGET will default to the same value as

MEMORY_TARGET, which in this scenario is 600M.

SYBEX Oracle 1Z0-053 Study Guide, Chapter 11: Managing Database Resources

If you don’t set MEMORY_MAX_TARGET, it will default to the value of MEMORY_TARGET.

Oracle Press 1Z0-053 Study Guide, Chapter 11: Managing Database Resources

The exam very specifically gives you scenarios combining various initialization parameters such as

MEMORY_TARGET and SGA_TARGET set to zero and nonzero values, and then asks you what the effect is

on instance memory and other initialization parameters. You’ll have to memorize the contents of following

Tables 10-1 and 10-2 to answer those questions!

 

 

 

 

492.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

答案解析:

参考:http://docs.oracle.com/cd/B28359_01/server.111/b28300/upgrade.htm#UPGRD12395

utlu111i.SQL

Pre-Upgrade Information

Analyzes the database to be upgraded, detailing requirements and issues for the upgrade to Oracle Database 11g Release 1 (11.1)

 

The Pre-Upgrade Information Tool is a SQL script that ships with Oracle Database 11g Release 1 (11.1), and must be copied to and run from the environment of the database being upgraded. Complete the following steps to run the Pre-Upgrade Information Tool:

Log in to the system as the owner of the Oracle Database 11g Release 1 (11.1) Oracle home directory.

Copy the Pre-Upgrade Information Tool (utlu111i.sql) from the Oracle Database 11g Release 1 (11.1) ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home, such as the temporary directory on your system.

Make a note of the new location of this file.

Log in to the system as the owner of the Oracle home directory of the database to be upgraded.

Change to the directory that you copied utlu111i.sql to in Step 2.

Start SQL*Plus.

Connect to the database instance as a user with SYSDBA privileges.

Set the system to spool results to a log file for later analysis:

SQL> SPOOL upgrade_info.log

Run the Pre-Upgrade Information Tool:

SQL> @utlu111i.sql

Turn off the spooling of script results to the log file:

SQL> SPOOL OFF

Check the output of the Pre-Upgrade Information Tool in upgrade_info.log.

 

utlu112i.SQL

Pre-Upgrade Information

Analyzes the database to be upgraded, detailing requirements and issues for the upgrade to Oracle Database 11g Release 2 (11.2)

 

 

493.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#RATUG174

 

SQL Performance Analyzer compares the performance of SQL statements before and after the change and produces a report identifying any changes in execution plans or performance of the SQL statements.

 

Fixing Regressed SQL Statements

If the performance analysis performed by SQL Performance Analyzer reveals regressed SQL statements, then you can make changes to remedy the problem. For example, you can fix regressed SQL by running SQL Tuning Advisor or using SQL plan baselines. You can then repeat the process of executing the SQL statements and comparing its performance to the first execution. Repeat these steps until you are satisfied with the outcome of the analysis

 

 

494.Which statement about Automatic Memory Management with Oracle 11g is true?

A. You cannot specify MEMORY_TARGET if you explicitly specify SGA_TARGET or PGA_AGGREGATE_ TARGET values that are greater than zero in your parameter file.

B. Oracle can reallocate memory between the SGA and PGA automatically as needed.

C. To use Automatic Memory Management, you must explicitly set both the MEMORY_TARGET and MEMORY_MAX_TARGET parameters in your parameter file.

D. You can set the MEMORY_TARGET parameter to a maximum value of the current SGA size plus the current PGA size.

 

 

Answer: B

答案解析:

参考:管理内存:http://blog.csdn.net/rlhua/article/details/12493791

A.即使指定了 SGA_TARGET or PGA_AGGREGATE_ TARGET 参数,也可以在指定MEMORY_TARGET 。A错

B。动态控制SGA和PGA。

C.启用AMM,只需要设置MEMORY_TARGET 为非零值。

D. MEMORY_TARGET 是SGA 和PGA 大小的下限值的和。

自动内存管理是用两个初始化参数进行配置的:

MEMORY_TARGET:动态控制SGA和PGA时,Oracle总共可以使用的共享内存大小,这个参数是动态的,因此提供给Oracle的内存总量是可以动态增大,也可以动态减小的。它不能超过MEMORY_MAX_TARGET参数设置的大小。默认值是0。B对。

MEMORY_MAX_TARGET:这个参数定义了MEMORY_TARGET最大可以达到而不用重启实例的值,如果没有设置MEMORY_MAX_TARGET值,默认等于MEMORY_TARGET的值。C错。

使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。

• 如果将SGA_TARGET和PGA_AGGREGATE_TARGET设置为非零值,则可将其分别视为SGA 和PGA 大小的下限值。MEMORY_TARGET 可以采用从SGA_TARGET+

PGA_AGGREGATE_TARGET到MEMORY_MAX_SIZE的值。A错。D错。

 

• 如果设置了SGA_TARGET,则数据库将仅自动优化SGA 的子组件的大小。PGA 的自动优化与是否显式设置PGA 无关。但是,不会自动优化整个 SGA ( SGA_TARGET)  和PGA ( PGA_AGGREGATE_TARGET) ,即不自动增长或收缩。

 

495.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

 

496.Which two statements are true regarding an Automatic Storage Management (ASM) instance?(Choose two.)

A. As ASM instance mounts an ASM control file

B. An ASM instance uses the ASMB process for rebalancing of disks within a disk group

C. Automatic Memory Management is enabled in an ASM instance even when the MEMORY_TARGET parameter is not set explicitly

D. An RDBMS instance gets connected to an ASM instance using ASMB as a foreground process when the database instance is started

 

 

Answer: CD

答案解析:

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

A错,ASM实例装载的是ASM_DISKGROUPS,不是ASM控制文件。

ASM 实例默认启用自动内存管理,即使未明确设置MEMORY_TARGET参数也是如此。

数据库实例与ASM 之间的交互中使用ASMB 数据库进程接收新文件的区映射。

 

497.You are managing the APPPROD database as a DBA. You plan to duplicate this database in the

same system with the name DUPDB. You issued the following RMAN commands to create a duplicate database:

RMAN> CONNECT target sys/sys@APPPROD

RMAN> DUPLICATE TARGET DATABASE TO dupdb FROM ACTIVE DATABASE

DB_FILE_NAME_CONVERT '/oracle/oradata/prod/',

'/scratch/oracle/oradata/dupdb/' SPILE PARAMETER_VALUE_CONVERT

'/oracle/oradata/prod/', '/scratch/oracle/oradata/dupdb/' SET

SGA_MAX_SIZE = '300M' SET SGA_TARGET = '250M' SET LOG_FILE_NAME_CONVERT

'/oracle/oradata/prod/redo/',

'/scratch/oracle/oradata/dupdb/redo/';

Which three are the prerequisites for the successful execution of the above command? (Choose three.)

A. The source database should be open.

B. The target database should be in ARCHIVELOG mode if it is open.

C. RMAN should be connected to both the instances as SYSDBA.

D. The target database backups should be copied to the source database backup directories.

E. The password file must exist for the source database and have the same SYS user password as the target.

 

 

Answer: BCE

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF90152

题问:以下哪三个前提条件才能使以上的命令成功?

 

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.

 

498.The database Is configured in ARCHIVELOG mode. The database needs to be up 24 X 7. You want to perform user managed backup for the data files of the HR_DATA tablespace. To accomplish the task, you issued the following command:

SQL> ALTER TABLESPACE hi_data BEGIN BACKUP;

Which two statements are true in this scenario? (Choose two.)

A. No transaction on the tablespace is allowed but you can perform queries.

B. The tablespace will automatically come out of backup mode when the file copy is complete.

C. The checkpoint change number is frozen in headers of the data files until the file is removed from backup mode.

D. The database writes the before image of an entire block to the redo stream before modifying block for the first time.

 

 

Answer: CD

 

 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV90002

根据以下做的实验,表空间在备份模式时,可以进行查询和DML操作,所以A错。

B错误,必须使用alter tablespace 表空间名 end backup来结束手动备份模式。

根据In backup mode, the database copies whole changed data blocks into the redo stream.说明,在备份模式下,事务产生的日志会放在redo stream里面。

而D答案说,在备份模式下,数据库会在改变块的第一时间,把先前的整个块的image写到redo stream里面,故是正确的。

故正确答案选CD

 

499.Which statement is true regarding the retention policy for the incidents accumulated in the Automatic iagnostic Repository (ADR)?
A. The incident metadata is purged when the problem is resolved and the DBA closes the SR.
B. The incident files and dumps are not retained in the ADR for the manually created incidents.
C. The incident files are retained but the incident metadata is purged when the problem is resolved and he DBA closes the SR
D. The default setting is for one year after which the incident metadata is purged from the ADR and the files are retained for one month.

 

Answer: D

 

500.You opened the encryption wallet and then issued the following command:
SQL>CREATE TABLESPACE securespace
DATAFILE '/home/user/oradata/secure01.dbf'
SIZE 150M
ENCRYPTION USING '3DES168'
DEFAULT STORAGE(ENCRYPT);
Then you closed the wallet. Later, you issued the following command to create the EMPLOYEES table in the SECURESPACE tablespace and you use the NO SALT option for the EMPID column.
What is the outcome?
A. It creates the table and encrypts the data in it.
B. It generates an error because the wallet is closed.
C. It creates the table but does not encrypt the data in it.
D. It generates an error because the NO SALT option cannot be used with the ENCRYPT option.

 

Answer: B

 

 

 

501.Note the output of the following query;

SQL> SELECT flashback_archieve_name, status FROM dba_flashback_archieve; FLASHBACK_ARCHIEVE_NAME STATUS

FLA1

You executed the following command to enable Flashback Data Archive on the EXCHANGB_PATE table:ALTER TABLE exchange_rate FLASHBACK ARCHIEVE;

What is the outcome of this command?

A. The table uses the default Flashback Data Archive.

B. The Flashback Data Archive Is created In the SYSAUX tablespace.

C. The Flashback Data Archive is created in the same tablespace where the tables are stored.

D. The command generates an error because no flashback Data Archive name is specified and there is no default Flashback Data Achieve.

 

 

Answer: A

答案解析:

实验验证:

1、首先创建一个表空间用于存储闪回数据归档

sys@TEST1107> create tablespace fla_tbs1

  2  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为默认的闪回数据归档,所以,此题题库给的答案是错的。正确答案为D.

 

 

B答案:这里没有说闪回数据归档被创建在哪个表空间,可以根据DBA_FLASHBACK_ARCHIVE_TS;来查询,此处没有提供。

sys@TEST0924> select * from DBA_FLASHBACK_ARCHIVE_TS;

FLASHBACK_ARCHIVE_NAME FLASHBACK_ARCHIVE# TABLESPACE_NAME QUOTA_IN_MB

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

FLA1 1 FLA_TBS1 10

 

502.A database is running In ARCHIVBXXMS mode. It has two online redo log groups and each group has one member. A LGWR Input/output (I/O) fells due to permanent media failure that has resulted In the loss of redo log file and the LWGR terminates causing the instance to crash. The steps to recover from the loss of a current redo log group member in the random order are as follow.

1) Restore the corrupted redo log group.

2) Restore from a whole database backup.

3) Perform incomplete recovery.

4) Relocate by renaming the member of the damaged online redo log group to a new location.

5) Open the database with the RESETLOGS option.

6) Restart the database instance.

7) Issue a checkpoint and clear the log.

Identify the option with the correct sequential steps to accomplish the task efficiently.

A. 1, 3, 4, and 5

B. 7, 3, 4. and 5

C. 2, 3, 4, and 5

D. 7, 4, 3. and 5

E. Only 6 is required

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90049

B为正确答案

Recovering After Losing All Members of an Online Redo Log Group

If a media failure damages all members of an online redo log group, then different scenarios can occur depending on the type of online redo log group affected by the failure and the archiving mode of the database.

If the damaged online redo log group is current and active, then it is needed for crash recovery; otherwise, it is not. Table 30-4 outlines the various recovery scenarios.

Table 30-4 Recovering After the Loss of an Online Redo Log Group

If the Group Is...

Then...

And You Should...

Inactive

It is not needed for crash recovery

Clear the archived or unarchived group.

Active

It is needed for crash recovery

Attempt to issue a checkpoint and clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

Current

It is the redo log that the database is currently writing to

Attempt to clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

 

Recovering from Loss of Active Logs in ARCHIVELOG Mode

In this scenario, the database archiving mode is ARCHIVELOG.

To recover from loss of an active online redo log group in ARCHIVELOG mode:

Begin incomplete media recovery, recovering up through the log before the damaged log.

Ensure that the current name of the lost redo log can be used for a newly created file. If not, then rename the members of the damaged online redo log group to a new location. For example, enter:

ALTER DATABASE RENAME FILE "/disk1/oradata/trgt/redo01.log" TO "/tmp/redo01.log";

ALTER DATABASE RENAME FILE "/disk1/oradata/trgt/redo02.log" TO "/tmp/redo02.log";

Open the database using the RESETLOGS option:

ALTER DATABASE OPEN RESETLOGS;

 

503.Identity two advantages of using a recovery catalog in-load of the control File of the target database Recovery Manager (RMAN). (Choose two.)

A. You can use RMAN stored scripts.

B. Recovery is faster if data is stored in catalog in addition to the control file.

C. You can store backup Information of all registered databases in one place.

D. Database backups are automatically deleted when they are older than the specified time period.

 

 

Answer: AC

案解析:

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

RMAN 资料档案库数据始终存储在目标数据库的控制文件中。此外,它也可以存储在一个名为“恢复目录”的单独数据库中。恢复目录会在单独的数据库中保留备份信息,这在控制文件丢失时尤为有用。这样你可以存储更长的备份历史记录,比基于控制文件的资料档案库所存储的历史记录还要长。使用一个恢复目录可存储多个目标数据库的信息。恢复目录还可用来存放RMAN 存储脚本,这些脚本是RMAN 命令的序列。

如果你的备份管理要求很简单,则Oracle 建议你使用控制文件选项而不要使用恢复目录。拥有恢复目录意味着你需要管理并备份其它数据库。因此,只有在可利用恢复目录所提供的优点(如较长的备份保留时间)时,才使用恢复目录。

 

504.View the Exhibit to examine the error during the database startup. You open an RMAN session for the database instance. To repair the failure, you executed the following as the first command in the RMAN session:

RMAN> REPAIR FAILURE;

Which statement describes the consequence of the command?

A.The command performs the recovery and closes the failures.

B.The command executes the RMAN script to repair the failure and removes the entry from the Automatic Diagnostic Repository (ADR).

C.The command only displays the advice and the RMAN script required for repair.

D.The command produces an error because the ADVISE FAILURE command has not been executed before the REPAIR FAILURE command.

 

 

Answer: D

 

505.You configured the default backup device type as disk for RMAN backups. In your database, because of business requirements, you have to take a simultaneous duplicate backup of the data files when the RMAN BACKUP command is used. What must you set using the RMAN CONFIGURE command to achieve this?

A. MAXSETSIZE TO 2;

B. DEVICE TYPE DISK PARALLELISM 2;

C. RETENTION POLICY TO REDUNDANCY 2;

D. DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

 

 

Answer: C

题目解答: 冗余数为 2,可确保备份文件至少 2 份才有效备份。
D 也能实现备份为 2 份—值不过是一个备份集下有两个一样的备份文件在不同的备份片中。但默认不能用 必须使用 format 参数指定备份路径

 

506.Examine the following ALTER command;

SQL> ALTER DISKGROUP dgroup1 UNDROP DISKS;

What is the purpose of the command?

A. It cancels all pending disk drops within the disk group.

B. It adds previously dropped disks back into the disk group.

C. It restores disks that are being dropped as the result of a DROP DISKGROUP operation.

D. It mounts disks in the disk group for which the drop-disk operation has already been completed.

E. It restores all the dropped disks in the disk group for which the drop-disk operation has already been completed.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#SQLRF52639

 

undrop_disk_clause

Use this clause to cancel the drop of disks from the disk group. You can cancel the pending drop of all the disks in one or more disk groups (by specifyingdiskgroup_name) or of all the disks in all disk groups (by specifying ALL).

This clause is not relevant for disks that have already been completely dropped from the disk group or for disk groups that have been completely dropped. This clause results in a long-running operation. You can see the status of the operation by querying the V$ASM_OPERATION dynamic performance view.

 

507.Your database is running In ARCIIIVELOG mode. One of the data files, USBRDATAOI. DBF, in the users tablespace is damaged and you need to recover the file until the point of failure. The backup for the data file is available. Which three files would be used in the user-managed recovery process performed by the database administrator (DBA)? (Choose three.)

A. redo logs

B. control file

C. temporary files of temporary tablespace

D. the latest backup of only the damaged data file

E. the latest backup of all the data files In the USERS tablespace

 

 

Answer: ABD

答案解析:

对比625题:http://blog.csdn.net/rlhua/article/details/19173169

此题对比625题,缺少一个F选项:

F. Archive Logs since the latest backup to point of failure

 

从以下实验看出,redo log是用来介质恢复用的。

the latest backup of only the damaged data file用来做转储用。

Archive Logs since the latest backup to point of failure应用归档日志恢复到故障点

这里要求选三个,从用排除法,CE是不需要用到的。

故正确答案应为ADF

 

508.You want to set the following Initialization parameters for your database Instance

LOG_ARCHIVE_DEBT_1 = ,,LOCATION=/disk1/arch

LOG_ARCHIVE_DBST_2 = ,,LOCATION=/disk2/arch

LOG_ARCHIVE DBST_3 = ,,LOCATION=/disk3/arch

LOG_ARCHIVE DBST_4 = ,,LOCATION=/disk3/arch

Identify the statement that correctly describes this setting.

A. The MANDATORY location must be a flash recovery area.

B. The optional destinations may not use the flash recovery area.

C. This setting is not allowed because the first destination is not set as MANDATORY.

D. The online redo log file is not allowed to be overwritten if the archived log cannot be created in the fourth destination.

 

 

Answer: D

答案解析:

参考:618题:http://blog.csdn.net/rlhua/article/details/13998731

此题题意有问题,第四个路径应为LOG_ARCHIVE_DEST_4 = 'LOCATION=/disk4/arch MANDATORY'

如果两个路径相同,如题中3和4是一样的/disk3/arch,是不对的。

 

sys@TEST1107> alter system set log_archive_dest_1='LOCATION=/u01/rmanbak/d1';

 

System altered.

 

sys@TEST1107> alter system set log_archive_dest_2='LOCATION=/u01/rmanbak/d1';

alter system set log_archive_dest_2='LOCATION=/u01/rmanbak/d1'

*

ERROR at line 1:

ORA-02097: parameter cannot be modified because specified value is invalid

ORA-16033: parameter LOG_ARCHIVE_DEST_2 destination cannot be the same as parameter

LOG_ARCHIVE_DEST_1 destination

 

 

509.Which of the following cannot be used as input to the SQL Tuning Advisor? (Choose all that apply.)

A. A single SQL statement provided by a user

B. An existing SQL Tuning Set (STS)

C. A preprocessed Database Replay workload

D. A schema name

E. SQL statement identified in EM as using excessive resources

 

 

Answer: CD

 答案解析:

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

• 使用SQL 优化指导可分析SQL 语句,并获得性能建议。

• SQL 优化指导分析的来源:

– 顶级活动:分析当前处于活动状态的顶级 SQL 语句

– SQL 优化集:分析用户提供的一组 SQL 语句

– 以往的SQL (AWR):分析 AWR 快照收集的 SQL 语句中的语句

 

排除法,选CD

 

 

510.You executed the following command in Recovery Manager (RMAN):

RMAN> REPORT NEED BACKUP days 3;

What is the output of this command?

A. a list of files that require a backup within three days

B. a list of files requiring more than 3 days of archive logs to apply

C. a list of files that RMAN recommends be backed up only once in every three days, based on low volatility

D. a list of files for which a backup has already been performed in the last three days and which is

required to be backed up again based on the high number of transactions performed on them

 

 

Answer: A

题目解答:列出 3 天内没有备份而要求备份的文件清单
注意 B 在非归档下是错误的。

 

511.You have configured flash recovery area in your database and you set the following Initialization parameters for your database instance:

LOG_ARCHIVE_DEST 1 = ,,LOCATION=/disk1/arch MANDATORY'

LOG _ARCHIEVE_DEST 2 = ,,LOCATION=/disk2/arch'

LOG_ARCHIVK_DEST_3 = ,,LOCATION=/diSk3/arch

LOG_ARCH1VK_DEST_4 = ' LOCATION=/disk4/arch'

LOG_ARCHIVE_MIN-SUCCEED_DEST = 2

While the database instance is functional, you realized that the destination set by the LOG_ARCHIVE_DEST_I parameter Is not available for the archived redo log file to be created in. All redo log groups have been used. What happens in an event of log switch?

A. The online redo log file Is not allowed to be overwritten.

B. The archived redo log files are written to the flash recovery area until the MANDATORY destination is made available.

C. The database instance will crash because the archived redo log file cannot be created in a destination set as MANDATORY.

D. The destination set by the LOG_ARCHIVE_DEST_1 parameter is ignored and the archived redo log files are created in the next two available locations to guarantee archive log success.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/archredo.htm#ADMIN11346

 

题中共有4个LOG _ARCHIEVE_DEST,而LOG_ARCHIVE_MIN-SUCCEED_DEST = 2,即意味着必须有两个能归档成功,而LOG_ARCHIVE_DEST 1 是指定MANDATORY,即要求它必须归档成功,但此时LOG_ARCHIVE_DEST 1不可用,根据LOG_ARCHIVE_MIN-SUCCEED_DEST = 2,保证接下来的两个归档地址必须归档成功。

 

512.Which two statements correctly describe the relationship among the Scheduler components: job,program, and schedule? (Choose two)

A. A job is specified as part of a program definition

B. A program can be used in the definition of multiple jobs

C. A program and job can be specified as part of a schedule definition

D. A program and schedule can be specified as part of a job definition

 

 

Answer: BD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schedover.htm#ADMIN12374

http://docs.oracle.com/cd/E11882_01/server.112/e25494/schedover.htm#ADMIN12357

 

正确答案BD

 

 

调度程序使用以下基本组件:

• “作业”指定要执行的操作。它可以是PL/SQL 过程、纯二进制可执行文件、Java 应用程序或Shell 脚本。可以将程序(内容)和调度(时间)指定为作业定义的一部分,

也可以改用现有的程序或调度。可以使用作业的参数来定制其运行时行为。

• “调度”指定作业的执行时间和次数。调度可以基于时间或事件。可以为作业定义调度,方法是使用一系列日期、一个事件,或两者相结合,以及表示重复间隔的附加说

明。可以单独存储作业的调度,然后对多个作业使用同一个调度。

• “程序”是有关特定可执行文件、脚本或过程的元数据集合。自动作业将执行某个任务。使用程序,无需修改作业本身即可修改作业任务或者“内容”。可以定义程序的参数,使用户可以修改任务的运行时行为。

 

513.What RMAN command is used to execute a tablespace point-in-time recovery?

A. recover

B. duplicate

C. restore

D. copy

E. None of the above

Answer: A

 

 

答案解析:

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

表空间时间点的恢复是使用rman的recove名来来恢复的

如:

执行完全自动执行的TSPITR

1. 配置在目标实例上执行TSPITR 所需的通道。

2. 使用AUXILIARY DESTINATION选项指定辅助目标。

RMAN> CONNECT TARGET

RMAN> RECOVER TABLESPACE users, example

> UNTIL TIME '2007-06-29:08:00:00'

> AUXILIARY DESTINATION

> '/u01/app/oracle/oradata/aux';

3. 备份恢复的表空间并使它们联机。

执行完全自动执行的TSPITR 时,还必须:

• 配置在目标实例上执行TSPITR 所需的任何通道

• 指定RMAN 用于数据文件辅助集和其它辅助实例文件的目标

在TSPITR 完成之后,备份恢复的表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的表空间的备份。

 

514.A user performs an update on a table. Shortly after committing the transaction, they realize that they had an error in their WHERE clause causing the wrong rows to be updated. Which Flashback option would allow you to undo this transaction and restore the table to its previous state?

A. Flashback Drop

B. Flashback Query

C. Flashback Versions Query

D. Flashback Transaction Query

E. Flashback Table

 

 

Answer: E

答案解析:

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

针对使用了错误的where子句进行更新,使用闪回表就可以了。

 

 

515.A developer calls and reports that he accidentally dropped an important lookup table from a

production database. He needs the table to be recovered. What action would you take?

A. Initiate an incomplete recovery operation using RMAN.

B. Copy the table from a development database.

C. Advise the user to rekey the data.

D. Perform a Flashback Drop operation.

E. Perform a Flashback Recovery operation.

 

 

Answer: D

答案解析:

参考:闪回删除:http://blog.csdn.net/rlhua/article/details/12407737

 

使用FLASHBACK TABLE命令,可以在无需使用时间点恢复的情况下,还原DROP TABLE语句的结果。

注:初始化参数RECYCLEBIN用于控制闪回删除功能是打开(ON) 还是关闭(OFF)。如果将该参数设置为OFF,则删除的表不会进入回收站。如果将该参数设置为ON,则删除的表将进入回收站,并且可以进行恢复。默认情况下,RECYCLEBIN设置为ON。

使用FLASHBACK TABLE ... TO BEFORE DROP命令从回收站恢复表及其所有可能的从属对象。可以指定表的原始名称或删除对象时分配给对象的系统生成名称。

 

516.In a Database Replay workload capture, what client request information is gathered? (Choose all that apply.)

A. SQL text

B. Shared server requests (Oracle MTS)

C. Bind variable values

D. Information about transactions

E. Remote DESCRIBE and COMMIT operations

 

 

Answer: ACD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41481/dbr_intro.htm#RATUG105

 

517.Which of the following are true concerning block media recovery? (Choose all that apply.)

A. Any gap in archive logs ends the recovery.

B. If a gap in archive logs is encountered, RMAN will search forward for newer versions of the blocks that are not corrupt.

C. Uncorrupted blocks from the flashback logs may be used to speed recovery.

D. The database can be in NOARCHIVELOG mode.

E. None of the above.

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89784

Missing Redo During Block Recovery

Like data file media recovery, block media recovery cannot generally survive a missing or inaccessible archived log, although it attempts restore failover when looking for usable copies of archived redo log files, as described in "Restore Failover". Also, block media recovery cannot survive physical redo corruptions that result in checksum failure. However, block media recovery can survive gaps in the redo stream if the missing or corrupt redo records do not affect the blocks being recovered. Whereas data file recovery requires an unbroken series of redo changes from the beginning of recovery to the end, block media recovery only requires an unbroken set of redo changes for the blocks being recovered.

Note:

Each block is recovered independently during block media recovery, so recovery may be successful for a subset of blocks.

When RMAN first detects missing or corrupt redo records during block media recovery, it does not immediately signal an error because the block undergoing recovery may create one later in the redo stream. When a block is re-created, all previous redo for that block becomes irrelevant because the redo applies to an old incarnation of the block. For example, the database creates a new a block when users drop or truncate a table and then use the block for other data.

Assume that media recovery is performed on block 13 as depicted in Figure 19-1.

Figure 19-1 Performing RMAN Media Recovery


Description of "Figure 19-1 Performing RMAN Media Recovery"

After block recovery begins, RMAN discovers that change 120 is missing from the redo stream, either because the log block is corrupt or because the log cannot be found. RMAN continues recovery assuming that block 13 will be re-created later in the redo stream. Assume that in change 140 a user drops the table employees stored in block 13, allocates a new table in this block, and inserts data into the new table. At this point, the database formats block 13 as a new block. Recovery can now proceed with this block even though some redo preceding the recreation operation was missing.

 

Prerequisites for Block Media Recovery

The following prerequisites apply to the RECOVER ... BLOCK command:

The target database must run in ARCHIVELOG mode and be open or mounted with a current control file.

If the target database is a standby database, then it must be in a consistent state, recovery cannot be in session, and the backup must be older than the corrupted file.

The backups of the data files containing the corrupt blocks must be full or level 0 backups and not proxy copies.

If only proxy copy backups exist, then you can restore them to a nondefault location on disk, in which case RMAN considers them data file copies and searches them for blocks during block media recovery.

RMAN can use only archived redo logs for the recovery.

RMAN cannot use level 1 incremental backups. Block media recovery cannot survive a missing or inaccessible archived redo log, although it can sometimes survive missing redo records.

Flashback Database must be enabled on the target database for RMAN to search the flashback logs for good copies of corrupt blocks.

If flashback logging is enabled and contains older, uncorrupted versions of the corrupt blocks, then RMAN can use these blocks, possibly speeding up the recovery.

The target database must be associated with a real-time query physical standby database for RMAN to search the database for good copies of corrupt blocks.

 

518.The DBA has chosen to manage SGA and PGA memory separately in an OLTP database because of his unique knowledge of the application. Which of these are good starting points to use when configuring the maximum values for SGA and PGA, based on the amount of memory available on the system?

A. 20% SGA, 80% PGA

B. 25% SGA, 75% PGA

C. 50% SGA, 50% PGA

D. 75% SGA, 25% PGA

E. 80% SGA, 20% PGA

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/memory.htm#PFGRF94352

 

7.5.1.1 Setting PGA_AGGREGATE_TARGET Initially

The value of the PGA_AGGREGATE_TARGET initialization parameter (for example 100000 KB, 2500 MB, or 50 GB) should be set based on the total amount of memory available for the Oracle database instance. This value can then be tuned and dynamically modified at the instance level. Example 7-2 illustrates a typical situation.

Example 7-2 Initial Setting of PGA_AGGREGATE_TARGET

Assume that an Oracle database instance is configured to run on a system with 4 GB of physical memory. Part of that memory should be left for the operating system and other non-Oracle applications running on the same hardware system. You might decide to dedicate only 80% (3.2 GB) of the available memory to the Oracle database instance.

You must then divide the resulting memory between the SGA and the PGA.

For OLTP systems, the PGA memory typically accounts for a small fraction of the total memory available (for example, 20%), leaving 80% for the SGA.

For DSS systems running large, memory-intensive queries, PGA memory can typically use up to 70% of that total (up to 2.2 GB in this example).

Good initial values for the parameter PGA_AGGREGATE_TARGET might be:

For OLTP: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 20%

For DSS: PGA_AGGREGATE_TARGET = (total_mem * 80%) * 50%

where total_mem is the total amount of physical memory available on the system.

In this example, with a value of total_mem equal to 4 GB, you can initially set PGA_AGGREGATE_TARGET to 1600 MB for a DSS system and to 655 MB for an OLTP system.

 

519.You notice that a long-running transaction is suspended due to a space constraint, and there is no AFTER SUSPEND triggered event addressing the issue. You also note that the critical transaction is just about to reach the RESUMABLE_TIMEOUT value. Which of these actions is appropriate?

A. Abort the session, fix the space problem, then resubmit the transaction.

B. Use the DBMS_RESUMABLE.SET_SESSION_TIMEOUT procedure to extend the time-out for the

session while you fix the problem.

C. Do nothing, let the transaction fail, then fix the problem.

D. Use Segment Shrink to clean up the table.

E. Use the DBMS_RESUMABLE.SET_TIMEOUT procedure to extend the time-out for the session while you fix the problem.

 

 

Answer: B

答案解析:

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

你注意到由于空间的限制,一个长久运行的事务被挂起,也没有AFTER SUSPEND触发器去解决这个问题。你也注意到关键事务快达到RESUMABLE_TIMEOUT 的值。

 

SET_SESSION_TIMEOUT(sessionID, timeout)

This procedure sets the timeout interval of resumable space allocation for the session with sessionID. The parameter timeout is in seconds. The new timeout setting will applies to the session immediately. If the session does not exist, no action is taken.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schema.htm#ADMIN11598

 

使用DBMS_RESUMABLE.SET_SESSION_TIMEOUT程序包来延长超时的会话,来解决问题。

 

520.Which of the following are not disabled by default?
A. Jobs
B. Chains
C. Windows
D. Window groups
E. Schedule

 

Answer: E

 

dba_scheduler_jobs dba_scheduler_chains dba_scheduler_windows dba_scheduler_window_groups
dba_scheduler_schedules 这些试图可以知道 schedule 没有 enabled 列的 就没有禁用功能,默认就是启用的。其他的默认都是禁用的状态,除非建立是指定 enable 为 true.

 

521.You notice that a job in a chain has not completed on a nonconstrained RAC database. Which of these are valid reasons why that might occur?
A. The job priority is 1 and the resource consumer group CPU emphasis allocation is a low percentage.
B. The job affinity is to a service and one node in that service is unavailable.
C. The job affinity is to an instance and that instance is unavailable.
D. There is no service affinity.

E. None of the above.

 

 

Answer: C

 

522.The NLS_LANGUAGE parameter specifies the default conventions to be used for which of the

following globalization elements?

A. Languages for server messages

B. Day and month names and abbreviations

C. Symbols to represent a.m., p.m., AD, and BC

D. Affirmative and negative response strings (YES, NO)

E. None of the above

F. All of the above

Answer: F

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch3globenv.htm#NLSPG199

 

NLS_LANGUAGE specifies the default conventions for the following session characteristics:

Language for server messages Language for day and month names and their abbreviations (specified in the SQL functions TO_CHAR and TO_DATE)

Symbols for equivalents of AM, PM, AD, and BC. (A.M., P.M., A.D., and B.C. are valid only if NLS_LANGUAGE is set to AMERICAN.)

Default sorting sequence for character data when ORDER BY is specified. (GROUP BY uses a binary sort unless ORDER BY is specified.)

Writing direction

Affirmative and negative response strings (for example, YES and NO)

 

523.The NLS_TERRITORY parameter specifies the default conventions to be used for which of the

following globalization elements? (Choose all that apply.)

A. Date format

B. Decimal character

C. Group separator

D. First day of the month

E. None of the above

F. All of the above

 

 

Answer: ABC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams156.htm#REFRN10128

NLS_TERRITORY specifies the name of the territory whose conventions are to be followed for day and week numbering.

This parameter also establishes the default date format, the default decimal character and group separator, and the default ISO and local currency symbols.

 

524.What are three benefits of using ASM? (Choose three.)

A. Ease of disk administration and maintenance

B. Load balancing across physical disks

C. Software RAID-1 data redundancy with double or triple mirrors

D. Automatic recovery of failed disks

 

 

Answer: ABC

答案解析:

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

优点如下:

• 对文件而不是逻辑卷进行条带化

• 提供联机磁盘重新配置和动态重新平衡功能

• 允许调整重新平衡速度

• 以每个文件为基础提供冗余

• 只支持Oracle DB 文件

• 可识别集群

• 可自动安装

ASM 将文件划分为区(不同于前面讨论的数据文件区),而且将每个文件的区均匀分布在所有磁盘上。ASM 使用索引技术跟踪每个区的位置。存储容量发生变化时,ASM 不会重新对所有数据进行条带化,而是根据添加或删除的存储量,按比例移动一定数量的数据,以重新平均分配文件,并在磁盘间保持负载平衡。此操作可在数据库处于活动状态时执行。可以提高重新平衡操作的速度,以便更快地完成操作;也可以降低速度,以减少对I/O 子系统的影响。ASM 还提供了镜像保护,因此不必再购买第三方的逻辑卷管理器。

ASM 的一个特有优势是可基于文件而不是卷进行镜像。因此,同一磁盘组可以包含镜像文件或非镜像文件的组合。

ASM 支持数据文件、日志文件、控制文件、归档日志、Recovery Manager (RMAN) 备份集及其它Oracle DB 文件类型。ASM 还支持RAC,这样就不再需要集群逻辑卷管理器或集群文件系统。

 

 使用ASM 可以免除非ASM 存储环境中许多必不可少的任务。其中包括:

• I/O 性能优化:ASM 采用条带化和镜像所有内容的策略,且执行自动重新平衡操作,这意味着不再需要旨在平衡磁盘使用以及消除磁盘热点的I/O 性能优化。

• 数据文件移动和重新组织:不再需要更改数据文件的位置来满足性能要求和空间约束条件。

• 文件名管理:不再需要定义和强制执行文件命名策略。

• 逻辑卷、文件系统、集群文件系统和裸设备管理:不再需要这些存储元素。

 

使用ASM 可以减少下列重要方面的工作,从而提供更多好处:

• 逻辑单元号(LUN) 管理工作减少,因为ASM 通常需要的逻辑单元较少且大小较大。

• 数据库管理员与系统管理员之间通常存在的依赖性将大大减少。例如,添加新数据文件或将磁盘资源从一个磁盘组移至另一磁盘组时不再需要系统管理员干预。

• 手动执行维护任务时可能发生的错误将大大减少。例如,使用常规文件系统时,新建数据文件时可能不慎违反了文件命名惯例,导致数据库的其余部分不支持该文件。

 

从以上得知,ASM更加容易管理和维护磁盘,并且能物理磁盘间负载均衡,如果文件坏了,能自动rebalance,可以提供磁盘冗余。

 

ASM中的磁盘冗余策略分成三类,外部冗余,标准冗余和高度冗余,其中外部冗余与failure磁盘组无关,如果设置了标准冗余和高度冗余,那么该磁盘组就必须拥有failure磁盘组。

标准冗余,ASM要求改磁盘组至少要拥有两个failure磁盘组,即提供双倍镜像保护,对于同一份数据(ASM中镜像单位不是磁盘,也不是块,而是一种AU的单位,该单位大小默认是1M)将有主从两份镜像,并且ASM通过算法来自动确保主、从镜像不会存在于同一份failure 磁盘组,这样就保障了就算整个failure 磁盘组都损坏,数据也不会丢失。至于高度冗余(High Redundancy)就更安全了,它至少需要三个failure 磁盘组,也就是一份AU有一主多从的镜像,理论上将更加安全。

如果磁盘发生损坏,那么损坏的磁盘默认自动offlice并被drop掉,不过该磁盘所在的磁盘组仍将保持MOUNT状态,如果该盘有镜像的话,那么应用不会有影响,镜像盘将自动实现接管--只要不是所有failure磁盘组都损坏掉,否则的话,该磁盘组将自动DISMOUNT

 

 

525.What components are present in an ASM instance? (Choose three.)

A. SGA

B. Database processes

C. Database datafiles

D. Control files

E. Database parameter file or spfile

 

 

Answer: ABE

答案解析:

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

 

ASM 实例是ASM 的进程和内存组件的组合。

 每次启动ASM 或数据库时,都会分配名为系统全局区(SGA) 的共享内存区域并启动Oracle ASM 或数据库后台进程。后台进程和SGA 的组合称为Oracle ASM 实例或Oracle DB 实例。

ASM 实例也由参数文件控制,其方式与常规数据库实例相同。

 

526.Which of the following is a benefit of ASM fast disk resync?

A. Failed disks are taken offline immediately but are not dropped.

B. Disk data is never lost.

C. By default, the failed disk is not dropped from the disk group ever, protecting you from loss of that disk.

D. The failed disk is automatically reformatted and then resynchronized to speed up the recovery process.

E. Hot spare disks are automatically configured and added to the disk group.

 

 

Answer: A

答案解析:

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

 

ASM 快速镜像重新同步可以显著减少重新同步临时故障磁盘所需的时间。如果某个磁盘因临时故障而脱机,ASM 将跟踪在中断期间发生修改的区。临时故障被修复后,ASM 可以快速地仅重新同步在中断期间受影响的ASM 磁盘区。

此功能假设受影响的ASM 磁盘的内容未被破坏或修改。

某个ASM 磁盘路径出现故障时,如果已设置了相应磁盘组的DISK_REPAIR_TIME属性,则ASM 磁盘会脱机,但不会被删除。此属性的设置确定了ASM 可容忍的磁盘中断持续时间;如果中断在此时间范围内,则修复完成后仍可重新同步。注:跟踪机制对每个修改的分配单元使用1 位。这样可确保跟踪机制非常高效。

 

527.What is the result of increasing the value of the parameter ASM_POWER_LIMIT during a rebalance operation?

A. The ASM rebalance operation will likely consume fewer resources and complete in a shorter amount of time.

B. The ASM rebalance operation will consume fewer resources and complete in a longer amount of time.

C. The ASM rebalance operation will be parallelized and should complete in a shorter amount of time.

D. There is no ASM_POWER_LIMIT setting used in ASM.

E. None of the above

 

 

Answer: C

答案解析:

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

ASM_POWER_LIMIT控制重新平衡操作的速度。值的范围从1 到11,11 表示最快。如果省略,该值默认为1。

 

 

528.What is the default AU size of an ASM disk group? What is the maximum AU size in an ASM disk group?

A. 100KB default, 10TB maximum

B. 256KB default, 1024MB maximum

C. 10MB default, 126PB maximum

D. 64KB default, 1EB maximum

E. 1MB default, 64MB maximum

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/install.112/e41961/storage.htm#CWLIN290

 

Determine an allocation unit size. Every Oracle ASM disk is divided into allocation units (AU). An allocation unit is the fundamental unit of allocation within a disk group. You can select the AU Size value from 1, 2, 4, 8, 16, 32 or 64 MB, depending on the specific disk group compatibility level. The default value is set to 1 MB.

 

529.Which initialization parameter in an ASM instance specifies the disk groups to be automatically mounted at instance startup?

A. ASM_DISKMOUNT

B. ASM_DISKGROUP

C. ASM_DISKSTRING

D. ASM_MOUNTGROUP

 

 

Answer: B

答案解析:

 

The ASM_DISKGROUPS initialization parameter specifies a list of the names of disk groups that an Oracle ASM instance mounts at startup. 

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm#OSTMG10141

 

530.When an ASM instance receives a SHUTDOWN NORMAL command, what command does it pass on to all database instances that rely on the ASM instances disk groups?

A. TRANSACTIONAL

B. IMMEDIATE

C. ABORT

D. NORMAL

 

 

Answer: C

答案解析:

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

在SQL*Plus 中运行SHUTDOWN命令时将启动ASM 关闭进程。在运行此命令之前,请确保已设置ORACLE_SID和 ORACLE_HOME环境变量,从而你可以连接到ASM 实例。

Oracle 强烈建议你在尝试关闭ASM 实例之前关闭使用该ASM 实例的所有数据库实例。

下面的列表讲述了与ASM 相关的 SHUTDOWN命令参数。

• NORMAL:ASM 在卸载所有磁盘组并关闭ASM 实例之前,将等待任何正在进行的SQL 完成执行。在关闭实例之前,ASM 将等待所有当前连接的用户从该实例断开。如果任何数据库实例与ASM 实例连接,则 SHUTDOWN命令将返回错误并保持ASM 实例继续运行。NORMAL是默认关闭模式。

• IMMEDIATE或 TRANSACTIONAL:ASM 在卸载所有磁盘组并关闭ASM 实例之前,将等待任何正在进行的SQL 完成执行。ASM 不等待当前与实例连接的用户断开连接。如果任何数据库实例与ASM 实例连接,则 SHUTDOWN命令将返回错误并保持ASM 实例继续运行。

• ABORT:ASM 实例立即关闭,而不按顺序卸载磁盘组。这将导致下次启动ASM 时进行恢复操作。如果有任何数据库实例与ASM 实例连接,则该数据库实例也将中止。

注:有连接的RDBMS 实例时,不应用NORMAL、IMMEDIATE和 TRANSACTIONAL形式的关闭,而将返回下面的错误:

SQL> shutdown

ORA-15097: cannot SHUTDOWN ASM instance with connected client (process 14372)

 

531.When starting up your ASM instance, you receive the following error:

 

What is the cause of the error?

A. The ASM_DISKGROUPS parameter is configured for three disk groups: DGROUP1, DGROUP2, and DGROUP3. The underlying disks for these disk groups have apparently been lost.

B. The format of the ASM_DISKGROUPS parameter is incorrect. It should reference the disk group

numbers, not the names of the disk groups

C. The ASM_POWER_LIMIT parameter is incorrectly set to 1. It should be set to the number of disk groups being attached to the ASM instance.

D. The ASM_DISKSTRING parameter is not set; therefore disk discovery is not possible.

E. There is insufficient information to solve this problem.

 

 

Answer: D

答案解析:

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

ASM_DISKSTRING是一个与操作系统相关的值,ASM 使用它来限制搜索时考虑的磁盘集即是设置ASM启动时检查的磁盘,该选项可以同时指定多个值,并且支持通配符。比如只检查/DEV/SD*。默认值为空字符串,为空的话,表示ASM将查找系统中所有ASM拥有读写权限的设备。这在大多数情况下就足够了。如上所示的约束性更强的值可以减少ASM 执行搜索所需的时间,从而提高磁盘组装载次数。

从图上可以,他的ASM_DISKSTRING没有设置。

 

532.As DBA for the Rebel Alliance you have decided that you need to facilitate some redundancy in your database. Using ASM, you want to create a disk group that will provide for the greatest amount of redundancy for your ASM data (you do not have advanced SAN mirroring technology available to you, unfortunately). Which of the following commands would create a disk group that would offer the maximum in data redundancy?

A. CREATE DISKGROUP dg_alliance1 NORMAL REDUNDANCY failgroup diskcontrol1 DISK ,,

c:\oracle\asm_disk\_file_disk3 NAME file_ diska1 failgroup diskcontrol2 DISK ,,

c:\oracle\asm_disk\_file_disk4 NAME file_ diskb1;

B. CREATE DISKGROUP dg_alliance1 EXTERNAL REDUNDANCY failgroup diskcontrol1 DISK

'c:\oracle\asm_disk\_file_disk3' NAME file_ diska1;

C. CREATE DISKGROUP dg_alliance1 HIGH REDUNDANCY failgroup diskcontrol1 DISK

'c:\oracle\asm_disk\_file_disk1' NAME file_ disk1 failgroup diskcontrol2 DISK '

c:\oracle\asm_disk\_file_disk2' NAME file_ disk2 failgroup diskcontrol2 DISK '

c:\oracle\asm_disk\_file_disk3' NAME file_ disk3;

D. CREATE DISKGROUP dg_alliance1 MAXIMUM REDUNDANCY failgroup diskcontrol1 DISK

'c:\oracle\asm_disk\_file_disk1' NAME file_ disk1 failgroup diskcontrol2 DISK '

c:\oracle\asm_disk\_file_disk2' NAME file_ disk2 failgroup diskcontrol2 DISK '

c:\oracle\asm_disk\_file_disk3' NAME file_ disk3 failgroup diskcontrol2 DISK First Test,

'c:\oracle\asm_disk\_file_disk4' NAME file_ disk4;

E. None of the above

 

 

Answer: C

答案解析:

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

题中说要provide for the greatest amount of redundancy for your ASM data 

即使用 最高级别的冗余来创建磁盘组

指定冗余度,有三个选择:HIGH(高度冗余>三路)、NORMAL(标准冗余--双路)和XTERNAL(外部存储冗余);   

 

533.You want to migrate your database to ASM, so you have done a clean shutdown, made a closed backup of the entire You wa database, noted the location of your control files and online redo log files, and changed your spfile to use OMF. The last step is to run an RMAN script to do the conversion. Using the following steps, what is the correct order in which the following RMAN commands should be executed?

1. STARTUP NOMOUNT

2. ALTER DATABASE OPEN RESETLOGS

3. SQL "ALTER DATABASE RENAME ,,logfile1 path TO ,,+dgrp4 ,," # plus all other logfiles

4. SWITCH DATABASE TO COPY

5. BACKUP AS COPY DATABASE FORMAT ,,+dgrp4

6. ALTER DATABASE MOUNT

7. RESTORE CONTROLFILE FROM ,,controlfile_location

A. 2, 5, 3, 1, 7, 6, 4

B. 1, 7, 6, 5, 4, 3, 2

C. 5, 1, 2, 7, 4, 6, 3

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

 

 

Answer: B

答案解析:

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

1. 完全关闭数据库。

2. 关闭数据库并修改服务器参数文件,以使用Oracle Managed Files (OMF)。

3. 编辑并执行以下RMAN 脚本:

STARTUP NOMOUNT;

RESTORE CONTROLFILE FROM '/u1/c1.ctl';

ALTER DATABASE MOUNT;

BACKUP AS COPY DATABASE FORMAT '+dgroup1';

SWITCH DATABASE TO COPY;

SQL "ALTER DATABASE RENAME '/u1/log1'TO '+dgroup1' ";

# Repeat RENAME command for all online redo log members

...

ALTER DATABASE OPEN RESETLOGS;

SQL "ALTER DATABASE TEMPFILE '/u1/temp1' DROP";

 

将数据库移植到ASM 存储区

由于ASM 文件无法通过正常的操作系统界面访问,因此RMAN 是复制ASM 文件的唯一途径。虽然由于表空间的历史原因,表空间中的文件既可以是ASM 文件,也可以

是非ASM 文件,但是RMAN 命令会将非ASM 文件移到ASM 磁盘组中。通过以下过程,可以将整个数据库移到ASM 磁盘组中:(假定你使用的是服务器参数文件。)

1. 使用V$CONTROLFILE和V$LOGFILE,获取当前控制文件和联机重做日志的文件名。

2. 像平常一样关闭数据库。按如下所述,修改数据库的服务器参数文件:

- 将必要的OMF 目标参数设置为所需的ASM 磁盘组。

- 删除CONTROL_FILES参数。

3. 编辑和运行RMAN 命令文件,这将备份数据库、将当前数据文件移到备份中并重命名联机重做日志。使用BACKUP AS COPY命令只能移动表空间或数据文件。

4. 删除旧的数据库文件。

注:如果创建一个OMF 控制文件,并且有一个服务器参数文件,则会在该服务器参数文件中创建一个CONTROL_FILES初始化参数条目。

 

534.How can you reverse the effects of an ALTER DISKGROUP ... DROP DISK command if it has not yet completed?

A. Issue the ALTER DISKGROUP ... ADD DISK command.

B. Issue the ALTER DISKGROUP ... UNDROP DISKS command.

C. Issue the ALTER DISKGROUP ... DROP DISK CANCEL command.

D. Retrieve the disk from the Recycle Bin after the operation completes.

 

 

Answer: B

答案解析:

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

在没有完全drop前,可以使用undrop取消drop

 

535.To reference existing ASM files, you need to use a fully qualified ASM filename. Your development database has a disk group named DG2A, the database name is DEV19, and the ASM file that you want to reference is a datafile for the USERS02 tablespace. Which of the following is a valid ASM filename for this ASM file?

A. dev19/+DG2A/datafile/users02.701.2

B. +DG2A/dev19/datafile/users02.701.2

C. +DG2A/dev19/users02/datafile.701.2

D. +DG2A.701.2

E. +DG2A/datafile/dev19.users.02.701.2

 

 

Answer: B

答案解析:

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

生成格式为:+diskgroup/dbname/file_type/file_type_tag.file.incarnation ,

• +diskgroup :磁盘组名称;  

• dbname :数据库的DB_UNIQUE_NAME参数值;   

• file_type :创建的文件类型,比如CONTROLFILE/DATAFILE/ONLINELOG/ARCHIVELOG/TEMPFILE/BACKUPSET/FLASHBAC

K等等;   

•  file_type_tag  :文件类型的标签,比如表空间对应的通常为该表空间名称;   

•   file.incarnation  :文件序号+incarnation,用来确保文件的唯一; 

 sys@TEST0924> alter tablespace INVENTORY add datafile '+DATA';

Tablespace altered.

 

ASMCMD> pwd

+data/test0924/datafile

ASMCMD> ls

INVENTORY.266.829658135

 

sys@TEST0924> alter tablespace INVENTORY add datafile '+DATA/test0924/datafile/inventory03.dbf' SIZE 10m;

 

Tablespace altered.


 ASMCMD> ls

INVENTORY.264.829668701

INVENTORY.266.829658135

inventory03.dbf

 

536.Which background process coordinates the rebalance activity for disk groups?

A. ORBn

B. OSMB

C. RBAL

D. ASMn

 

 

Answer: C

 

RBAL

ASM Rebalance Master Process

Coordinates rebalance activity

In an ASM instance, it coordinates rebalance activity for disk groups. In a database instances, it manages ASM disk groups.

 

537.On the development database rac0, there are six raw devices: /dev/raw/raw1 through /dev/raw/raw6./dev/raw/raw1 and /dev/raw/raw2 are 8GB each, and the rest are 6GB each. An existing disk group +DATA1, of NORMAL REDUNDANCY, uses /dev/raw/raw1 and /dev/raw/raw2.

Which series of the following commands will drop one of the failure groups for +DATA1, create a new disk group +DATA2 using two of the remaining four raw devices, and then cancel the drop operation from +DATA1?

A. ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;

CREATE DISKGROUP DATA2 NORMAL REDUNDANCY FAILGROUP DATA1A DISK ,,

/dev/raw/raw3 FAILGROUP DATA1B DISK ,,/dev/raw/raw4;

ALTER DISKGROUP DATA1 UNDROP DISKS;

 

B. ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;

CREATE DISKGROUP DATA2 HIGH REDUNDANCY FAILGROUP DATA1A DISK '/dev/raw/raw3'

FAILGROUP DATA1B DISK '/dev/raw/raw4;'ALTER DISKGROUP DATA1 UNDROP DISKS;

 

C. ALTER DISKGROUP DATA1 DROP DISK DATA1_0001;

CREATE DISKGROUP DATA2 NORMAL

REDUNDANCY FAILGROUP DATA1A DISK '/dev/raw/raw3' FAILGROUP DATA1B DISK '/dev/raw/raw4';

ALTER DISKGROUP DATA1 UNDROP DATA1_0001;

 

D. ALTER DISKGROUP DATA1 DROP DISK DATA1_0001  ADD DISK GROUP DATA2 NORMAL

REDUNDANCY FAILGROUP DATA1A DISK '/dev/raw/raw3' FAILGROUP DATA1B DISK '/dev/raw/raw4';

ALTER DISKGROUP DATA1 UNDROP DISKS;

 

 

Answer: A

答案解析:

B错误,create a new disk group +DATA2 using two of the remaining four raw devices。只能NORMAL REDUNDANCY。

C错误, cancel the drop operation from +DATA1,命令错误。应该是ALTER DISKGROUP DATA1 UNDROP DISKS;

D错误,命令错误,create a new disk group +DATA2,不能使用ADD

 

538.Which type of database file is spread across all disks in a disk group?

A. All types of files are spread across all disks in the disk group.

B. Datafiles

C. Redo log files

D. Archived redo log files

E. Control files

 

 

Answer: A

 答案解析:

从以下可知,BCDE文件都会存储在disk上

sys@RCAT1028> select name from v$datafile;

 

NAME

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

+DATA/rcat1028/datafile/system.262.830015445

+DATA/rcat1028/datafile/sysaux.261.830015451

+DATA/rcat1028/datafile/undotbs1.265.830015451

+DATA/rcat1028/datafile/users.259.830015453

+DATA/rcat01.dbf

 

sys@RCAT1028> select * from v$log;

 

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIME         NEXT_CHANGE# NEXT_TIME

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

         1          1         19   52428800        512          2 YES INACTIVE               1525062 08-NOV-13               1540138 09-NOV-13

         2          1         20   52428800        512          2 YES INACTIVE               1540138 09-NOV-13               1571988 09-NOV-13

         3          1         21   52428800        512          2 NO  CURRENT                1571988 09-NOV-13            2.8147E+14

 

sys@RCAT1028> select * from v$logfile;

 

    GROUP# STATUS  TYPE    MEMBER                                             IS_

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

         3         ONLINE  +DATA/rcat1028/onlinelog/group_3.257.830015661     NO

         3         ONLINE  +RECOVERY/rcat1028/onlinelog/group_3.259.830015665 YES

         2         ONLINE  +DATA/rcat1028/onlinelog/group_2.263.830015655     NO

         2         ONLINE  +RECOVERY/rcat1028/onlinelog/group_2.258.830015657 YES

         1         ONLINE  +DATA/rcat1028/onlinelog/group_1.258.830015647     NO

         1         ONLINE  +RECOVERY/rcat1028/onlinelog/group_1.257.830015651 YES

 

6 rows selected.

 

sys@RCAT1028> select name from v$archived_log;

 

NAME

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

+RECOVERY/rcat1028/archivelog/2013_10_28/thread_1_seq_5.264.830030433

+RECOVERY/rcat1028/archivelog/2013_10_29/thread_1_seq_6.265.830106043

+RECOVERY/rcat1028/archivelog/2013_10_29/thread_1_seq_7.266.830125503

+RECOVERY/rcat1028/archivelog/2013_10_30/thread_1_seq_8.267.830214029

 

539.How can you reverse the effects of an ALTER DISKGROUP ... DROP DISK command if it has already completed?

A. Issue the ALTER DISKGROUP ... ADD DISK command.

B. Issue the ALTER DISKGROUP ... UNDROP DISKS command.

P ... DROP DISK CANCEL command.

C. Issue the ALTER DISKGROU

D. Retrieve the disk from the Recycle Bin after the operation completes.

 

 

Answer: A

答案解析:

 ALTER DISKGROUP ... DROP DISK的反操作就是添加磁盘ALTER DISKGROUP ... ADD DISK 

 

540.Which of the following ALTER DISKGROUP commands does not use V$ASM_OPERATION to record the status of the operation?

A. ADD DIRECTORY

B. DROP DISK

C. RESIZE DISK

D. REBALANCE

E. ADD FAILGROUP

 

 

Answer: A

答案解析:

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

 

V$ASM_OPERATION

In an Oracle Automatic Storage Management (Oracle ASM) instance, V$ASM_OPERATION displays one row for every active Oracle ASM long running operation executing in the Oracle ASM instance.

Column

Datatype

Description

GROUP_NUMBER

NUMBER

Disk group number (primary key). This is the foreign key to the V$ASM_DISKGROUP view.

OPERATION

CHAR(5)

Type of the operation:

REBAL - Rebalance pending for this group. The disk group needs rebalance to complete.

ONLIN - Online disks operation in progress for the disk group

STATE

VARCHAR2(4)

State of the operation:

WAIT - No operations running for the group

RUN - Operation running for the group

REAP - Operation is being run down

HALT - Operation halted by admin

ERRS - Operation halted by errors

POWER

NUMBER

Power requested for the operation as specified by the ASM_POWER_LIMIT initialization parameter or command syntax

ACTUAL

NUMBER

Power allocated to the operation

SOFAR

NUMBER

Number of Allocation Units that have been moved so far by the operation

EST_WORK

NUMBER

Estimated number of Allocation Units that have to be moved by the operation

EST_RATE

NUMBER

Estimated number of Allocation Units that are being moved per minute by the operation

EST_MINUTES

NUMBER

Estimated amount of time (in minutes) that the remainder of the operation is expected to take

ERROR_CODE

VARCHAR2(44)

Oracle external error code; NULL if no error

V$ASM_OPERATION是记录当前磁盘的操作信息。

B,C,D,E都会涉及到磁盘的操作,只有A是涉及目录的操作,所以选A

 

541.If you use ALTER DISKGROUP ... ADD DISK and specify a wildcard for the discovery string, what happens to disks that are already a part of the same or another disk group?

A. The command fails unless you specify the FORCE option.

B. The command fails unless you specify the REUSE option.

C. The command must be reissued with a more specific discovery string.

D. The other disks, already part of the disk group, are ignored.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10222

从以下两句话中,是否应该选A答案呢。

The following statement would fail because the search string matches disks that are contained in other disk groups. Specifically, /devices/diska4 belongs to disk group data1 and /devices/diskb4 belongs to disk group data2.

ALTER DISKGROUP data1 ADD DISK

     '/devices/disk*4';

 

If /devices/diskc3 was previously a member of a disk group that no longer exists, then you could use the FORCE option to add the disk as a member of another disk group. For example, the following use of the FORCE clause enables /devices/diskc3 to be added to data2, even though it is a current member of data3. For this statement to succeed, data3 cannot be mounted.

ALTER DISKGROUP data2 ADD DISK

     '/devices/diskc3' FORCE;

 

542.You are an Oracle DBA responsible for an ASM instance. The disk controller on your system fails. You suspect that the disk itself is okay. You know it will take 24 hours to replace the controller and you don't want to have to rebuild the disks from scratch. What do you do?

A. Take the whole disk group offline and wait for the controller card to be installed. Once it's installed, bring the disk group online again.

B. Change the ASM parameter ASM_PREFERRED_READ_FAILURE_GROUPS to indicate that you

want to read from the non-failed disk. Once the disk controller is replaced, reset the parameter to its original value.

C. You have no choice but to rebuild the disk. Drop the disk from the disk group and wait for the controller to be replaced. Once the controller is replaced, add the disk back into the disk group and allow ASM to rebuild it.

D. If you are using any setting other than REDUNDANCY EXTERNAL for your disk group, you will have to recover any data on that disk from a backup. The database will be unavailable until you can correct the problem and perform recovery.

E. Change the attribute DISK_REPAIR_TIME on the disk group to a time greater than 24 hours.

 

 

Answer: E

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10803/config_storage.htm#HABPT4818

 

你是一个Oracle DBA负责ASM实例。在您的系统上的磁盘控制器的失效。您怀疑磁盘本身是好的。你知道这将需要24小时来更换控制器和你不想从头开始重建磁盘。怎么办?

 

 

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.

 

 

543.As the DBA, you run the following query on your ASM instance.What is the implication of the results of the query? (Choose two.)

SQL> select group_number, name, state from v$ASM_DISKGROUP;

GROUP_NUMBER NAME STATE

0 DGROUP1 DISMOUNTED

2 DGROUP2 MOUNTED

3 DGROUP3 MOUNTED

A. The DGROUP1 disk group was unmounted by another DBA.

B. A datafile has been lost, causing the ASM disk group DGROUP1 to go into the DISMOUNTED state

C. One of the redundant disks (DGROUP1) has been lost in a disk group.

D. This query has no meaning in an ASM instance.

E. A disk associated with a disk group was discovered after the ASM instance initially opened.

 

 

Answer: AE

答案解析:

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

 

sys@TEST0924>  select group_number, name, state from v$ASM_DISKGROUP;

 

GROUP_NUMBER NAME                           STATE

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

           1 DATA                           MOUNTED

           2 RECOVERY                       MOUNTED

 

V$ASM_DISKGROUP displays one row for every ASM disk group discovered by the ASM instance on the node.

 

V$ASM_DISKGROUP

Describes a disk group (number, name, size related info, state, and redundancy type).

This view performs disk discovery every time it is queried.

 

544.Your database is in NOARCHIVELOG mode. You start to do a backup, but your users complain that they dont want you to shut down the database to perform the backup. What options are available to you?

A. Put the database in hot backup mode and perform an online backup, including backing up the archived redo logs.

B. Just back up the database datafiles without shutting down the database.

C. You will have to wait until you can shut down the database to perform the backup.

D. Mark each datafile as backup in progress, back them up individually, and then mark them as backup not in progress. No archived redo logs will need to be backed up.

E. Only back up the datafiles that the user will not be touching. Once the user has finished what they were doing, you can shut down the database and back up the datafiles the user changed during the course of the remaining backup

 

 

Answer: C

答案解析:

非归档模式只能冷备份。

或者启动到mount状态,使用rman来备份。

冷备份发生在数据库已经正常关闭的情况下,当正常关闭时会提供给我们一个完整的数据库。 冷备份是将关键性文件拷贝到另外位置的一种做法。对于备份Oracle信息而言,冷备份是最快和最安全的方法。值得注意的是冷备份必须是数据库关闭的情况下完成,当数据库开着的时候,执行数据库文件系统备份无效。

 

用冷备份进行数据库恢复:如果数据库是运行在非归档日志模式下,将备份文件拷贝回原来的目录即可。非归档日志模式下数据库只能恢复到备份时刻的状态。

 

545.When performing an online backup, what is the proper order of the following steps?

A. Issue the alter database end backup command.

B. Back up the archived redo logs.

C. Issue the alter database begin backup command.

D. Back up the database files.

E. Determine the beginning log sequence number.

F. Determine the ending log sequence number.

G. Force a log switch with the alter system switch logfile command.

H. a, b, c, d, e, f, g

I. c, d, a, b, e, g, f

J. f, d, b, g, a, c, e

K. e, c, d, a, g, f, b

L. a, f, b, g, e, c, d

Answer: D

 

 

答案解析:

可参考550题:http://blog.csdn.net/rlhua/article/details/14983295

 

记下开始的日志序列号

然后开始备份数据库

 

sys@TEST1107> alter database begin backup;

 

Database altered.

开始讲数据库置为备份状态

OS级拷贝文件

结束数据库的备份状态

sys@TEST1107> alter database end backup;

 

Database altered.

 

切换日志,使日志归档

sys@TEST1107> alter system switch logfile;

 

System altered.

记下结束的日志序列号

在OS级别拷贝归档日志文件

 

546.You want to put a specific tablespace called MY_DATA in hot backup mode so you can back it up.

What command would you use?

A. alter tablespace MY_DATA begin backup;

B. alter tablespace MY_DATA start backup;

C. alter tablespace MY_DATA backup begin;

D. alter MY_DATA begin backup;

E. You cannot back up individual tablespaces.

Answer: A

答案解析:

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

启动备份模式:复制数据文件之前,必须将每个数据文件都置于备份模式。请使用ALTER TABLESPACE和ALTER DATABASE命令的BEGIN BACKUP子句来执行此操作。

Making User-Managed Backups of Online Read/Write Tablespaces

You must put a read/write tablespace in backup mode to make user-managed data file backups when the tablespace is online and the database is open.

The ALTER TABLESPACE ... BEGIN BACKUP statement places a tablespace in backup mode.

 In backup mode, the database copies whole changed data blocks into the redo stream. After you take the tablespace out of backup mode with the ALTER TABLESPACE ... END BACKUP or ALTER DATABASE END BACKUP statement, the database advances the data file checkpoint SCN to the current database checkpoint SCN.

When restoring a data file backed up in this way, the database asks for the appropriate set of redo log files to apply if recovery is needed. The redo logs contain all changes required to recover the data files and make them consistent.

To back up online read/write tablespaces in an open database:

Before beginning a backup of a tablespace, use the DBA_DATA_FILES data dictionary view to identify all of the data files in the tablespace. For example, assume that you want to back up the users tablespace. Enter the following:

SELECT TABLESPACE_NAME, FILE_NAME

FROM   SYS.DBA_DATA_FILES

WHERE  TABLESPACE_NAME = 'USERS';

 

TABLESPACE_NAME                   FILE_NAME

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

USERS                             /oracle/oradata/trgt/users01.dbf

USERS                             /oracle/oradata/trgt/users02.dbf

Mark the beginning of the online tablespace backup. For example, the following statement marks the start of an online backup for the tablespace users:

SQL> ALTER TABLESPACE users BEGIN BACKUP;

Caution:

If you do not use BEGIN BACKUP to mark the beginning of an online tablespace backup and wait for this statement to complete before starting your copies of online tablespaces, then the data file copies produced are not usable for subsequent recovery operations. Attempting to recover such a backup is risky and can return errors that result in inconsistent data. For example, the attempted recovery operation can issue a fuzzy file warning, and can lead to an inconsistent database that you cannot open.

Back up the online data files of the online tablespace with operating system commands. For example, Linux and UNIX users might enter:

% cp /oracle/oradata/trgt/users01.dbf /d2/users01_'date "+%m_%d_%y"'.dbf

% cp /oracle/oradata/trgt/users02.dbf /d2/users02_'date "+%m_%d_%y"'.dbf

After backing up the data files of the online tablespace, run the SQL statement ALTER TABLESPACE with the END BACKUP option. For example, the following statement ends the online backup of the tablespace users:

SQL> ALTER TABLESPACE users END BACKUP;

Archive the unarchived redo logs so that the redo required to recover the tablespace backup is archived. For example, enter:

SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;

Caution:

If you fail to take the tablespace out of backup mode, then Oracle Database continues to write copies of data blocks in this tablespace to the online redo logs, causing performance problems. Also, you receive an ORA-01149 error if you try to shut down the database with the tablespaces still in backup mode.

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV488

 

547.You backed up the database at 8 a.m. today using an online backup. Accounting made a large

change to the underlying data between 10 a.m. and noon. Which of the following actions would ensure that the changes could be recovered using the 8 a.m. backup?

A. Create a manual incremental online database backup.

B. Back up all the archived redo logs generated since the 8 a.m. backup.

C. Create a brand-new backup after all the changes have been applied.

D. There is no way to make the changes recoverable based on the 8 a.m. backup.

E. Perform an online backup of the tablespace(s) that contained changed data.

 

 

Answer: B

答案解析:

在8点进行一次备份,在10点有很多业务,如果要恢复,且要包含这些变化,则需要8点的备份以及8点到中午的归档日志和在线日志。

 

548.What are the different logging modes available in Oracle Database 11g? (Choose two.)

A. NOLOG mode

B. NOARCHIVELOG mode

C. LOGGING mode

D. HOTDATABASE mode

E. ARCHIVELOG mode

 

 

Answer: BE

 

答案解析:log_mode分两种,归档和非归档

 

549.Which is the correct command to put the database in ARCHIVELOG mode?

A. alter database archivelog

B. alter system enable archivelog mode

C. alter database enable archive

D. alter database archivelog enable

E. None of the above

 

 

Answer: A 

 

答案解析: 

 

550.What is the correct order of steps to perform an online database backup?

A. alter database begin backup;

B. alter database end backup;

C. Back up the database datafiles.

D. Back up the archive log files.

E. alter system switch logfile;

F. a, b, c, d, e

G. e, d, a, b, c

H. a, c, b, d, e

I. d, b, c, a, e

J. a, c, b, e, d

 

 

Answer: E

答案解析:

 

sys@TEST1107> alter database begin backup;

Database altered.

开始讲数据库置为备份状态

OS级拷贝文件

结束数据库的备份状态

sys@TEST1107> alter database end backup;

Database altered.

切换日志,使日志归档

在OS级别拷贝归档日志文件

sys@TEST1107> alter system switch logfile;

System altered.

 

551.Which command will result in a trace file being created with the create controlfile command contained in it?

A. alter database backup controlfile;

B. alter database backup controlfile to trace;

C. alter database controlfile backup;

D. alter database controlfile backup to '/ora01/oracle/ctrl_backup.ctl';

E. alter database begin controlfile backup;

 

 

Answer: B

 

552.Which of the following is a valid way of putting a tablespace named DAVE_TBS into hot backup mode?

A. alter tablespace DAVE_TBS backup mode;

B. alter tablespace DAVE_TBS start backup;

C. alter tablespace DAVE_TBS begin backup;

D. alter tablespace DAVE_TBS backup begin;

E. alter tablespace DAVE_TBS backup;

 

 

Answer: C

 

553.Every Sunday the Unix system administrator has a job that executes a full backup of the entire Unix system your database is on. Is this backup usable for backup and recovery of your database?
A. Yes, if the database is in ARCHIVELOG mode.
B. Yes, if the database is in NOARCHIVELOG mode.
C. No, the backup is not usable in any way.
D. Only if the ENABLE_ONLINE_BACKUP parameter is set to TRUE.

 

Answer: C

 

554.Which is not a valid way of backing up a control file?
A. Backing up the control file to trace
B. Copying the existing control file of the database to the backup location during a hot backup
C. Copying the existing control file of the database to the backup location during a cold backup
D. Creating a backup control file
E. Using the create controlfile command

 

Answer: B
题目解答

 

555.Which of the following parameters defines the location where Oracle should create archived redo logs?

A. LOG_ARCHIVE_1

B. LOG_DESTINATION_1

C. LOG_ARCHIVED_DESTINATION_1

D. LOG_ARCHIVE_DEST_1

E. LOG_ARCHIVE_SOURCE_1

 

 

Answer: D

 

556.Archived redo logs can be copied to more than one destination by Oracle.

A. True

B. False

 

 

Answer: A

答案解析:

LOG_ARCHIVE_DEST_n    参数定义多个归档路径,使用初始化参数LOG_ARCHIVE_DEST_n配置归档位置时,可以在归档位置上指定OPTIONAL或MANDATORY选项.指定MANDATORY选项时,可以设置REOPEN属性。

OPTIONAL:该选项是默认选项.使用该选项时,无论归档是否成功,都可以覆盖重做日志。

MANDATORY:强制归档.使用该选项时,只有在归档成功之后,重做日志才能被覆盖。

REOPEN:该属性用于指定重新归档的时间间隔,默认值为300秒,必须跟在MANDATORY后。

LOG_ARCHIVE_MIN_SUCCEED_DEST   参数控制本地归档的最小成功个数

 

557.What will be the result of the following configuration?

Log_archive_dest_1=location=c:\oracle\arch\mydb

Log_archive_dest_2=location=z:\oracle\arch\mydb

A. An error will occur during database startup because the second parameter is not valid.

B. An error will occur during database startup since you are trying to create archived redo logs in two different locations.

C. Archived redo logs will be created in two different locations by the ARCH process.

D. Archived redo logs will be created in two different locations by the LGWR process.

E. Neither parameter setting is valid, so the database will not start up.

 

 

Answer: C

答案解析:

因为设置有两个路径,

LOG_ARCHIVE_DEST_n    ---使用LOG_ARCHIVE_DEST_n参数定义多个归档路径

LOG_ARCHIVE_DEST_n    参数定义多个归档路径,使用初始化参数LOG_ARCHIVE_DEST_n配置归档位置时,可以在归档位置上指定OPTIONAL或MANDATORY选项.指定MANDATORY选项时,可以设置REOPEN属性。

OPTIONAL:该选项是默认选项.使用该选项时,无论归档是否成功,都可以覆盖重做日志。

MANDATORY:强制归档.使用该选项时,只有在归档成功之后,重做日志才能被覆盖。

REOPEN:该属性用于指定重新归档的时间间隔,默认值为300秒,必须跟在MANDATORY后。

LOG_ARCHIVE_MIN_SUCCEED_DEST   参数控制本地归档的最小成功个数

设定有两个路径,就会在各个路径上产生两份归档。 

 

 

558.Which view provides information on the backup status of the datafiles in the database?

A. V$BACKUP

B. V$BACKUP_STATUS

C. V$BACKUP_DATAFILE

D. V$DATAFILE_BACKUP

E. V$TABLESPCE_BACKUP

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/dynviews_1044.htm#REFRN30017

 

V$BACKUP

V$BACKUP displays the backup status of all online datafiles.

Column

Datatype

Description

FILE#

NUMBER

File identifier

STATUS

VARCHAR2(18)

File status: NOT ACTIVEACTIVE (backup in progress), OFFLINE NORMAL, or description of an error.

NOT ACTIVE indicates that the file is not currently in backup mode (that is, an ALTER TABLESPACE ... BEGIN BACKUP or ALTER DATABASE BEGIN BACKUP statement has not been issued), whereas ACTIVE indicates that the file is currently in backup mode.

CHANGE#

NUMBER

System change number when backup started

 

559.Another DBA issues a shutdown abort command on a database on which you were running an online backup. What will happen when you try to restart the database?

A. Oracle will automatically take the datafile out of hot backup mode, generate a warning message, and then open the database.

B. Oracle will automatically take the datafile out of hot backup mode and then open the database.

C. Oracle will generate an error when trying to open the database, indicating that a datafile is in hot backup mode.You will need to correct this error before you can open the database.

D. The database will open with the file in hot backup mode. You can restart the backup at any time.

E. The datafile in hot backup mode will be corrupted and you will have to recover it.

 

 

Answer: C

在users表空间备份模式下,数据库被shutdown abort,然后不能open数据库,报错。只能在mount状态下,先把users表空间的备份模式结束,然后再打开数据库。

 

560.What is the proper command to shut down the database in a consistent manner?

A. Shutdown abort

B. Shutdown kill

C. Shutdown nowait

D. shutdown immediate

E. shutdown halt

 

 

Answer: D

答案解析:

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

 

 SHUTDOWN IMMEDIATE

 采用IMMEDIATE关闭模式会出现以下情况:

• Oracle DB 正在处理的当前SQL 语句不会完成。

• Oracle 服务器不会等待当前连接到数据库的用户断开连接。

• Oracle 服务器会回退活动的事务处理,而且会断开所有连接用户。

• Oracle 服务器在关闭并断开数据库后关闭实例。

• 下一次启动不需要进行实例恢复。

shutdown immedaite是最常用的关闭数据方式,在关闭时,生成完全检查点,所以它是一致性的关闭。

注:IMMEDIATE是使用Enterprise Manager 时的默认关闭模式。

 

561.If you issue the command shutdown abort prior to trying to put the database in ARCHIVELOG mode,what will be the result when you issue the command alter database archivelog?
A. The alter database archivelog command will fail.
B. The alter database archivelog inconsistent command must be used to put the database in
ARCHIVELOG mode.
C. The alter database archivelog command will succeed.
D. The alter database archivelog command will ask if you want to make the database consistent first.
E. There is no alter database archivelog command. The correct command is alter database alterlogging.

 

Answer: A

答案解析:将数据库更改为归档模式必须进行一次干净的关闭。

 

562.Your archive-log destination directory runs out of space. What is the impact of this on the database?
A. None. The database will switch over to the stand-by archive-log destination directory.
B. A warning message will be written to the alert log of the database, but no adverse impacts to the database will be experienced.
C. The database will shut down, and will not restart until you correct the out-of-space situation.
D. The database will continue to try to write to the archive-log destination directory for one hour. After one hour, the database will shut down normally.
E. Once Oracle has cycled through all online redo logs, it will stop processing any DML or DDL until the out-of-space condition is corrected.

 

Answer: E

 

563.How many individual archive-log destination directories are supported by Oracle Database11 g?
A. 7
B. 1
C. 10
D. 11
E. 21

 

Answer: C

 

564.Your database has experienced a loss of datafile users_01.dbf, which is associated with a ablespace called USERS. The database is still running. Which answer properly describes the order of the steps that you would use to recover from this error?

1. Shut down the database.

2. Take the users_01.dbf datafile offline with the alter database command.

3. Restore the users_01.dbf datafile from backup media with the required archived redo logs.

4. Restore all users tablespace-related datafiles from backup media.

5. Issue the recover tablespace users command.

6. Issue the recover datafile users_01.dbf command.

7. Start up the database.

8. Bring the users_01.dbf datafile online with the alter database command.

A.1, 3, 6, 7

B.2, 3, 6, 8

C.1, 2,3,6,7

D.1, 2, 3, 6, 7, 8

E.2, 3,6,5,7

 

 

Answer: B

答案解析:

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

从题中得知,丢失了users01.dbf这个数据文件。因为users01.dbf不是关键数据文件,故可以offline来还原恢复。

恢复步骤为,先offline,在还原恢复,再online即可。

RMAN> repair failure;

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test0924/test0924/hm/reco_172511374.hm

 

contents of repair script:

   # restore and recover datafile

   sql 'alter database datafile 4 offline';

   restore datafile 4;

   recover datafile 4;

   sql 'alter database datafile 4 online';

 

565.As soon as you discover that you have lost an online redo log, if the database is still functioning, what should be your first action?

A. Shut down the database

B. Clear the online redo log

C. Back up the database

D. Checkpoint the database

E. Call Oracle support

 

 

Answer: D

答案解析:

如果在线日志丢失,第一就是切换日志,不让继续写在丢失的日志上。

 

566.You have lost all your SYSTEM tablespace datafiles (system_01.dbf and system_02.dbf) and the database has crashed. What would be the appropriate order of operations to correct the situation?

A. Mount the database with the startup mount command.

B. Take the SYSTEM datafile offline with the alter database command.

C. Restore the SYSTEM_01.dbf datafile from backup media with the required archived redo logs.

D. Restore all SYSTEM tablespace-related datafiles from backup media.

E. Issue the recover tablespace SYSTEM command.

F. Issue the recover datafile SYSTEM_01.dbf command.

G. Open the database with the alter database open command.

H. Open the database with the alter database open resetlogs command.

I. a, c, f, g

J. b, d, e, h

K. a, b, c, f, g

L. d, a, e, g

M. b, c, f, e, g

 

 

Answer: D

答案解析:

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

如果某个数据文件丢失或损坏,且该文件属于SYSTEM或UNDO表空间,请执行以下任务:

1. 实例可能会也可能不会自动关闭。如果未自动关闭,请使用SHUTDOWN ABORT关闭实例。

2. 装载数据库。

3. 还原并恢复缺失的数据文件。

4. 打开数据库。

只需要mount数据库,然后还原和恢复,最后打开数据库即可。

题中应该先A,再D,

 

567.You have discovered that one of three control files has been lost.What steps would you follow to recover that control file?
A. Shut down the database.
B. Restore a control-file copy from backup media.
C. Use the create control file command to create a new control file.
D. Copy the backup control file into place.
E. Create a new copy of the control file from one of the surviving control files.
F. Recover the database using the recover database using backup control file command.
G. Start up the database.
H. a, b, f, g
I. c, f, g
J. a, d, f, g
K. a, f, g L.
a, e, g

 

Answer: E

568.Which files will you need to perform a full recovery of a database backed up in NOARCHIVELOG mode? (Choose all that apply.)

A. Database datafiles

B. Control files

C. Archived redo logs

D. Online redo logs

E. Flashback logs

 

Answer: ABD

答案解析:

排除法,C和E是在归档模式下才能使用的,而ABD既可以在归档模式下也可以在非归档模式下使用。

 

569.Which are the correct steps, in order, to deal with the loss of an online redo log if the database has not yet crashed?

A. Issue a checkpoint.

B. Shut down the database.

C. Issue an alter database open command to open the database.

D. Startup mount the database.

E. Issue an alter database clear logfile command.

F. Recover all database datafiles.

G. a, b, c, d

H. b, d, e, c

I. a, b, d, e, c

J. b, f, d, f, c

K. b, d, a, c

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90049

Recovering After Losing All Members of an Online Redo Log Group

If a media failure damages all members of an online redo log group, then different scenarios can occur depending on the type of online redo log group affected by the failure and the archiving mode of the database.

If the damaged online redo log group is current and active, then it is needed for crash recovery; otherwise, it is not. Table 30-4 outlines the various recovery scenarios.

Table 30-4 Recovering After the Loss of an Online Redo Log Group

If the Group Is...

Then...

And You Should...

Inactive

It is not needed for crash recovery

Clear the archived or unarchived group.

Active

It is needed for crash recovery

Attempt to issue a checkpoint and clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

Current

It is the redo log that the database is currently writing to

Attempt to clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

 

570.What methods of point-in-time recovery are available? (Choose all that apply.)

A. Change-based

B. Cancel-based

C. Time-based

D. Sequence number-based

E. Transaction number-based

 

 

Answer: ABCD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsubcl019.htm#RCMRF90483

 

untilClause

Specifies a past time, SCN, or log sequence number for termination of the RECOVER command.

When used with one or more tablespaces, the clause indicates a tablespace point-in-time recovery (TSPITR) operation for the named tablespaces. The clause cannot be used with RECOVER DATAFILE. It should not be used for RECOVER DATABASE (see "Usage Notes" for details). After database point-in-time recovery (DBPITR), you must open the database with the RESETLOGS option.

See Also: untilClause

 

UNTIL SCN integer

Specifies an SCN as an upper, noninclusive limit.

RMAN selects only files that it can use to restore or recover up to but not including the specified SCN (seeExample 4-38). For example, RESTORE DATABASE UNTIL SCN 1000 chooses only backups that could be used to recover to SCN 1000.

UNTIL SEQUENCE integer

Specifies a redo log sequence number and thread as an upper, noninclusive limit.

RMAN selects only files that it can use to restore or recover up to but not including the specified sequence number. For example, REPORT OBSOLETE UNTIL SEQUENCE 8000 reports only backups that could be used to recover through log sequence 7999.

   THREAD integer

Specifies the number of the redo thread.

UNTIL TIME 'date_string'

Specifies a time as an upper, noninclusive limit (see Example 4-39).

RMAN selects only files that it can use to restore and recover up to but not including the specified time. For example, LIST BACKUP UNTIL TIME 'SYSDATE-7' lists all backups that could be used to recover to a point one week ago.

When specifying dates in RMAN commands, the date string must be either:

A literal string whose format matches the NLS_DATE_FORMAT setting.

A SQL expression of type DATE, for example, 'SYSDATE-10' or "TO_DATE('01/30/2007', 'MM/DD/YYYY')". The second example includes its own date format mask and so is independent of the currentNLS_DATE_FORMAT setting.

Following are examples of typical date settings in RMAN commands:

BACKUP ARCHIVELOG FROM TIME 'SYSDATE-31' UNTIL TIME 'SYSDATE-14';

RESTORE DATABASE UNTIL TIME "TO_DATE('09/20/06','MM/DD/YY')";

Note: The granularity of time-based recovery is dependent on time stamps in the redo log. For example, suppose that you specify the following command:

RECOVER DATABASE UNTIL TIME '2007-07-26 17:45:00';

If no redo was written with a time stamp of 17:45:00, then recovery proceeds until it finds the next redo time stamp that is higher. For example, the next redo time stamp may be 17:45:04. You can check for the nearest time for a specific SCN by querying the FIRST_TIME and FIRST_CHANGE# columns in V$LOG_HISTORY TABLE.

 

Begin cancel-based recovery by issuing the following command in SQL*Plus:

RECOVER DATABASE UNTIL CANCEL

Issue the RECOVER DATABASE UNTIL statement to begin recovery. If recovering to an SCN, then specify as a decimal number without quotation marks. For example, to recover through SCN 10034 issue:

RECOVER DATABASE UNTIL CHANGE 10034;

If recovering to a time, then the time is always specified using the following format, delimited by single quotation marks: 'YYYY-MM-DD:HH24:MI:SS'. The following statement recovers the database up to a specified time:

RECOVER DATABASE UNTIL TIME '2000-12-31:12:47:30'

 

571 .Which files are required for a full recovery of the database in ARCHIVELOG mode? (Choose three.)
A. Database datafiles
B. Online redo logs
C. Archived redo logs
D. Backup control file
E. Control file from a backup

 

Answer: ACD

 

572.What is the proper procedure to recover a lost tempfile?

A. Restore the backup copy of the tempfile from the backup media.

B. Re-create the tempfile with the create tempfile command.

C. Copy an existing tempfile from another database.

D. Re-create the tempfile with the create tablespace command.

E. Re-create the tempfile with the alter tablespace command.

 

 

Answer: E

临时数据文件丢失,并不会影响到数据库的正常运行。

可以使用alter  tablespace temp add tempfile '/u01/app/oracle/oradata/test0924/temp01.dbf' size 10m

这样的语句来重新创建临时数据文件。

在我的11.2.0.3环境里,我删除/u01/app/oracle/oradata/test0924/temp01.dbf,之后重新启动数据库,数据库又自动恢复了temp01.d

 

573.Upon starting your database, you receive the following error:

SQL> startup ORACLE instance started.

Total System Global Area 171581440 bytes Fixed Size 1298640 bytes Variable Size

146804528 bytes Database Buffers 20971520 bytes Redo Buffers 2506752 bytes Database mounted.

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/oracle01/oradata/orcl/redo01.log'

ORA-00312: online log 1 thread 1:'/oracle01/oradata/orcl/redo01a.log'

You can choose from the following steps:

Which is the correct order of these steps in this case?

A. Restore the database datafiles.

B. Issue the alter database clear unarchived logfile group 1 command.

C. Issue the alter database open command.

D. Issue the alter database open resetlogs command.

E. Recover the database using point-in-time recovery.

F. Issue the Startup Mount command to mount the database.

G. Back up the database.

H. a, f, e, d, g

I. f, e, d

J. f, b, c, g

K. a, f, c

L. The database cannot be recovered.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90053

 

Losing an Inactive Online Redo Log Group

If all members of an online redo log group with INACTIVE status are damaged, then the procedure depends on whether you can fix the media problem that damaged the inactive redo log group. If the failure is temporary, then fix the problem. The log writer can reuse the redo log group when required. If the failure is permanent, then the damaged inactive online redo log group eventually halts normal database operation. Reinitialize the damaged group manually by issuing the ALTER DATABASE CLEAR LOGFILE statement as described in this section.

Clearing Inactive, Archived Redo

You can clear an inactive redo log group when the database is open or closed. The procedure depends on whether the damaged group has been archived.

To clear an inactive, online redo log group that has been archived:

If the database is shut down, then start a new instance and mount the database:

STARTUP MOUNT

Reinitialize the damaged log group. For example, to clear redo log group 2, issue the following statement:

ALTER DATABASE CLEAR LOGFILE GROUP 2;

Clearing Inactive, Unarchived Redo

Clearing a not-yet-archived redo log allows it to be reused without archiving it. This action makes backups unusable if they were started before the last change in the log, unless the file was taken offline before the first change in the log. Hence, if you need the cleared log file for recovery of a backup, then you cannot recover that backup. Clearing a not-yet-archived-redo-log, prevents complete recovery from backups due to the missing log.

To clear an inactive, online redo log group that has not been archived:

If the database is shut down, then start a new instance and mount the database:

SQL> STARTUP MOUNT

Clear the log using the UNARCHIVED keyword.

For example, to clear log group 2, issue the following SQL statement:

SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 2;

If there is an offline data file that requires the cleared log to bring it online, then the keywords UNRECOVERABLE DATAFILE are required. The data file must be dropped because the redo logs necessary to bring the data file online are being cleared, and there is no copy of it. For example, enter:

SQL> ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 2 UNRECOVERABLE DATAFILE;

Immediately back up all data files in the database with an operating system utility, so that you have a backup you can use for complete recovery without relying on the cleared log group. For example, enter:

% cp /disk1/oracle/dbs/*.dbf /disk2/backup

Back up the database's control file with the ALTER DATABASE statement. For example, enter:

SQL> ALTER DATABASE BACKUP CONTROLFILE TO '/oracle/dbs/cf_backup.f';

Failure of CLEAR LOGFILE Operation

The ALTER DATABASE CLEAR LOGFILE statement can fail with an I/O error due to media failure when it is not possible to:

Relocate the redo log file onto alternative media by re-creating it under the currently configured redo log file name

Reuse the currently configured log file name to re-create the redo log file because the name itself is invalid or unusable (for example, due to media failure)

In these cases, the ALTER DATABASE CLEAR LOGFILE statement (before receiving the I/O error) would have successfully informed the control file that the log was being cleared and did not require archiving. The I/O error occurred at the step in which the CLEAR LOGFILE statement attempted to create the new redo log file and write zeros to it. This fact is reflected in V$LOG.CLEARING_CURRENT.

 

 

574.A user sends you an email with the following error message: create table idtable(id number) *

ERROR at line 1: ORA- 01110: data file 4: ,,/oracle01/oradata/orcl/users01.dbf ORA-27041:

01116: error in opening database file 4 ORA-unable to open file Linux Error: 2: No such file or directory

Additional information: 3 You can choose from the following steps:

Which is the correct order of these steps in this case?

A. Restore the missing database datafiles.

B. Take the missing datafile offline.

C. Shut down the database.

D. Issue the recover tablespace USERS command.

E. Issue the Startup Mount command to mount the database.

F. Bring the USERS tablespace online.

G. Issue the alter database open command.

H. b, a, d, f

I. c, a, e, b, d, f, g

J. c, e, d, g

K. b, d, f

L. e, d, g

 

 

Answer: A

答案解析:

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

从错误得知,丢失了users01.dbf这个数据文件。因为users01.dbf不是关键数据文件,故可以offline来还原恢复。

恢复步骤为,先offline,在还原恢复,再online即可。

RMAN> repair failure;

 

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/test0924/test0924/hm/reco_172511374.hm

 

contents of repair script:

   # restore and recover datafile

   sql 'alter database datafile4 offline';

   restore datafile 4;

   recover datafile 4;

   sql 'alter database datafile 4 online';

 

575.You have lost all your database control files. To recover them, you are going to use the results of the alter database backup controlfile to trace command. Your datafiles and your online redo logs are all intact.Which of the following is true regarding your recovery?

A. You will need to open the database with the resetlogs command.

B. All you need to do is execute the trace file from SQL*Plus and it will perform the recovery for you.

C. You will use the resetlogs version of the create controlfile command.

D. You will use the noresetlogs version of the create controlfile command.

E. You will use the trace file to create a backup control file, and then you will recover the database with the recover database using backup controlfile command

 

 

Answer: D

答案解析:

答案解析:http://docs.oracle.com/cd/E11882_01/server.112/e25494/omf.htm#ADMIN11509

 

CREATE CONTROLFILE Using NORESETLOGS Keyword: Example

The following CREATE CONTROLFILE statement is generated by an ALTER DATABASE BACKUP CONTROLFILE TO TRACE statement for a database with Oracle managed data files and redo log files:

CREATE CONTROLFILE

     DATABASE sample

     LOGFILE

       GROUP 1 ('/u01/oradata/SAMPLE/onlinelog/o1_mf_1_o220rtt9_.log',

                '/u02/oradata/SAMPLE/onlinelog/o1_mf_1_v2o0b2i3_.log')

                 SIZE 100M,

       GROUP 2 ('/u01/oradata/SAMPLE/onlinelog/o1_mf_2_p22056iw_.log',

                '/u02/oradata/SAMPLE/onlinelog/o1_mf_2_p02rcyg3_.log')

                 SIZE 100M

     NORESETLOGS

     DATAFILE '/u01/oradata/SAMPLE/datafile/o1_mf_system_xu34ybm2_.dbf'

              SIZE 100M,

              '/u01/oradata/SAMPLE/datafile/o1_mf_sysaux_aawbmz51_.dbf'

              SIZE 100M,

              '/u01/oradata/SAMPLE/datafile/o1_mf_sys_undo_apqbmz51_.dbf'

              SIZE 100M

     MAXLOGFILES 5

     MAXLOGHISTORY 100

     MAXDATAFILES 10

     MAXINSTANCES 2

     ARCHIVELOG;

 

 

576.Your developers have asked you to restore the development database, which is in NOARCHIVELOG mode, back to last Tuesday the 20th. Your last backup is from Monday the 19th.

What do you do?

A. Restore the 19ths backup, restore all archived redo logs, recover the database to the 20th, and open the database.

B. Tell them that their request cannot be met with the current backup strategy.

C. Restore the 19ths backup, apply the online redo logs, and open the database.

D. Switch the database into ARCHIVELOG mode, restore the 19th's backup, restore all archived redo logs, and recover the database to the 20th.

E. Use the recover database command to roll back the database from today to the 19th of the month.

 

 

Answer: B

答案解析:

因为数据库是非归档模式,所有不能恢复

 

577.What methods are available to recover lost control files? (Choose all that apply.)

A. Backup control file.

B. Emergency control file.

C. The create controlfile command.

D. The restore controlfile SQL*Plus command.

E. No backup is required. The database will re-create the control file when it is discovered to be lost.

 

 

Answer: CD

答案解析:

丢失一个控制文件就OS级别cp

全部丢失就restore或者重新创建。

 

578.Your ARCHIVELOG-mode database has lost three datafiles and shut down. One is assigned to the SYSTEM tablespace and two are assigned to the USERS tablespace. You can choose from the following steps to recover your database:Which is the correct order of these steps in this case?

A. Restore the three database datafiles that were lost.

B. Issue the Startup Mount command to mount the database.

C. Issue the alter database open command.

D. Issue the alter database open resetlogs command.

E. Recover the database using the recover database command.

F. Recover the datafiles with the recover datafile command.

G. Take the datafiles offline.

H. a, b, e, c

I. b, e, d

J. a, b, d, c

K. b, g, c, f

L. a, b, d, f

 

 

Answer: A 

答案解析:

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

如果某个数据文件丢失或损坏,且该文件属于SYSTEM或UNDO表空间,请执行以下任务:

1. 实例可能会也可能不会自动关闭。如果未自动关闭,请使用SHUTDOWN ABORT关闭实例。

2. 装载数据库。

3. 还原并恢复缺失的数据文件。

4. 打开数据库。

 

题中数据库已关闭,只需要mount数据库,然后还原和恢复,最后打开数据库即可。

题中应B后A

 

579.You have lost all your online redo logs. As a result, your database has crashed. You have tried to restart the database and clear the online redo log files, but when you try to open the database you get the following error.
SQL> startup ORACLE instance started.
Total System Global Area 167395328 bytes Fixed Size 129861 2 bytes Variable Size 14261 0252 bytes
Database Buffers 20971 520 bytes Redo Buffers 2514944 bytes Database
mounted.
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: ,,/oracle01/oradata/orcl/redo02a.log
ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory
Additional information: 3
ORA-00312: online log 2 thread 1: ,,/oracle01/oradata/orcl/redo02.log ORA-27037: unable to obtain file
status Linux Error: 2: No such file or directory Additional information: 3
SQL> alter database clear logfile group 2; alter database clear logfile group 2 * ERROR at line 1:
ORA-01 624: log 2 needed for crash recovery of instance orcl (thread 1) ORA-0031 2: online log 2 thread
1: ,,/oracle01 /oradata/orcl/redo02.log ORA-00312: online log 2 thread
1: ,,/oracle01 /oradata/orcl/redo02a.log
What steps must you take to resolve the error?
A. Issue the recover database redo logs command.
B. Issue the Startup Mount command to mount the database.
C. Restore the last full database backup.
D. Perform a point-in-time recovery, applying all archived redo logs that are available.
E. Restore all archived redo logs generated during and after the last full database backup.
F. Open the database using the alter database open resetlogs command.
G. Issue the alter database open command.
H. b, a, f
I. e, b, a, f J.
e, b, a, g K.
b, a, g
L. c, e, b, d, f

 

Answer: E

 

580.What does the SCN represent?

A. The system change number, which is a point in time relative to transactions within a given database.

B. A number that represents time. Thus, at 1300 hours, the SCN is the same on all databases.

C. The security change number, which represents the security code that is needed to access any

database structure.

D. A conversion factor that converts internal database time to external clock time.

E. UTC time in the database, providing a standardized way of tracking time in Oracle.

 

 

Answer: A

答案解析:

SCN

System Change Number. A database ordering primitive. The value of an SCN is the logical point in time at which changes are made to a database.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e40540/glossary.htm#CNCPT44569

system change number (SCN)

A stamp that defines a committed version of a database at a point in time. Oracle assigns every committed transaction a unique SCN.

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/glossary.htm#CBAHDHFI

Committing Using an SCN

Optionally, you can specify the SCN for the transaction when forcing a transaction to commit. This feature lets you commit an in-doubt transaction with the SCN assigned when it was committed at other nodes.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_txnman.htm#sthref3825

 

581.You have lost datafile 4 from your database. Which is typically the fastest way to restore your database?

A. Restore and recover the datafile.

B. Restore and recover the tablespace.

C. Restore and recover the database.

D. Restore and recover the control file.

E. Restore and recover the parameter file.

 

 

Answer: A

答案解析:

实验如下:

OS删除数据文件6--这里用数据文件6做测试

[oracle@rtest ~]$ rm -f /u01/app/oracle/oradata/test1107/test01.dbf

 

强制重新重启,或者关闭再重启,使报错。强制重启仅做测试用

sys@TEST1107> startup force;

ORACLE instance started.

 

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size             973078808 bytes

Database Buffers          268435456 bytes

Redo Buffers                8921088 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 6 - see DBWR trace file

ORA-01110: data file 6: '/u01/app/oracle/oradata/test1107/test01.dbf'

 

 

使用rman进行恢复

RMAN> run{

2> restore datafile 6;

3> recover datafile 6;

4> alter database open;

5> }

 

Starting restore at 09-NOV-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=189 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=221 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=33 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/test1107/test01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T141313_97tfycqs_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TEST1107/backupset/2013_11_08/o1_mf_nnndf_TAG20131108T141313_97tfycqs_.bkp tag=TAG20131108T141313

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

Finished restore at 09-NOV-13

 

Starting recover at 09-NOV-13

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

 

starting media recovery

 

archived log for thread 1 with sequence 37 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_37_97tjg872_.arc

archived log for thread 1 with sequence 38 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_38_97v4fyny_.arc

archived log for thread 1 with sequence 39 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_39_97v9k5xk_.arc

archived log for thread 1 with sequence 40 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_40_97vvng6b_.arc

archived log for thread 1 with sequence 41 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_41_97w5hrkx_.arc

archived log for thread 1 with sequence 42 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_42_97wmt8cd_.arc

archived log for thread 1 with sequence 43 is already on disk as file /u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_43_97x1vo0f_.arc

archived log file name=/u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_37_97tjg872_.arc thread=1 sequence=37

archived log file name=/u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_38_97v4fyny_.arc thread=1 sequence=38

archived log file name=/u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_08/o1_mf_1_39_97v9k5xk_.arc thread=1 sequence=39

archived log file name=/u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_40_97vvng6b_.arc thread=1 sequence=40

archived log file name=/u01/app/oracle/fast_recovery_area/TEST1107/archivelog/2013_11_09/o1_mf_1_41_97w5hrkx_.arc thread=1 sequence=41

media recovery complete, elapsed time: 00:00:05

Finished recover at 09-NOV-13

 

database opened

 

582.You are trying to recover your database. During the recovery process, you receive the following error:

ORA-00279: change 5033391 generated at 08/17/2008 06:37:40 needed for thread 1

ORA-00289: suggestion:/oracle01/flash_recovery_area/ORCL/archivelog/2008_08_17/o1_mf_1_11_%u_.arc

ORA-00280: change 5033391 for thread 1 is in sequence #11

ORA-00278: log

file ,,/oracle01/flash_recovery_area/ORCL/archivelog/2008_08_17

/o1_mf_1_10_4bj6wnqm_.arc no longer needed for this recovery Specify log:

{<RET>=suggested | filename | AUTO | CANCEL}

ORA-00308: cannot open archived log

,,/oracle01/flash_recovery_area/ORCL/archivelog/2008_08_17

/o1_mf_1_11_%u_.arc

ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3

How do you respond to this error? (Choose two.)

A. Restore the archived redo log that is missing and attempt recovery again.

B. Recovery is complete and you can open the database.

C. Recovery needs redo that is not available in any archived redo log. Attempt to apply an online redo log if available.

D. Recover the entire database and apply all archived redo logs again.

E. Recovery is not possible because an archived redo log has been lost.

 

 

Answer: AC

答案解析:

从以上错误可知,缺少归档日志。

恢复需要的归档日志以及使用联机日志来恢复。

 

583. During recovery, you need to know if log sequence 11 is in the online redo logs, and if so, you need to know the names of the online redo logs so you can apply them during recovery.

Which view or views would you use to determine this information? (Choose all that apply.)

A. V$LOGFILE

B. V$RECOVER_LOG

C. V$RECOVER_DATABASE

D. V$LOG_RECOVER

E. V$LOG

 

 

Answer: AE

答案解析:

 可以从SEQUENCE# 看出当前所有日志的 SEQUENCE, 根据GROUP#在v$logfile找出

 

 

584.How is block-change tracking enabled?

A. With alter database enable block change tracking

B. With alter system enable block change tracking

C. With an init.ora parameter change

D. With an spfile parameter change

 

 

Answer: A

答案解析:

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

You can enable block change tracking when the database is either open or mounted.

To enable block change tracking:

Start SQL*Plus and connect to a target database with administrator privileges.

Ensure that the DB_CREATE_FILE_DEST initialization parameter is set.

SHOW PARAMETER DB_CREATE_FILE_DEST

If the parameter is not set, and if the database is open, then you can set the parameter with the following form of the ALTER SYSTEM statement:

ALTER SYSTEM SET

  DB_CREATE_FILE_DEST = '/disk1/bct/'

  SCOPE=BOTH SID='*';

Enable block change tracking.

Execute the following ALTER DATABASE statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

You can also create the change tracking file in a location that you choose yourself by using the following form of SQL statement:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING

  USING FILE '/mydir/rman_change_track.f' REUSE;

The REUSE option tells Oracle Database to overwrite any existing block change tracking file with the specified name.

    官方参考:http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8125

 

585.What type of backup is stored in a proprietary RMAN format?

A. Backup set

B. Image copy

C. Backup section

D. Backup group

 

 

Answer: A

 答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/glossary.htm#BRADV90108

backup set

A backup of one or more data files, control files, server parameter files, and archived redo log files. Each backup set consists of one or more binary files. Each binary file is called a backup pieceBackup pieces are written in a proprietary format that can only be created or restored by RMAN.

Backup sets are produced by the RMAN BACKUP command. A backup set usually consists of only one backup piece. RMAN divides the contents of a backup set among multiple backup pieces only if you limit the backup piece size using the MAXPIECESIZE option of the ALLOCATE CHANNEL or CONFIGURE CHANNEL command.

 

586.Consider the following command:

Backup database plus archivelog delete input;

How many backup sets would be created by this command if the following were true:

Control-file auto backups were enabled.

The size of backup sets was not restricted.

One channel was allocated.

A. 1

B. 2

C. 3

D. 4

E. 5

 

 

Answer: D

 

答案解析:

 

RMAN> show all;

RMAN configuration parameters for database with db_unique_name TESTDB are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_testdb.f'; # default

 

RMAN> Backup database plus archivelog delete input;

Starting backup at 19-DEC-13

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=10 RECID=5 STAMP=834597174

input archived log thread=1 sequence=11 RECID=6 STAMP=834597417

channel ORA_DISK_1: starting piece 1 at 19-DEC-13

channel ORA_DISK_1: finished piece 1 at 19-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_annnn_TAG20131219T163657_9c5d1bn3_.bkp tag=TAG20131219T163657 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_12_19/o1_mf_1_10_9c5csl13_.arc RECID=5 STAMP=834597174

archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_12_19/o1_mf_1_11_9c5d19cn_.arc RECID=6 STAMP=834597417

Finished backup at 19-DEC-13

 

Starting backup at 19-DEC-13

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/testdb/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/testdb/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/testdb/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/testdb/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf

channel ORA_DISK_1: starting piece 1 at 19-DEC-13

channel ORA_DISK_1: finished piece 1 at 19-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_nnndf_TAG20131219T163703_9c5d1j8c_.bkp tag=TAG20131219T163703 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:05

Finished backup at 19-DEC-13

 

Starting backup at 19-DEC-13

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=12 RECID=7 STAMP=834597550

channel ORA_DISK_1: starting piece 1 at 19-DEC-13

channel ORA_DISK_1: finished piece 1 at 19-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_annnn_TAG20131219T163911_9c5d5hlk_.bkp tag=TAG20131219T163911 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/TESTDB/archivelog/2013_12_19/o1_mf_1_12_9c5d5g7r_.arc RECID=7 STAMP=834597550

Finished backup at 19-DEC-13

 

Starting Control File and SPFILE Autobackup at 19-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/autobackup/2013_12_19/o1_mf_s_834597553_9c5d5lz1_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 19-DEC-13

 

RMAN> list backup;

 

 

List of Backup Sets

===================

 

 

BS Key  Size       Device Type Elapsed Time Completion Time

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

5       32.68M     DISK        00:00:02     19-DEC-13      

        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20131219T163657

        Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_annnn_TAG20131219T163657_9c5d1bn3_.bkp

 

  List of Archived Logs in backup set 5

  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time

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

  1    10      736975     19-DEC-13 759987     19-DEC-13

  1    11      759987     19-DEC-13 760624     19-DEC-13

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

6       Full    1.17G      DISK        00:01:59     19-DEC-13      

        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20131219T163703

        Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_nnndf_TAG20131219T163703_9c5d1j8c_.bkp

  List of Datafiles in backup set 6

  File LV Type Ckp SCN    Ckp Time  Name

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

  1       Full 760633     19-DEC-13 /u01/app/oracle/oradata/testdb/system01.dbf

  2       Full 760633     19-DEC-13 /u01/app/oracle/oradata/testdb/sysaux01.dbf

  3       Full 760633     19-DEC-13 /u01/app/oracle/oradata/testdb/undotbs01.dbf

  4       Full 760633     19-DEC-13 /u01/app/oracle/oradata/testdb/users01.dbf

  5       Full 760633     19-DEC-13 /u01/app/oracle/oradata/testdb/example01.dbf

 

BS Key  Size       Device Type Elapsed Time Completion Time

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

7       19.00K     DISK        00:00:00     19-DEC-13      

        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20131219T163911

        Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_19/o1_mf_annnn_TAG20131219T163911_9c5d5hlk_.bkp

 

  List of Archived Logs in backup set 7

  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time

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

  1    12      760624     19-DEC-13 760709     19-DEC-13

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

8       Full    9.36M      DISK        00:00:02     19-DEC-13      

        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20131219T163913

        Piece Name: /u01/app/oracle/fast_recovery_area/TESTDB/autobackup/2013_12_19/o1_mf_s_834597553_9c5d5lz1_.bkp

  SPFILE Included: Modification time: 19-DEC-13

  SPFILE db_unique_name: TESTDB

  Control File Included: Ckp SCN: 760721       Ckp time: 19-DEC-13

 

587.Compressed backups work with which of the following commands?

A. copy as backup

B. backup as copy

C. backup

D. copy

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90028

 COMPRESSED

Enables binary compression.

RMAN compresses the data written into the backup set to reduce the overall size of the backup set. All backups that create backup sets can create compressed backup sets. Restoring compressed backup sets is no different from restoring uncompressed backup sets.

RMAN applies a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many media manager vendors. When backing up to a locally attached tape device, compression provided by the media management vendor is usually preferable to the binary compression provided by BACKUP AS COMPRESSED BACKUPSET. Therefore, use uncompressed backup sets and turn on the compression provided by the media management vendor when backing up to locally attached tape devices. You should not use RMAN binary compression and media manager compression together.

Some CPU overhead is associated with compressing backup sets. If the target database is running at or near its maximum load, then you may find the overhead unacceptable. In most other circumstances, compressing backup sets saves enough disk space to be worth the CPU overhead. 

 

 

588.Which is the correct command to back up the database, back up the archived redo logs, and then remove the backed-up archived redo logs?

A. backup database

B. backup database and archivelogs

C. backup database plus archivelogs

D. backup database plus archivelog delete input

E. backup database and archivelog delete input

 

 

Answer: D

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90026

DATABASE

Creates a backup of all data files in the database. If generating a backup set, then RMAN can include only data files and control files: it cannot include archived redo log files.

If the backupSpec includes data file 1, and if CONFIGURE CONTROLFILE AUTOBACKUP is OFF, then RMAN automatically includes the control file in the backup. If the instance is started with a server parameter file, then RMAN also includes this parameter file in the backup.

If the backupSpec includes data file 1, and if CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN does notautomatically include the control file in the output. Instead, RMAN generates a separate control file autobackup piece. If the instance is started with a server parameter file, then RMAN includes this parameter file in the autobackup piece.

Full database backups should usually be either image copies or compressed backup sets. Image copies are more flexible than backup sets for some purposes (such as use in an incrementally updated backups strategy), and compressed backup sets make more efficient use of storage space, if the CPU overhead involved in creating them is tolerable.

Note: To force RMAN to include the current control file in the backup when CONTROLFILE AUTOBACKUP is ON, specify the INCLUDE CURRENT CONTROLFILE clause.

See Also: The TABLESPACE description to learn about backup behavior when the database includes bigfile tablespaces 

 

 PLUS ARCHIVELOG

Includes archived redo log files in the backup (see Example 2-15). Causes RMAN to perform the following steps:

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Run the BACKUP ARCHIVELOG ALL command. If backup optimization is enabled, then RMAN only backs up logs that have not yet been backed up.

Back up the files specified in the BACKUP command.

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Back up any remaining archived redo log files. If backup optimization is not enabled, then RMAN backs up the logs generated in step 1 plus all the logs generated during the backup.

You cannot specify PLUS ARCHIVELOG on the BACKUP ARCHIVELOG command or BACKUP AS COPY INCREMENTALcommand (or BACKUP INCREMENTAL command when the default backup type is COPY). You cannot specify PLUS ARCHIVELOG when also specifying INCREMENTAL FROM SCN.

Unless the online redo log is archived after the backup, DUPLICATE is not possible with this backup.  

 

DELETE [ALL] INPUT

Deletes the input files after successfully backing them up.

Specify this option only when backing up archived redo log files, data file copies (COPY OF or DATAFILECOPY), or backup sets. The BACKUP ARCHIVELOG command only backs up one copy of each distinct log sequence number, so if the DELETE INPUT option is used without the ALL keyword, RMAN only deletes the copy of the file that it backs up.

Specifying the DELETE INPUT option is equivalent to issuing the DELETE command for the input files. When backing up archived redo log files, RMAN uses the configured settings to determine whether an archived redo log can be deleted (CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP).

The ALL option applies only to archived redo log files. If you run DELETE ALL INPUT, then the command deletes all copies of corresponding archived redo log files or data file copies that match the selection criteria in theBACKUP command (as shown in Example 2-19). For example, if you specify the SEQUENCE n clause, then RMAN deletes all archived redo log files with same sequence number n.

Note: The database retains archived redo log files in the fast recovery area as long as possible and deletes them automatically when disk space is required. You can use the BACKUP DELETE INPUT, DELETE ARCHIVELOG, andDELETE OBSOLETE commands to delete log files manually from inside or outside the recovery area. You do not need to specify BACKUP DELETE INPUT when backing up the recovery area because the database automatically deletes log files based on the archived redo log deletion policy and other fast recovery area rules. 

Example 2-19 Backing Up and Deleting Archived Redo Log Files

This example assumes that you have two archiving destinations set: /disk2/PROD/archivelog/ and /disk1/arch/. The command backs up one archived redo log for each unique sequence number. For example, if archived redo log 1000 is in both directories, then RMAN only backs up one copy this log. The DELETE INPUTclause with the ALL keyword specifies that RMAN should delete all archived redo log files from both archiving directories after the backup.

BACKUP DEVICE TYPE sbt

  ARCHIVELOG LIKE '/disk%arc%'

  DELETE ALL INPUT;

 

589.Which of the following best describes a full backup?
A. All datafiles of a database
B. All datafiles, archive logs, and control files
C. All datafiles and control files
D. All the used blocks in a datafile

 

Answer: D

 

590.Which type of backup backs up only data blocks modified since the most recent backup at the same level or lower?

A. Differential incremental backup

B. Different incremental backup

C. Cumulative backup

D. Cumulative incremental backup

 

 

Answer: A

答案解析:

增量备份参考: http://blog.csdn.net/rlhua/article/details/11763453

增量累积备份参考:http://blog.csdn.net/rlhua/article/details/11763671

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/glossary.htm#BRADV90151

 

differential incremental backup

A type of incremental backup that backs up all blocks that have changed since the most recent backup at level 1 or level 0. For example, in a differential level 1 backup RMAN determines which level 1 or level 0 incremental backup is most recent and then backs up all blocks changed since that backup. Differential backups are the default type of incremental backup. When recovering using differential incremental backups, RMAN must apply all differential incremental level 1 backups since the restored data file backup.

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV89500

 

Differential Incremental Backups

In a differential level 1 backup, RMAN backs up all blocks that have changed since the most recent incremental backup at level 1 (cumulative or differential) or level 0. For example, in a differential level 1 backup, RMAN determines which level 1 backup occurred most recently and backs up all blocks modified after that backup. If no level 1 is available, then RMAN copies all blocks changed since the base level 0 backup.

If no level 0 backup is available in either the current or parent incarnation, then the behavior varies with the compatibility mode setting. If compatibility is >=10.0.0, RMAN copies all blocks that have been changed since the file was created. Otherwise, RMAN generates a level 0 backup.

Figure 8-2 Differential Incremental Backups


Description of "Figure 8-2 Differential Incremental Backups"

In the example shown in Figure 8-2, the following activity occurs each week:

Sunday

An incremental level 0 backup backs up all blocks that have ever been in use in this database.

Monday through Saturday

On each day from Monday through Saturday, a differential incremental level 1 backup backs up all blocks that have changed since the most recent incremental backup at level 1 or 0. The Monday backup copies blocks changed since Sunday level 0 backup, the Tuesday backup copies blocks changed since the Monday level 1 backup, and so forth.

 

591.Which type of backup must be performed first with an incremental backup?

A. Level 1

B. Level 0

C. Level 2

D. Level 3

 

 

Answer: B

 

RMAN can create multilevel incremental backups. Each incremental level is denoted by a value of 0 or 1.

A level 0 incremental backup, which is the base for subsequent incremental backups, copies all blocks containing data.

You can create a level 0 database backup as backup sets or image copies.

 

The only difference between a level 0 incremental backup and a full backup is that a full backup is never included in an incremental strategy.

Thus, an incremental level 0 backup is a full backup that happens to be the parent of incremental backups whose level is greater than 0.

 

官网参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV109

 

增量备份参考: http://blog.csdn.net/rlhua/article/details/11763453

增量累积备份参考:http://blog.csdn.net/rlhua/article/details/11763671

592.Which backup option defines a user-defined name for a backup?

A. FORMAT

B. NAME

C. TAG

D. FORMAT U%

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90026

TAG tag_name

Specifies a user-specified tag name for a backup set, proxy copy, data file copy, or control file copy. The tag is applied to the output files generated by the BACKUP command.

The tag name is not case-sensitive. The name must be 30 characters or less. The characters are limited to the characters that are valid in file names on the target file system. For example, ASM does not support the use of the hyphen (-) character in the file names it uses internally, so weekly-incremental is not a valid tag name for backups in ASM disk groups. Environment variables are not valid in the TAG parameter.

Typically, a tag name is a meaningful name such as MON_PM_BKUP or WEEKLY_FULL_BKUP. Tags are reusable, so that backup set 100 can have the tag MON_PM_BKUP one week while backup set 105 has the same tag the next week.

If you do not specify a tag name, then by default RMAN creates a tag for backups (except for control file autobackups). The default tag uses the format TAGYYYYMMDDTHHMMSS, where YYYY is the year, MM is the month, DDis the day, HH is the hour (in 24-hour format), MM is the minutes, and SS is the seconds. For example, a backup of data file 1 might receive the tag TAG20070208T133437. The date and time refer to when RMAN started the backup. If multiple backup sets are created by one BACKUP AS BACKUPSET command, then each backup piece is assigned the same default tag.

You can also specify the tag at the backupSpec level. If you specify the tag at:

The command level, then all backup sets created by the command have the tag.

The backupSpec level, then backup sets created with different backup specifications can have different tags.

Both levels, then the tag in the backupSpec takes precedence.

Note: A tag is an attribute of each backup piece in a given copy of a backup set (for AS BACKUPSET) or each image copy (for AS COPY). For example, if you run BACKUP AS BACKUPSET COPIES 1 DATABASE TAG TUE_PM, then only one copy of the backup set exists and each backup piece has tag TUE_PM. Assume that this backup set has primary key 1234. If you then run BACKUP BACKUPSET 1234 TAG WED_PM, then the first copy of the backup set has tag TUE_PM and the second copy of the backup set has tag WED_PM.

 

593.Given the following steps, which would be the correct order to create a backup of an Oracle database in NOARCHIVELOG mode?

A. shutdown immediate from RMAN

B. Log into RMAN

C. startup mount from RMAN

D. backup database

E. alter database open

F. backup database plus archivelog delete input

G. b, c, a, d, e

H. b, a, c, f, e

I. a, c, e, d

J. b, a, c, e, f

K. b, a, c, d, e

 

 

Answer: E

答案解析:

Backing Up a Database in NOARCHIVELOG Mode

If a database runs in NOARCHIVELOG mode, then the only valid database backup is a consistent backup. For the backup to be consistent, the database must be mounted after a consistent shutdown. No recovery is required after restoring the backup.

To make a consistent database backup:

Start RMAN and connect to a target database.

Shut down the database consistently and then mount it.

For example, enter the following commands to guarantee that the database is in a consistent state for a backup:

RMAN> SHUTDOWN IMMEDIATE;

RMAN> STARTUP FORCE DBA;

RMAN> SHUTDOWN IMMEDIATE;

RMAN> STARTUP MOUNT;

Run the BACKUP DATABASE command.

For example, enter the following command at the RMAN prompt to back up the database to the default backup device:

RMAN> BACKUP DATABASE;

The following variation of the command creates image copy backups of all data files in the database:

RMAN> BACKUP AS COPY DATABASE;

Open the database and resume normal operations.

The following command opens the database:

RMAN> ALTER DATABASE OPEN;

官网参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmquick.htm#BRADV119

 

594.Which of the following most closely represents an image copy?

A. Unix cp command of a file

B. Bit-by-bit copy of a file

C. Windows COPY command of a file

D. All of the above

 

 

Answer: D

答案解析:

image copy实际上就是文件的拷贝,ABC都属于拷贝。故选D

 

595.Which dynamic view displays the status of block-change tracking?

A. V$BLOCK_CHANGE

B. V$BLOCK_CHANGE_TRACKING

C. V$BLOCKCHANGE

D. V$BLOCK_TRACKING

 

 

Answer: B

答案解析:

V$BLOCK_CHANGE_TRACKING displays the status of block change tracking for the database.

Status of block change tracking in the database:

DISABLED - Block change tracking is disabled

TRANSITION - Block change tracking is in the process of transitioning between the enabled and disabled states. The TRANSITION state should usually never be observed, because it only exists while enabling or disabling block change tracking. This state might be observed if the instance crashed while enabling or disabling block change tracking, in which case it will be cleaned up automatically the next time that the database is opened.

ENABLED - Block change tracking is enabled

官方参考:http://docs.oracle.com/cd/E16655_01/server.121/e17615/refrn30030.htm#REFRN30030

Checking Whether Change Tracking Is Enabled

You can query the V$BLOCK_CHANGE_TRACKING  view to determine whether change tracking is enabled, and if it is, the file name of the block change tracking file.

To determine whether change tracking is enabled:

Enter the following query in SQL*Plus (sample output included):

COL STATUS   FORMAT A8

COL FILENAME FORMAT A60

SELECT STATUS, FILENAME

FROM   V$BLOCK_CHANGE_TRACKING;

STATUS   FILENAME

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

ENABLED  /disk1/bct/RDBMS/changetracking/o1_mf_2f71np5j_.chg

 

官方参考:http://docs.oracle.com/cd/E16655_01/backup.121/e17630/rcmbckba.htm#BRADV8125

 

596.What feature comes into play to help ensure the completion of the backup should one of three backup devices fail during a backup that is using three different channels?
A. Channel failover
B. Restartable backups
C. Rescheduable backups
D. Automatic backup recovery
E. Channel recovery

 

Answer: A

 

597.What command would you use to set a persistent setting in RMAN so that backups are all written to a tape device?

A. CONFIGURE DEFAULT DEVICE TYPE TO TAPE MEDIA

B. CONFIGURE DEFAULT DEVICE TYPE TO TAPE

C. CONFIGURE DEFAULT DEVICE TYPE TO SBT

D. CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#RCMRF90087

 

 

DEFAULT DEVICE TYPE TO
deviceSpecifie

Specifies the default device type for automatic channels. By default, DISK is the default device type. CLEARreturns the default device type to DISK.

By default, the BACKUP command only allocates channels of the default device type. For example, if you configure automatic channels for DISK and sbt and set the default device type to sbt, then RMAN only allocates tape channels when you run the BACKUP DATABASE command. You can override this behavior either by manually allocating channels in a RUN command, or by specifying DEVICE TYPE on the BACKUP command itself (seeExample 2-42).

The RESTORE command allocates automatic channels of all configured device types, regardless of the default device type. The RESTORE command obeys the PARALLELISM setting for each configured device type.

Example 2-42 Overriding the Default Device Type

This example configures duplexing to 2 for DISK backups of data files and control files (control file autobackups on disk are a special case and are never duplexed), then configures sbt as the default device.

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=tape1)';

CONFIGURE DEFAULT DEVICE TYPE TO sbt;

 

598.The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter should be set to what value? (Choose all that apply.)

A. The initialization parameter should be set to 0 when the RMAN repository is being used.

B. The initialization parameter should be set to greater than 0 with the RMAN repository utilizing the recovery catalog only.

C. The initialization parameter should be set to greater than 0 with the RMAN repository utilizing the control file or the recovery catalog.

D. The initialization parameter should be set to 0 with the RMAN repository utilizing the control file or the recovery catalog.

E. The initialization parameter should never be set to 0 if you are using RMAN.

 

 

Answer: CE

答案解析:

参考:指定保留策略:http://blog.csdn.net/rlhua/article/details/12308231

由下可知,不管备份时是使用恢复目录还是不使用恢复目录,CONTROL_FILE_RECORD_KEEP_TIME必须要大于0,备份的副本才能保存指定的时间段。

恢复窗口保留策略

如果未使用恢复目录,则要防止控制文件中旧的备份记录被覆盖,恢复窗口时段应小于等于控制文件参数CONTROL_FILE_RECORD_KEEP_TIME的值。

如果正在使用恢复目录,则应确保CONTROL_FILE_RECORD_KEEP_TIME大于目录重新同步的间隔。

sys@TEST0924> show parameter CONTROL_FILE_RECORD_KEEP_TIME

NAME TYPE VALUE

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

control_file_record_keep_time integer 7

冗余保留策略

如果需要保留一定数量的备份,可以通过冗余选项设置保留策略。此选项要求在任何备份被标识为过时之前将指定数量的备份列入目录。默认保留策略的冗余度为1,这表示在任意指定时间一个文件只存在一个备份。当同一文件的最新版本已经有备份时,上一个备份就被视为过时。

可以使用下列命令重新配置冗余保留策略:RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY <副本数>;其中<副本数> 是满足策略所需的副本数量。

禁用保留策略

有时可能希望完全禁用保留策略。如果还有RMAN 以外的其它系统,并且磁盘备份被备份到磁带中,则可能需要这样做。如果禁用了保留策略,则RMAN 不会认为某个备份过时。

因为RMAN 不必决定何时从磁盘中删除备份(因为有其它实用程序管理此任务),所以不需要对RMAN 进行此方面的配置。

在此情况下,维护每个备份的记录的时间长度即为CONTROL_FILE_RECORD_KEEP_TIME初始化参数指定的时间长度。

 

599. Given the following steps, which would be the correct order to create a backup of an Oracle database in ARCHIVELOG mode with control-file autobackups enabled?

A. backup archivelog all;

B. backup database all;

C. backup controlfile;

D. backup archivelog, database, controlfile delete input;

E. backup database plus archivelog delete input

F. e

G. a, b, a, c

H. d

I. b, a, c

J. b, a, c, d, e

 

 

Answer: A

答案解析:

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#RCMRF90026

DATABASE

Creates a backup of all data files in the database. If generating a backup set, then RMAN can include only data files and control files: it cannot include archived redo log files.

If the backupSpec includes data file 1, and if CONFIGURE CONTROLFILE AUTOBACKUP is OFF, then RMAN automatically includes the control file in the backup. If the instance is started with a server parameter file, then RMAN also includes this parameter file in the backup.

If the backupSpec includes data file 1, and if CONFIGURE CONTROLFILE AUTOBACKUP is ON, then RMAN does notautomatically include the control file in the output. Instead, RMAN generates a separate control file autobackup piece. If the instance is started with a server parameter file, then RMAN includes this parameter file in the autobackup piece.

Full database backups should usually be either image copies or compressed backup sets. Image copies are more flexible than backup sets for some purposes (such as use in an incrementally updated backups strategy), and compressed backup sets make more efficient use of storage space, if the CPU overhead involved in creating them is tolerable.

Note: To force RMAN to include the current control file in the backup when CONTROLFILE AUTOBACKUP is ON, specify the INCLUDE CURRENT CONTROLFILE clause.

See Also: The TABLESPACE description to learn about backup behavior when the database includes bigfile tablespaces 

 

 PLUS ARCHIVELOG

Includes archived redo log files in the backup (see Example 2-15). Causes RMAN to perform the following steps:

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Run the BACKUP ARCHIVELOG ALL command. If backup optimization is enabled, then RMAN only backs up logs that have not yet been backed up.

Back up the files specified in the BACKUP command.

Run an ALTER SYSTEM ARCHIVE LOG CURRENT statement.

Back up any remaining archived redo log files. If backup optimization is not enabled, then RMAN backs up the logs generated in step 1 plus all the logs generated during the backup.

You cannot specify PLUS ARCHIVELOG on the BACKUP ARCHIVELOG command or BACKUP AS COPY INCREMENTALcommand (or BACKUP INCREMENTAL command when the default backup type is COPY). You cannot specify PLUS ARCHIVELOG when also specifying INCREMENTAL FROM SCN.

Unless the online redo log is archived after the backup, DUPLICATE is not possible with this backup. 

 

600.Which of the following statements are true about the BACKUP command? (Choose all that apply.)
A. The BACKUP command can not be used to make image copies of a datafile.
B. The BACKUP command can improve performance by multiplexing backup files.
C. The BACKUP can take advantage of the block-change tracking capability.
D. The BACKUP command cannot store data in incremental backups.
E. The BACKUP command can store data in cumulative incremental backups only.

 

Answer: BC

 

 

 

 

 

601.You need to perform a block media recovery on the tools01.dbf data file in the SALES database by using Recovery Manager (RMAN).Which two are the prerequisites to perform this operation? (Choose two)

A. You must configure block change tracking file

B. You must have first level 1 backups for RMAN to restore blocks

C. You must ensure that the SALES database is mounted or open

D. You must have full or level 0 backups for RMAN to restore blocks

E. You must take the tools01.dbf data file offline before you start a block media recovery

 

 

Answer: CD

答案解析:

题意:要求使用RMAN来 perform a block media recovery在tools01.dbf 数据文件上,在SALES database上。在恢复时,数据库必须处于mount状态或者open状态,以及有包含该数据文件备份信息所有的备份集。

故选CD

 

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89785

 

 

602.On Friday at 11:30 am you decided to flash back the database because of a user error that occurred at 8:30 am. Which option must you use to check whether a flashback operation can recover the database to the specified time?

A. Check the alert log file

B. Query the V$FLASHBACK_DATABASE_LOG view

C. Query the V$RECOVERY_FILE_DEST_SIZE view

D. Query the V$FLASHBACK_DATABASE_STAT view

E. Check the value assigned for the UNDO_RETENTION parameter

 

 

Answer: B

 答案解析:

本题的问题是:使用哪一个选项来检查闪回操作可以将数据库恢复到指定时间。

通过V$FLASHBACK_DATABASE_LOG表的OLDEST_FLASHBACK_SCN和OLDEST_FLASHBACK_TIME字段可以得出数据库可闪回的近似最低SCN和时间。选B。

 

参考:监视闪回数据库:http://blog.csdn.net/rlhua/article/details/12421005

使用V$FLASHBACK_DATABASE_LOG视图可监视闪回数据库的保留目标:

• ESTIMATED_FLASHBACK_SIZE使用先前记录的闪回数据,可估计快速恢复区中闪回日志需要多少磁盘空间才能满足当前闪回保留目标。估计的依据是自实例启动以来的工作量,或者是等于闪回保留目标的最近时间间隔,取较小的那个值。

• FLASHBACK_SIZE给出了闪回数据的当前字节大小(以字节为单位)。

• OLDEST_FLASHBACK_SCN和OLDEST_FLASHBACK_TIME显示了数据库可闪回到的近似最低SCN 和时间。V$DATABASE中的CURRENT_SCN给出了当前数据库SCN。

使用V$FLASHBACK_DATABASE_STAT视图可监视闪回数据库日志中记录闪回数据的开销。此视图包含24 小时的信息,每一行代表一小时的时间间隔。使用此视图可确定闪回数据的生成速率变化。

FLASHBACK_DATA和REDO_DATA分别代表时间间隔期间写入的闪回数据和重做数据的字节数,而且,DB_DATA提供了读写的数据块的字节数。此视图还包含一定时间间隔内预计需要的闪回空间。

查询V$RECOVERY_FILE_DEST可查看与快速恢复区相关的信息。列说明如下:

• NAME:快速恢复区的名称,指示位置字符串

• SPACE_LIMIT:在DB_RECOVERY_FILE_DEST_SIZE参数中指定的磁盘限制

• SPACE_USED:快速恢复区文件使用的空间(字节)

• SPACE_RECLAIMABLE:通过删除过时文件、冗余文件和其它空间管理算法确定的低优先级文件,可回收的空间量

• NUMBER_OF_FILES:文件数量

 

 

603.While performing a regular check on your recovery catalog you realized that the catalog database is running out of space and you do not have options to increase the space. However, you have another database where more space is available and you want to move your existing recovery catalog to this database.

The options that can be considered while moving the recovery catalog are as follows:

1. Using one of the Oracle expdp utilities to export the catalog data

2. Creating a recovery catalog user and granting the necessary privileges in the other database

3. Creating the recovery catalog using the CREATE CATALOG command

4. Using the corresponding impdp utility to import the catalog data into the other database

5. Registering the target database in the new catalog database using the REGISTER DATABASE

command Identify the option with the correct sequence for moving the recovery catalog.

A. 2, 3, 5

B. 1, 2, 4

C. 1, 2, 4, 5

D. 1, 2, 3, 4, 5

 

 

Answer: B

答案解析:

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

 

使用导出和导入实用程序或数据泵实用程序可执行以下操作:

• 将恢复目录从一个数据库移至另一个数据库

• 创建RMAN 恢复目录的逻辑备份

 

可以使用导出和导入功能将恢复目录从一个数据库移至另一个数据库。

还可以创建恢复目录的导出文件作为逻辑备份。

要从一个数据库中导出恢复目录然后将其导入到另一个数据库中,请执行以下步骤:

1. 使用Oracle 导出实用程序之一从数据库中导出目录数据。

2. 在导出到的数据库上创建一个恢复目录用户,然后授予该用户必要的权限。

3. 使用对应的导入实用程序将目录数据导入到在步骤2 中创建的方案。

请勿在将目录导入到数据库之前或之后执行CREATE CATALOG命令。导入操作会在第二个数据库中创建目录。

注:通过使用导出和导入或数据泵,同时使用逻辑方法,可以备份恢复目录,并将其作为可移动表空间移动至其它数据库。

 

604.You realize that the control file is damaged in your production database. After restoring the control file from autobackup, what is the next step that you must do to proceed with the database recovery?

A. Mount the database

B. Open the database in NORMAL mode

C. Open the database in RESTRICTED mode

D. Open the database with the RESETLOGS option

 

 

Answer: A

答案解析:

参考control文件恢复实验:http://blog.csdn.net/rlhua/article/details/12625067

 

Restoring the Control File from the Autobackup

Restoring the control file from an autobackup is similar to the steps you use to restore an SPFILE from an autobackup.

RMAN> startup nomount;

RMAN> restore controlfile from autobackup;

RMAN> alter database mount;

RMAN> recover database;

RMAN> alter database open resetlogs;

Note that since there is no control file, you have to open the database with NOMOUNT and then restore the control file. After you mount the database, you must recover the database, because the backup control file contains information about an older version of the database. For the same reason, you must open the database with RESETLOGS.

RMAN restores the control file to all locations specified by the initialization parameter CONTROL_FILES. If one or more of those locations are still not available, you will have to edit the CONTROL_FILES parameter to specify alternative locations or temporarily restore the control file to a different location:

RMAN> restore controlfile to '/u06/oradata/rest_cf.dbf' from autobackup;

 

605.What two are the prerequisites for enabling Flashback Database? (Choose two)

A. The database must be in ARCHIVELOG mode

B. The database must be in MOUNT EXCLUSIVE mode

C. The database must be opened in RESTRICTED mode

D. The database instance must be started in the NOMOUNT state

E. The database instance must have the keep buffer pool defined

 

 

Answer: AB

答案解析:

参考:闪回数据库:http://blog.csdn.net/rlhua/article/details/12421005

按以下步骤配置闪回数据库:

1.配置快速恢复区。

2.使用DB_FLASHBACK_RETENTION_TARGET初始化参数设置保留目标。可指定一个上限(以分钟为单位),指示数据库能够闪回到多长时间以前。 ALTER SYSTEM SETDB_FLASHBACK_RETENTION_TARGET=2880 SCOPE=BOTH 使用了2,880 分钟,相当于两天。此参数只是一个目标,并不提供任何保证。闪回时间间隔取决于快速恢复区中保存的闪回数据量。

3.使用以下命令启用闪回数据库:

ALTER DATABASE FLASHBACK ON;

必须先针对归档配置数据库,之后才能发出命令来启用闪回数据库。

可以使用以下查询来确定是否已启用闪回数据库:

SELECT flashback_on FROM v$database;

可使用ALTER DATABASE FLASHBACK OFF命令来禁用闪回数据库。这样,会自动删除所有现有的闪回数据库日志。

注:只有在独占模式下装载数据库后才能启用闪回数据库,在打开状态下则不可以。

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/flashdb.htm#BRADV593

Prerequisites for Flashback Database and Guaranteed Restore Points

To ensure successful operation of Flashback Database and guaranteed restore points, you must first set several key database options.

Flashback Database

Configure the following database settings before enabling Flashback Database:

Your database must be running in ARCHIVELOG mode, because archived logs are used in the Flashback Database operation.

You must have a fast recovery area enabled, because flashback logs can only be stored in the fast recovery area.

For Oracle Real Application Clusters (Oracle RAC) databases, the fast recovery area must be in a clustered file system or in ASM.

 

606.Identify the channel settings that can be performed using the CONFIGURE CHANNEL or ALLOCATE CHANNEL commands in RMAN (choose all that apply)

A. Limiting the input/output (I/O) bandwidth consumption

B. Specifying the size of backup sets and backup pieces

C. Specifying vendor-specific information for a media manager

D. Specifying the parallelism for backup and restore operations

 

 

Answer: AC

答案解析:

Whether you allocate channels manually or automatically, you can use channel control commands and options to do the following:

Control the operating system resources RMAN uses when performing RMAN operations. Affect the degree of parallelism for a backup or restore (in conjunctionwith the FILESPERSET parameter of the BACKUP command)

Set limits on I/O bandwidth consumption in kilobytes, megabytes, or gigabytes

(ALLOCATE CHANNEL ...RATE, CONFIGURE CHANNEL ... RATE)-check

Set limits on the size of backup pieces

 (the MAXPIECESIZE parameter specified on the CONFIGURE CHANNEL and ALLOCATE CHANNEL commands)- half of answer B

Set limits on the size of backup sets

 (the MAXSETSIZE parameter specified on the BACKUP and CONFIGURE commands)

- Not in the CONFIGURE CHANNEL and ALLOCATE CHANNEL(B is wrong)

Set limits on the number of concurrently open files (ALLOCATE CHANNEL ... MAXOPENFILES, CONFIGURE CHANNEL ... MAXOPENFILES)

Send vendor-specific commands to the media manager (SEND)

Specify vendor-specific parameters for the media manager 

(ALLOCATE CHANNEL ... PARMS, CONFIGURE CHANNEL ... PARMS)-check

Specify which instance performs the operation

 (ALLOCATE CHANNEL ... CONNECT, CONFIGURE CHANNEL ...CONNECT)

Oracle Press 1Z0-053 Exam Guide, Chapter 8: Monitoring and Tuning RMAN:

You can further tune your RMAN backup performance by tuning individual channels with the CONFIGURE

CHANNEL and ALLOCATE CHANNEL commands. Each CHANNEL command accepts the following parameters:

- MAXPIECESIZE: The maximum size of a backup piece

- RATE: The number of bytes per second read by RMAN on the channel

- MAXOPENFILES: The maximum number of input files that a channel can have open at a given time

The MAXPIECESIZE parameter is useful when you back up to disk and the underlying operating system limits

the size of an individual disk file, or when a tapemedia manager cannot split a backup piece across multiple tapes.

Note that the RATE parameter doesn't improve performance but throttles performance intentionally to limit the

disk bandwidth available to a channel. This is useful when your RMAN backups must occur during periods of

peak activity elsewhere in the database.

MAXOPENFILES was reviewed in the preceding section, but it is worth revisiting when you want to optimize

the performance of an individual channel. For example, you can use MAXOPENFILES to limit RMAN's use of

operating system file handles or buffers.

Oracle Press 1Z0-053 Exam Guide, Chapter 4: Creating RMAN Backups

References to PARALLELISM were only referenced as CONFIGURE DEVICE TYPE DISK PARALLELISM...

By default, any backups to disk default to a backupset backup type:

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

 

 

607.Examine the following scenario:

-Database is running in ARCHIVELOG mode.

-Complete consistent backup is taken every Sunday.

-On Tuesday the instance terminates abnormally because the disk on which control files are located gets corrupted The disk having active online redo log files is also corrupted. The hardware is repaired and the paths for online redo log files and control files are still valid. Which option would you use to perform the recovery of database till the point of failure?

A. Restore the latest whole backup, perform complete recovery, and open the database normally

B. Restore the latest whole backup, perform incomplete recovery, and open the database with the RESETLOGS option.

C. Restore the latest backups control file, perform complete recovery, and open the database with the RESETLOGS option.

D. Restore the latest backup control file, perform incomplete recovery using backup control file, and open the database with the RESETLOG option.

 

 

Answer: D

答案解析:

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

 

因为控制文件里有记录着备份的信息,当控制文件丢失,和在线重做日志丢失,只能做不完全恢复,并且只能恢复控制文件来来做不完全恢复。

 

608.You are managing a 24*7 database. The backup strategy for the database is to perform

user-managed backups. Identify two prerequisites to perform the backups. (Choose two.)

A. The database must be opened in restricted mode.

B. The database must be configured to run in ARCHIVELOG mode.

C. The tablespaces are required to be in backup mode before taking the backup.

D. The tablespaces are required to be in read-only mode before taking the backup

 

 

Answer: BC

答案解析:

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

执行用户管理的数据库备份:操作过程取决于数据库是否处于ARCHIVELOG模式。如果是,则通过在复制表空间的数据文件之前将每个表空间置于备份模式,可以使数据库处于打开且可用状态。否则,在复制数据文件之前必须先关闭数据库。

 

609.Examine the following commands and their output:

SQL> SELECT ename, sal FROM emp WHERE ename='JAMES';

ENAME SAL

JAMES 1050

SQL> UPDATE emp SET sal=sal+sal*1.2 WHERE ename='JAMES';

1 row updated.

SQL> SELECT ename, sal FROM emp WHERE ename='JAMES';

ENAME SAL JAMES 2310

 

View the exhibit and examine the Flashback Version Query that was executed after the preceding commands.

 

What could be the possible cause for the query not displaying any row?

A. Flashback logging is not enabled for the database.

B. The changes made to the table are not committed.

C. Supplemental logging is not enabled for the database.

D. The database is not configured in ARCHIVELOG mode.

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01004

 

Using Oracle Flashback Version Query

Use Oracle Flashback Version Query to retrieve the different versions of specific rows that existed during a given time interval. A row version is created whenever a COMMIT statement is executed.

 

610.Which of the following advisors is run in every maintenance window by the auto-task system?

A.The Memory Advisor

B.The SQL Tuning Advisor

C.The Undo Advisor

D.The SQL Access Advisor

 

 

Answer: B

答案解析:

自动 SQL 优化将在系统维护窗口期间作为自动维护任务运行, 搜索改进高负载 SQL 语句的执行计划的方法。

 

 

611.To accomplish user-managed backup for the USERS tablespace, you issued the following command to put the database in backup mode:

SQL> ALTER TABLESPACE users BEGIN BACKUP;

While copying the file to the backup destination a power outage caused the instance to terminate abnormally. Which statement is true about the next database startup and the USERS tablespace?

A. The database will open, and the tablespace automatically comes out of the backup mode.

B. The database will be mounted, and recovery must be performed on the USERS tablespace.

C. The database will be mounted, and data files in the USERS tablespace must be taken out of the backup mode.

D. The database will not be mounted, and you must restore all the data files for the USERS tablespace from the backup, and perform recovery.

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osbackup.htm#BRADV90007

在数据表空间在备份模式时,实例被异常关闭,重新启动会报错,而数据库会在mount状态,必须执行ALTER DATABASE END BACKUP后表空间才能脱离备份模式,数据库才能open。

 

612.Examine the following command used to perform incremental level 0 backup:

RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;

To enable the block change tracking, after the incremental level 0 backup you issued the following command:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/rman_change_track.f';

To perform incremental level 1 cumulative backup, you issued the following command:

RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;

Which two statements are true in the above situation? (Choose two.)

A. The block change tracking data will be used only from the next incremental 0 backup.

B. The incremental backup will use change tracking data for accomplishing the backup.

C. The incremental backup will not use change tracking data for accomplishing the backup.

D. The block track file will scan all the blocks and create bitmap for all the blocks backed up in the level 0 backup.

 

 

Answer: AC

 答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89535

The first level 0 incremental backup scans the entire data file ,是以第一次增量0级备份为基础。

D错误, in the level 0改为 in the first level 0为正确。

A,答案,题中是在level 0后才enable block change tracking,故在下一次的level 0 会扫描所有的数据文件,随后的增量备份就会用到block change tracking file。所以,A正确,必须在下一次的增量备份0级后才能开始使用。

BC答案相反,因为block change tracking file必须要在增量备份0级备份后才能被使用,是接下来的增量累积1级备份没有用到block change tracking file。

 

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

通过启用块更改跟踪,可执行快速增量备份。块更改跟踪会将有更改的每个块的物理地址写入到一个文件中。需要执行增量备份时,RMAN 可查看块更改跟踪文件,并只备份该文件所引用的块,而无需通过扫描每个块来确定该块自上次备份以来是否发生过更改。

这会加快增量备份的速度。

 

题中:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/mydir/rman_change_track.f';

 

启动快速增量备份。

 

613.You want to use the automatic management of backup and recovery operations features for your database. Which configuration must you set?

A. Enable the flash recovery area and specify it as the archived redo log destination.

B. Disable the flash recovery area and start the database instance in ARCHIVELOG mode.

C. Enable the flash recovery area but do not specify it as the archived redo log destination.

D. Disable the flash recovery area and start the database instance in NOARCHIVELOG mode.

 

 

Answer: A

答案解析:

使FRA变为可用,并且指定FRA为归档日志的目的地。

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV89420

 

 

614.Which three types of files can be automatically placed in the flash recovery area (fast recovery area in 11g Release 2)?(Choose three.)

A. Alert log file

B. Archived redo log files

C. Control file autobackups

D. Server Parameter file (SPFILE)

E. Recovery Manager (RMAN) backup piece

 

 

Answer: BCE

答案解析:

fast recovery area

An optional disk location that stores recovery-related files such as control file and online redo log copies, archived redo log files, flashback logs, and RMAN backups.

 

615.Before a Flashback Table operation, you execute the following command:

ALTER TABLE employees ENABLE ROW MOVEMENT; Why would you need this to be executed?

A. Because row IDs may change during the flashback operation

B. Because the object number changes after the flashback operation

C. Because the rows are retrieved from the recycle bin during the flashback operation

D. Because the table is moved forward and back to a temporary during the flashback opertion

 

 

Answer: A

 答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10897/backrest.htm#ADMQS12236

Before you can use Flashback Table, you must ensure that row movement is enabled on the table to be flashed back, or returned to a previous state. Row movement indicates that rowids will change after the flashback occurs. This restriction exists because if rowids before the flashback were stored by an application, then there is no guarantee that the rowids will correspond to the same rows after the flashback.

 

616.The EMP table has some discrepancy in data entry with a particular employee ID. You execute the query as shown in the Exhibit to retrieve all versions of the row that exist between two SCNs.View the Exhibit. Which two statements about the results of the query shown in the Exhibit are correct? (Choose two.) Exhibit:

 

A. The LAST_SCN value in the first row is NULL, which means that the versions of the row still exist at SCN 6636300.

B. The LAST_SCN value in the second row in NULL, which means that the version of the row still exists at SCN 6636300.

C. The LAST_SCN value in the third row is 6636280, which means that the version of row exists above SCN 6636280.

D. The LAST_SCN value in the second row is NULL, which means that the version of the row no longer exists because it was deleted.

 

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS1006

 

 

Table 12-1 Oracle Flashback Version Query Row Data Pseudocolumns

Pseudocolumn Name

Description

VERSIONS_STARTSCN

VERSIONS_STARTTIME

Starting System Change Number (SCN) or TIMESTAMP when the row version was created. This pseudocolumn identifies the time when the data first had the values reflected in the row version. Use this pseudocolumn to identify the past target time for Oracle Flashback Table or Oracle Flashback Query.

If this pseudocolumn is NULL, then the row version was created before start.

VERSIONS_ENDSCN

VERSIONS_ENDTIME

SCN or TIMESTAMP when the row version expired.

If this pseudocolumn is NULL, then either the row version was current at the time of the query or the row corresponds to a DELETE operation.

VERSIONS_XID

Identifier of the transaction that created the row version.

VERSIONS_OPERATION

Operation performed by the transaction: I for insertion, D for deletion, or U for update. The version is that of the row that was inserted, deleted, or updated; that is, the row after anINSERT operation, the row before a DELETE operation, or the row affected by an UPDATEoperation.

For user updates of an index key, Oracle Flashback Version Query might treat an UPDATEoperation as two operations, DELETE plus INSERT, represented as two version rows with a Dfollowed by an I VERSIONS_OPERATION.

 

Results are similar to:

 

XID               START_SCN    END_SCN O EMPNAME              SALARY

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

09001100B2200000   10093466            I Tom                     927

030002002B210000   10093459            D Mike                    555

0800120096200000   10093375   10093459 I Mike                    555

 

3 rows selected.

The results table rows are in descending chronological order. The third row corresponds to the version of the row in the table emp that was inserted in the table when the table was created. The second row corresponds to the row in emp that the erroneous transaction deleted. The first row corresponds to the version of the row in emp that was reinserted with a new employee name

 

617.A database instance is using an Automatic Storage Management (ASM) instance, which has a disk group, DGROUP1, created as follows:

SQL> CREATE DISKGROUP dgroup1 NORMAL REDUNDANCY

FAILGROUP controller1 DISK '/devices/diska1', '/devices/diska2'

FAILGROUP controller2 DISK '/devices/diskb1', '/devices/diskb2' ;

What happens when the whole CONTROLLER1 Failure group is damaged?

A. The transactions that use the disk group will halt.

B. The mirroring of allocation units occurs within the CONTROLLER2 failure group.

C. The data in the CONTROLLER1 failure group is shifted to the CONTROLLER2 failure group and implicit rebalancing is triggered.

D. The ASM does not mirror any data and newly allocated primary allocation units (AU) are stored in the CONTROLLER2 failure group.

 

 

Answer: C 

答案解析:

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

标准冗余,ASM要求该磁盘组至少要拥有两个failure磁盘组,即提供双倍镜像保护,对于同一份数据(ASM中镜像单位不是磁盘,也不是块,而是一种AU的单位,该单位大小默认是1M)将有主从两份镜像,并且ASM通过算法来自动确保主、从镜像不会存在于同一份failure 磁盘组,这样就保障了就算整个failure 磁盘组都损坏,数据也不会丢失。

 

该题中创建磁盘组使用了NORMAL REDUNDANCY即是说,该磁盘组拥有两个或两个以上的磁盘组成一组故障磁盘组,提供双倍镜像保护,题中为两个磁盘。

controller1组中包含两个磁盘, '/devices/diska1', '/devices/diska2' 

controller2 组中包含两个磁盘,'/devices/diskb1', '/devices/diskb2' ;

如果controller1被破坏,则数据就会转移到controller2 ,并且自动rebalance。

 

618.You want to set the following initialization parameters for your database instance:

LOG_ARCHIVE_DEST_1 = 'LOCATION=/disk1/arch' 

LOG_ARCHIVE_DEST_2 ='LOCATION=/disk2/arch'

 LOG_ARCHIVE_DEST_3 = 'LOACTION=/disk3/arch'

LOG_ARCHIVE_DEST_4 = 'LOCATION=/disk4/arch MANDATORY'

Identify the statement that correctly describes this setting.

A. The MANDATORY location must be a flash recovery area.

B. The optional destinations may not use the flash recovery area.

C. This setting is not allowed because the first destination is not set as MANDATORY.

D. The online redo log file is not allowed to be overwritten if the archived log cannot be created in the fourth destination.

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41134/log_arch_dest_param.htm#SBYDB01109

 

MANDATORY

Specifies that filled online log files must be successfully archived to the destination before they can be reused.

 

If MANDATORY is not specified, then, by default, the destination is considered to be optional.

At least one destination must succeed, even if all destinations are optional. If archiving to an optional destination fails, the online redo log file is still available for reuse and may be overwritten eventually. However, if the archival operation of a mandatory destination fails, online redo log files cannot be overwritten.

 

619.View the Exhibit and note the contents of V$DIAG_INFO.

Which statement is true about the ADR?

 

A. The text alert log file will be available in Diag Trace

B. A copy alert log file will be kept in Diag Incident for every incident.

C. The XML version of the alert log file will be available in Diag Trace.

D. An Automatic Database Diagnostic Management (ADDM) report is generated and stored in the Health Monitor whenever an incident occurs.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN12566

 

Viewing ADR Locations with the V$DIAG_INFO View

The V$DIAG_INFO view lists all important ADR locations for the current Oracle Database instance.

SELECT * FROM V$DIAG_INFO;

 

INST_ID NAME                  VALUE

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

      1 Diag Enabled          TRUE

      1 ADR Base              /u01/oracle

      1 ADR Home              /u01/oracle/diag/rdbms/orclbi/orclbi

      1 Diag Trace            /u01/oracle/diag/rdbms/orclbi/orclbi/trace

      1 Diag Alert            /u01/oracle/diag/rdbms/orclbi/orclbi/alert

      1 Diag Incident         /u01/oracle/diag/rdbms/orclbi/orclbi/incident

      1 Diag Cdump            /u01/oracle/diag/rdbms/orclbi/orclbi/cdump

      1 Health Monitor        /u01/oracle/diag/rdbms/orclbi/orclbi/hm

      1 Default Trace File    /u01/oracle/diag/rdbms/orclbi/orclbi/trace/orcl_ora_22769.trc

      1 Active Problem Count  8

      1 Active Incident Count 20

The following table describes some of the information displayed by this view.

Table 9-3 Data in the V$DIAG_INFO View

Name

Description

ADR Base

Path of ADR base

ADR Home

Path of ADR home for the current database instance

Diag Trace

Location of background process trace files, server process trace files, SQL trace files, and the text-formatted version of the alert log

Diag Alert

Location of the XML-formatted version of the alert log

Default Trace File

Path to the trace file for the current session

 

620.You are using the control file to maintain information about the database backups that are being performed by Recovery Manager (RMAN).Identify two scenarios is which you must have a recovery catalog. (Choose two.)

A. To store the backup information of multiple database

B. To restrict the amount of space that is used by the backups

C. To maintain a backup for a certain time is set by the CONTROL_FILE_RECORD_KEEP_TIME parameter.

D. To list the data files that were in a target database at a given time by using the AT option of REPORT SCHEMA command.

 

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2006.htm#RCMRF90281

 

题中意在比较控制文件和恢复目录,指出两个必须只用恢复目录的场景:

A,可以存储多个数据库的备份信息,恢复目录可以做到,控制文件只能记录一个数据库的备份信息

D,atClause:This subclause specifies a point in time as a time, SCN, or log sequence number. You must be connected to a recovery catalog when issuing a REPORT SCHEMAcommand with an AT clause.

atClause

This subclause specifies a point in time as a time, SCN, or log sequence number. You must be connected to a recovery catalog when issuing a REPORT SCHEMAcommand with an AT clause.

Syntax Element

Description

AT SCN integer

Specifies an SCN.

AT SEQUENCE integer

Specifies a log sequence number. The integer indicates the time when the specified log was first opened.

   THREAD integer

Specifies a redo THREAD number. The integer indicates the time when the thread was first opened.

AT TIME 'date_string'

Specifies a date (see Example 3-14). The NLS_LANG and NLS_DATE_FORMAT environment variables specify the format for the time.

 

 

621.You have enabled backup optimization for the RMAN environment. Identify two criteria on which RMAN will skip the file, if it has already been backed up. (Choose two.)

A. The data file backup is done with multiple channels

B. The data files is in the read-write mode after being backed up in the read only mode

C. The backup was taken after the data files was taken offline-normal or is in the read only mode

D. The data file backup complies with the back retention policy and the backup duplexing feture

 

 

Answer: CD

答案解析:

参考1:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckad.htm#BRADV89548

 

Example 10-1 Configuring Backup Optimization

CONFIGURE DEFAULT DEVICE TYPE TO sbt;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 4 DAYS;

With RMAN configured as shown in Example 10-1, you run the following command every night to back up the database to tape:

BACKUP DATABASE;

Because backup optimization is configured, RMAN skips backups of offline and read-only data files only if the most recent backups were made on or after the earliest point in the recovery window. RMAN does not skip backups when the most recent backups are older than the window. For example, optimization ensures you do not end up with a new backup of a read-only data file every night, so long as one backup set containing this file exists within the recovery window.

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta010.htm#RCMRF90093

 

BACKUP OPTIMIZATION
[ON | OFF | CLEAR]

Toggles backup optimization ON or OFF (default). Specify CLEAR to return optimization to its default value of OFF.

Backup optimization is enabled when all of the following conditions are met:

The CONFIGURE BACKUP OPTIMIZATION ON command has been run.

You run BACKUP DATABASEBACKUP ARCHIVELOG with the ALL or LIKE options, BACKUP BACKUPSET ALLBACKUP RECOVERY AREABACKUP RECOVERY FILES, or BACKUP DATAFILECOPY.

The RMAN job uses a channel of only one device type.

Optimization prevents RMAN from backing up a file to a device type if the identical file is already backed up on the device type. RMAN does not signal an error if backup optimization causes all files to be skipped during a backup. The backup retention policy affects which files backup optimization skips.

For two files to be identical, their content must be exactly the same, as described in Table 2-3. When you create backup pieces on disk or on media managed by Oracle Secure Backup, optimization excludes undo data from the backup when the data does not belong to an active transaction.

Note: BACKUP ... DELETE INPUT deletes all specified archived redo logs whether or not optimization skips these files during a backup.

Note: You can override backup optimization with the FORCE option of the BACKUP command.

See Also: Oracle Database Backup and Recovery User's Guide for a description of how RMAN determines that it can skip the backup of a file

 

Example 2-48 Optimizing Backups

This scenario illustrates the backup optimization behavior described in Table 2-3. Assume that backup optimization is disabled. At 9 a.m., you back up three copies of all existing archived redo log files to tape.

The BACKUP_TAPE_IO_SLAVES initialization parameter must be true when duplexing backups to tape.

BACKUP DEVICE TYPE sbt COPIES 3 ARCHIVELOG ALL;

At 11 a.m., you enable backup optimization:

CONFIGURE BACKUP OPTIMIZATION ON;

At noon, you run the following archived redo log backup:

BACKUP DEVICE TYPE sbt COPIES 2 ARCHIVELOG ALL;

 

Starting backup at 19-JAN-07

current log archived

using channel ORA_SBT_TAPE_1

skipping archived log file /d1/db1r_605ab325_1_34_612112605.arc; already backed up 3 time(s)

skipping archived log file /d1/db1r_605ab325_1_35_612112605.arc; already backed up 3 time(s)

skipping archived log file /d1/db1r_605ab325_1_36_612112605.arc; already backed up 3 time(s)

skipping archived log file /d1/db1r_605ab325_1_37_612112605.arc; already backed up 3 time(s)

skipping archived log file /d1/db1r_605ab325_1_38_612112605.arc; already backed up 3 time(s)

skipping archived log file /d1/db1r_605ab325_1_39_612112605.arc; already backed up 3 time(s)

channel ORA_SBT_TAPE_1: starting archived log backup set

channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=40 RECID=170 STAMP=612270506

channel ORA_SBT_TAPE_1: starting piece 1 at 19-JAN-07

channel ORA_SBT_TAPE_1: finished piece 1 at 19-JAN-07 with 2 copies and tag TAG20070119T110827

piece handle=2hi7t0db_1_1 comment=API Version 2.0,MMS Version 10.1.0.0

piece handle=2hi7t0db_1_2 comment=API Version 2.0,MMS Version 10.1.0.0

In this case, the BACKUP ... COPIES setting overrides the CONFIGURE ... COPIES setting, so RMAN sets n=2. RMAN skips the backup of a log only if at least two copies of the log exist on the sbt device. Because three copies of each log exist on sbt of all the logs generated on or before 9 a.m., RMAN skips the backups of these logs. However, RMAN backs up two copies of all logs generated after 9 a.m. because these logs have not yet been backed up to tape.

 

622.You need to maintain a record of all transactions on some tables for at least three years. Automatic undo management is enabled for the database.What must you do accomplish this task?

A. Enable supplemental logging for the database.

B. Specify undo retention guarantee for the database

C. Create Flashback Data Archive in the tablespace where the tables are stored.

D. Create Flashback Data Archive and enable Flashback Data Archive for specific tables

 

 

Answer: D

答案解析:

题意是在一些表保存最近三年的所有事务的记录,可以用闪回数据归档实现。

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

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

 

623.You issued the following commands to configure setting in RMAN;

RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 1;

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

Then you issued the following command to take the backup:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Which statement is true about the execution of the above command?

A. The backup will terminate because the FORMAT clause was not configured for the channel

B. It backs up two copies of data files to tape and disk, and two copies of archived log file on tape

C. It backs up the data files and archived log files to disk, making two copies of each data file and archived log file

D. It backs up the data files and archived log files to tape, making two copies of each data file and archived log file

 

 

Answer: D

答案解析:

根据如上的配置来执行BACKUP DATABASE PLUS ARCHIVELOG,备份数据库文件和归档日志文件。D的描述正确。

 

题中配置默认备份到磁带,BACKUP DATABASE PLUS ARCHIVELOG是把数据文件和归档日志都备份到磁带。

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt TO 2;两个数据文件副本备份到磁带

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 2;两个归档日志文件备份到磁带。

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;因为之前配置的默认的是备份到磁带,故这个配置没起作用。

 

624.You work with a newly created database. Presently, there is no application load on the database instance. You want to create a baseline for tuning the application, so you decide to collect recommendations that can be implemented to improve application performance.

What action must you take to achieve this?

A. Run Segment Advisor

B. Run the SQL Tuning Advisor (STA)

C. Run the Automatic Workload Repository (AWR) report

D. Run the SQL Access Advisor with a hypothetical workload

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF94877

段指导:将估算未来的空间需求, 以便确定对象是否具有可释放的未用空间。估计的未来空间是根据历史趋势计算出来的。

 

SQL访问指导:评估 SQL 的全部工作量, 并建议索引, 分区和实体化视图, 它们将改善 SQL 工作量的总体性能。

SQL 访问指导将输入实际工作量,或者根据方案导出一个假想工作量。

假想工作量,根据维模型生成一个可能工作量。在初次设计系统时,这个选项比较有用

对于指定的工作量,SQL 访问指导随后会执行以下操作:

• 同时考虑索引解决方案、实体化视图解决方案、分区解决方案或者全部三个解决方案的组合

• 考虑存储的创建和维护成本

• 不为部分工作量生成删除建议案

• 优化实体化视图以最大化查询重写使用率和快速刷新

• 建议用于快速刷新的实体化视图日志

• 建议对表、索引和实体化视图进行分区

• 将类似的索引组合为单个索引

• 生成支持多个工作量查询的建议案

 

This section describes the four steps in generating a set of recommendations:

 

Create a task

Define the workload

Generate the recommendations

View and implement the recommendations

 

You can create a hypothetical workload from a schema by analyzing dimensions and constraints. For best results, provide a workload as a SQL tuning set. The DBMS_SQLTUNE package provides several helper functions that can create SQL tuning sets from common workload sources, such as the SQL cache, a user-defined workload stored in a table, and a hypothetical workload.

 


 

SQL优化指导:分析各个 SQL 语句, 并建议 SQL 概要文件, 统计信息, 索引和重构的 SQL 以改善 SQL 性能。

AWR报告:自动工作量资料档案库可存储用于性能优化的数据库统计信息。

 

 

625.Your database is running in ARCHIVELOG mode. One of the data files, USERDATA01.dbf, in the

USERS tablespace is damaged and you need to recover the file until the point of failure. The backup for the datafile is available. Which three files would be used in the user-managed recovery process performed by the database administrator (DBA)? (Choose Three)

A. Redo logs

B. Control file

C. The latest backup of only the damaged data file

D. The latest backup of all the data file in the USERS tablespace

E. Temporary files of temporary tablespace

F. Archive Logs since the latest backup to point of failure

 

 

Answer: ACF

 

答案解析:

对比507题:http://blog.csdn.net/rlhua/article/details/16943999

 

从以下实验看出,redo log是用来介质恢复用的。

the latest backup of only the damaged data file用来做转储用。

Archive Logs since the latest backup to point of failure应用归档日志恢复到故障点

这里要求选三个,从用排除法,DE是不需要用到的。

 

故正确答案为ACF

实验参考:

sys@TEST1107> !cat /u01/app/oracle/bak/hot_bak.sql

set echo off trimspool off heading off feedback off verify off time off

set pagesize 0 linesize 200

define bakdir='/u01/app/oracle/bak/hot_bak'

define bakscp='/u01/app/oracle/bak/hot_cmd.sql'

set serveroutput on

spool &bakscp

prompt alter system switch logfile;;

declare

        cursor cu_tablespace is

                select tablespace_name from dba_tablespaces

                where contents not like 'TEMP%'  and status='ONLINE';

        cursor cu_datafile(name varchar2) is

                select file_name from dba_data_files where tablespace_name=name;

begin

        for i in cu_tablespace loop

                dbms_output.put_line('alter tablespace '|| i.tablespace_name||' begin backup;');

                for j in cu_datafile(i.tablespace_name) loop

                        dbms_output.put_line('host cp '||j.file_name||' &bakdir');

                end loop;

                dbms_output.put_line('alter tablespace '|| i.tablespace_name||' end backup;');

        end loop;

        dbms_output.put_line('alter database backup controlfile to trace;');

        dbms_output.put_line('alter database backup controlfile to ''&bakdir/control01.ctl'';');

end;

/

 

spool off

@&bakscp

 

sys@TEST1107> @/u01/app/oracle/bak/hot_bak.sql

alter system switch logfile;

alter tablespace SYSTEM begin backup;

host cp /u01/app/oracle/oradata/test1107/system01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace SYSTEM end backup;

alter tablespace SYSAUX begin backup;

host cp /u01/app/oracle/oradata/test1107/sysaux01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace SYSAUX end backup;

alter tablespace UNDOTBS1 begin backup;

host cp /u01/app/oracle/oradata/test1107/undotbs01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace UNDOTBS1 end backup;

alter tablespace USERS begin backup;

host cp /u01/app/oracle/oradata/test1107/users01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace USERS end backup;

alter tablespace EXAMPLE begin backup;

host cp /u01/app/oracle/oradata/test1107/example01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace EXAMPLE end backup;

alter tablespace FLA_TBS1 begin backup;

host cp /u01/app/oracle/oradata/test1107/fla_tbs01.dbf /u01/app/oracle/bak/hot_bak

alter tablespace FLA_TBS1 end backup;

alter database backup controlfile to trace;

alter database backup controlfile to '/u01/app/oracle/bak/hot_bak/control01.ctl';

 

[oracle@rtest hot_bak]$ ls

control01.ctl  example01.dbf  fla_tbs01.dbf  sysaux01.dbf  system01.dbf  undotbs01.dbf  users01.dbf

 

删除数据文件

[oracle@rtest ~]$ rm /u01/app/oracle/oradata/test1107/users01.dbf

[oracle@rtest ~]$ ls /u01/app/oracle/oradata/test1107/users01.dbf

ls: /u01/app/oracle/oradata/test1107/users01.dbf: No such file or directory

 

模拟断电,重启,报错。

sys@TEST1107> shutdown abort;

ORACLE instance shut down.

sys@TEST1107> startup

ORACLE instance started.

Total System Global Area 1252663296 bytes

Fixed Size                  2227944 bytes

Variable Size            1006633240 bytes

Database Buffers          234881024 bytes

Redo Buffers                8921088 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

 

[oracle@rtest trace]$ tail -f alert_test1107.log

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Errors in file /u01/app/oracle/diag/rdbms/test1107/test1107/trace/test1107_ora_5648.trc:

ORA-01157: cannot identify/lock data file 4 - see DBWR trace file

ORA-01110: data file 4: '/u01/app/oracle/oradata/test1107/users01.dbf'

 

 

热备转储

[oracle@rtest ~]$ cp /u01/app/oracle/bak/hot_bak/users01.dbf /u01/app/oracle/oradata/test1107/users01.dbf

 

恢复,并打开数据库

sys@TEST1107> recover datafile 4;

Media recovery complete.

sys@TEST1107> alter database open;

Database altered.

 

 

ALTER DATABASE RECOVER  datafile 4  

Media Recovery Start

Serial Media Recovery started

Recovery of Online Redo Log: Thread 1 Group 2 Seq 149 Reading mem 0

  Mem# 0: /u01/app/oracle/oradata/test1107/redo02.log

  Mem# 1: /u01/app/oracle/oradata/test1107/redo02a.log

Media Recovery Complete (test1107)

Completed: ALTER DATABASE RECOVER  datafile 4  

Mon Nov 25 11:32:08 2013

alter database open

Beginning crash recovery of 1 threads

 parallel recovery started with 7 processes

Started redo scan

Mon Nov 25 11:32:20 2013

Completed redo scan

 read 366 KB redo, 178 data blocks need recovery

Started redo application at

 Thread 1: logseq 149, block 31395

Recovery of Online Redo Log: Thread 1 Group 2 Seq 149 Reading mem 0

  Mem# 0: /u01/app/oracle/oradata/test1107/redo02.log

  Mem# 1: /u01/app/oracle/oradata/test1107/redo02a.log

Completed redo application of 0.14MB

Completed crash recovery at

 Thread 1: logseq 149, block 32127, scn 3604684

 178 data blocks read, 178 data blocks written, 366 redo k-bytes read

Mon Nov 25 11:32:24 2013

LGWR: STARTING ARCH PROCESSES

Mon Nov 25 11:32:24 2013

ARC0 started with pid=27, OS id=7305 

ARC0: Archival started

LGWR: STARTING ARCH PROCESSES COMPLETE

ARC0: STARTING ARCH PROCESSES

Mon Nov 25 11:32:25 2013

ARC1 started with pid=28, OS id=7317 

Mon Nov 25 11:32:25 2013

ARC2 started with pid=29, OS id=7319 

ARC1: Archival started

ARC2: Archival started

Mon Nov 25 11:32:25 2013

ARC3 started with pid=30, OS id=7321 

ARC1: Becoming the 'no FAL' ARCH

ARC1: Becoming the 'no SRL' ARCH

ARC2: Becoming the heartbeat ARCH

Thread 1 advanced to log sequence 150 (thread open)

ARC3: Archival started

ARC0: STARTING ARCH PROCESSES COMPLETE

Thread 1 opened at log sequence 150

  Current log# 3 seq# 150 mem# 0: /u01/app/oracle/oradata/test1107/redo03a.log

  Current log# 3 seq# 150 mem# 1: /u01/app/oracle/oradata/test1107/redo03.log

Successful open of redo thread 1

Mon Nov 25 11:32:31 2013

MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set

Mon Nov 25 11:32:33 2013

SMON: enabling cache recovery

Mon Nov 25 11:32:37 2013

Archived Log entry 169 added for thread 1 sequence 149 ID 0x8b48e999 dest 1:

[5648] Successfully onlined Undo Tablespace 2.

Undo initialization finished serial:0 start:1028413304 end:1028413834 diff:530 (5 seconds)

Verifying file header compatibility for 11g tablespace encryption..

Verifying 11g file header compatibility for tablespace encryption completed

SMON: enabling tx recovery

Database Characterset is AL32UTF8

No Resource Manager plan active

Starting background process FBDA

Mon Nov 25 11:32:41 2013

FBDA started with pid=31, OS id=7378 

Mon Nov 25 11:32:42 2013

replication_dependency_tracking turned off (no async multimaster replication found)

Starting background process QMNC

Mon Nov 25 11:32:47 2013

QMNC started with pid=32, OS id=7382 

Mon Nov 25 11:32:52 2013

Completed: alter database open

Mon Nov 25 11:32:57 2013

Starting background process SMCO

Mon Nov 25 11:32:57 2013

SMCO started with pid=38, OS id=7418 

Mon Nov 25 11:33:01 2013

db_recovery_file_dest_size of 4122 MB is 34.02% used. This is a

user-specified limit on the amount of space that will be used by this

database for recovery-related files, and does not reflect the amount of

space available in the underlying filesystem or ASM diskgroup.

Mon Nov 25 11:33:04 2013

Starting background process CJQ0

Mon Nov 25 11:33:05 2013

CJQ0 started with pid=39, OS id=7436 

 

 

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

 

626.Which options must you configure while performing an automated Tablespace Point-in-Time Recovery (TSPITR) by using Recovery Manager (RMAN)?

A. New channels for restore and recovery tasks

B. New name for the data files of the tablespace

C. Auxiliary name for the data files of the tablespace

D. Auxiliary destinations for an auxiliary set of data files

 

 

Answer: D

答案解析:

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

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV380

执行完全自动执行的TSPITR

1. 配置在目标实例上执行TSPITR 所需的通道。

2. 使用AUXILIARY DESTINATION选项指定辅助目标。

RMAN> CONNECT TARGET

RMAN> RECOVER TABLESPACE users, example

> UNTIL TIME '2007-06-29:08:00:00'

> AUXILIARY DESTINATION

> '/u01/app/oracle/oradata/aux';

3. 备份恢复的表空间并使它们联机。

执行完全自动执行的TSPITR 时,还必须:

• 配置在目标实例上执行TSPITR 所需的任何通道

• 指定RMAN 用于数据文件辅助集和其它辅助实例文件的目标

在TSPITR 完成之后,备份恢复的表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的表空间的备份。


 

Performing Fully Automated RMAN TSPITR

In the default mode, RMAN bases as much of the configuration for TSPITR as possible on the target database. During TSPITR, the recovery set data files are written in their current locations on the target database . The same channel configurations for the target database are used on the auxiliary instance when restoring files from backup. Auxiliary set data files and other auxiliary instance files, however, are stored in the auxiliary destination.

Use the AUXILIARY DESTINATION parameter to set a location for RMAN to use for the auxiliary set data files. The auxiliary destination must be a location on disk with enough space to hold auxiliary set data files. Even if you use other techniques to rename some or all of the auxiliary set data files, specifying an AUXILIARY DESTINATION parameter provides a default location for auxiliary set data files for which names are not specified. TSPITR does not fail if you inadvertently omit some names of the auxiliary set data files.

Performing TSPITR on Two Tablespaces

RECOVER TABLESPACE users, tools

  UNTIL LOGSEQ 1300 THREAD 1

  AUXILIARY DESTINATION '/disk1/auxdest';

 

627.In Recovery Manager (RMAN), you are taking image copies of the data files of your production database and rolling them forward at regular intervals. You attempt to restart your database. After a regular maintenance task, you realize that one of the data files that belongs to the USERS tablespace is damaged and you need to recover the data file by using the image copy. Because a media failure caused the data file to be damaged, you want to place the data file in a different location while restoing the file. Which option must you consider for this task?

A. using only the RMAN SWITCH command to set the new location for the data file

B. placing the database in the MOUNT state for the restore and recovery operations.

C. using an RMAN RUN block with the SET NEWNAME and then the SWITCH command.

D. configuring two channels: one for the restore operation and the other for the recovery operation

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2020.htm#RCMRF90375

 

Example 3-56 Switching Data File File Names After a Restore to a New Location

Assume that a disk fails, forcing you to restore a data file to a new disk location. After starting RMAN and connecting to the database as TARGET, you can use the SET NEWNAME command to rename the data file, then RESTORE to restore the missing data file. You run SWITCH to point the control file to the new data file and then RECOVER. This example allocates both disk and tape channels.

RUN

{

  ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;

  ALLOCATE CHANNEL dev2 DEVICE TYPE sbt;

  SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";

  SET NEWNAME FOR DATAFILE '/disk1/oradata/prod/users01.dbf'

                        TO '/disk2/users01.dbf';

  RESTORE TABLESPACE users;

  SWITCH DATAFILE ALL;

  RECOVER TABLESPACE users;

  SQL "ALTER TABLESPACE users ONLINE";

}

 

 

628.The database is running in the ARCHIVELOG mode. It has three redo log groups with one member each. One of the redo log groups has become corrupted. You have issued the following command during the recovery of a damaged redo log file:

ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;

Which action should you perform immediately after using this command?

A. You should perform a log switch

B. You should make a backup of the database

C. You should switch the database to the NONARCHIVELOG mode

D. You should shut down the database instance and perform a complete database recovery

 

 

Answer: B

答案解析:

ALTER DATABASE CLEAR UNARCHIVED LOGFILE GROUP 3;只用此命令,清除了日志组3,没有了联机重做日志,以前的备份就失效了,所有应该重新备份数据库。

 

629.Which option is best practice for creating a recovery catalog owner in the catalog database?

A. Granting UNLIMITED QUOTA on the SYSTEM tablespace to the owner

B. Allocating the SYSTEM tablespace as the default tablespace and granting the SYSDBA privilege to the user

C. Creating a new tablespace, allocating this as the default, and granting UNLIMITED QUOTA on this tablespace to the user

D. Allocating the SYSAUX tablespace as the default tablespace and granting UNLIMITED QUOTA on this tablespace to the user

 

 

Answer: C

答案解析:

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

 

创建恢复目录所用的表空间,这将成为恢复目录所有者的默认表空间。

SQL> CREATE TABLESPACE rcat_ts DATAFILE SIZE 15M;

确定要在其中安装恢复目录方案的数据库。请务必考虑此数据库的备份和恢复过程。

恢复目录方案所需的空间量取决于恢复目录监视的数据库数。所需空间随每个数据库的归档重做日志文件数和备份数的增加而增加。如果使用RMAN 存储脚本,则必须分配这些脚本使用的空间。在恢复目录中注册的每个数据库的示例空间需求为15 MB。

 

• 创建恢复目录所有者。

• 授予RECOVERY_CATALOG_OWNER角色。

SQL> CREATE USER rcowner IDENTIFIED BY rcpass

2 TEMPORARY TABLESPACE temp

3 DEFAULT TABLESPACE rcat_ts

4 QUOTA UNLIMITED ON rcat_ts;

SQL> GRANT recovery_catalog_owner TO rcowner;

创建一个作为恢复目录所有者的用户。将此用户的默认表空间设置为你为恢复目录创建的表空间。请务必为该用户提供对该表空间的UNLIMITED限额。创建用户之后,请为其授予RECOVERY_CATALOG_OWNER角色。RECOVERY_CATALOG_OWNER角色提供恢复目录所有者的权限。该角色包含下列系统权限:ALTER SESSION、CREATE CLUSTER、

CREATE DATABASE LINK、CREATE PROCEDURE、CREATE SEQUENCE、CREATE

SESSION、CREATE SYNONYM、CREATE TABLE、CREATE TRIGGER、CREATE TYPE

和CREATE VIEW。

可以使用SQL 命令或Oracle Enterprise Manager 创建用户并授予角色。

 

630.Which two statements are true about encrypting RMAN backup? (Choose two.)

A. The transparent encryption of backups uses the encryption wallet

B. The database uses the same encryption key for every encrypted backup

C. The password encryption of backups only uses the password while creating and restoring backup

D. If transparent encryption is configured, you cannot use the SET ENCRYPTION BY PASSWORD

command to make password-protected backups.

 

 

Answer: AC

答案解析:

参考:加密备份:http://blog.csdn.net/rlhua/article/details/12312463

• 透明加密:使用wallet(默认)

• 口令加密:使用口令(无wallet)

• 双模式加密:

– 同时使用透明加密和口令加密模式

– 既可以使用透明模式也可以使用口令模式进行还原

加密备份

可使用以下三种方法之一对备份进行加密:

• 透明加密:此方法使用wallet,是默认模式。

• 口令加密:此加密方法依赖于口令,不需要配置wallet。若要还原,必须知道用于备份的口令

• 双模式加密:可同时使用透明加密和口令加密。若要还原,可使用透明模式或口令模式。

如果通常将备份还原到本地站点,但偶尔也会将备份传送到其它站点,则这种类型的加密十分有用。

 

631.View the Exhibit and examine the output of the query in different times when the following command runs in an RMAN sessions:

RMAN> BACKUP DATABASE FILESPERSET 2;

The database has seven data files. Why is the %_COMPLETE refreshed to 13.59 in the third output after reaching 88.77?

Exhibit:

 

A. Because the progress is reported for each data file

B. Because the progress is reported for each backup set

C. Because other RMAN sessions have issued the same BACKUP command

D. Because new data files have been added to the database while the RMAN backup is in progress

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtunin.htm#BRADV89862

 

Monitoring RMAN Job Progress with V$SESSION_LONGOPS

You can monitor the progress of backups and restore jobs by querying the view V$SESSION_LONGOPS. RMAN uses two types of rows in V$SESSION_LONGOPS: detail rows and aggregate rows.

Detail rows describe the files being processed by one job step, whereas aggregate rows describe the files processed by all job steps in an RMAN command. A job step is the creation or restoration of one backup set or data file copy. Detail rows are updated with every buffer that is read or written during the backup step, so their granularity of update is small. Aggregate rows are updated when each job step completes, so their granularity of update is large.

Table 22-2 describes the columns in V$SESSION_LONGOPS that are most relevant for RMAN. Typically, you view the detail rows rather than the aggregate rows to determine the progress of each backup set.

Table 22-2 Columns of V$SESSION_LONGOPS Relevant for RMAN

Column

Description for Detail Rows

SID

The server session ID corresponding to an RMAN channel

SERIAL#

The server session serial number. This value changes each time a server session is reused.

OPNAME

A text description of the row. Examples of details rows include RMAN: datafile copyRMAN: full datafile backup, and RMAN: fulldatafile restore.

Note: RMAN: aggregate input and RMAN: aggregate output are the only aggregate rows.

CONTEXT

For backup output rows, this value is 2. For all other rows except proxy copy (which does not update this column), the value is 1.

SOFAR

The meaning of this column depends on the type of operation described by this row:

For image copies, the number of blocks that have been read

For backup input rows, the number of blocks that have been read from the files being backed up

For backup output rows, the number of blocks that have been written to the backup piece

For restores, the number of blocks that have been processed to the files that are being restored in this one job step

For proxy copies, the number of files that have been copied

TOTALWORK

The meaning of this column depends on the type of operation described by this row:

For image copies, the total number of blocks in the file.

For backup input rows, the total number of blocks to be read from all files processed in this job step.

For backup output rows, the value is 0 because RMAN does not know how many blocks that it will write into any backup piece.

For restores, the total number of blocks in all files restored in this job step.

For proxy copies, the total number of files to be copied in this job step.

 

Each server session performing a backup or restore job reports its progress compared to the total work required for a job step. For example, if you restore the database with two channels, and each channel has two backup sets to restore (a total of four sets), then each server session reports its progress through a single backup set. When a set is completely restored, RMAN begins reporting progress on the next set to restore.

To monitor RMAN job progress:

Before starting the RMAN job, create a script file (called, for this example, longops) containing the following SQL statement:

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,

       ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"

FROM   V$SESSION_LONGOPS

WHERE  OPNAME LIKE 'RMAN%'

AND    OPNAME NOT LIKE '%aggregate%'

AND    TOTALWORK != 0

AND    SOFAR <> TOTALWORK;

Start RMAN and connect to the target database and recovery catalog (if used).

Start an RMAN job. For example, enter:

RMAN> RESTORE DATABASE;

While the RMAN job is running, start SQL*Plus and connect to the target database, and execute the longops script to check the progress of the RMAN job. If you repeat the query while the RMAN job progresses, then you see output such as the following:

SQL> @longops

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK %_COMPLETE

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

         8         19          1      10377      36617      28.34

 

SQL> @longops

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK % COMPLETE

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

         8         19          1      21513      36617      58.75

 

SQL> @longops

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK % COMPLETE

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

         8         19          1      29641      36617      80.95

 

SQL> @longops

       SID    SERIAL#    CONTEXT      SOFAR  TOTALWORK % COMPLETE

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

         8         19          1      35849      36617       97.9

 

SQL> @longops

no rows selected

If you run the longops script at intervals of 2 minutes or more and the %_COMPLETE column does not increase, then RMAN is encountering a problem. See"Monitoring RMAN Interaction with the Media Manager" to obtain more information.

If you frequently monitor the execution of long-running tasks, then you could create a shell script or batch file under your host operating system that runs SQL*Plus to execute this query repeatedly.

 

 

FILESPERSET integer

Specifies the maximum number of input files to include in each output backup set. This parameter is only relevant when BACKUP generates backup sets.

RMAN backs up the files in each backupSpec as one or more backup sets. When the number of files in eachbackupSpec exceeds the FILESPERSET setting, then RMAN splits the files into multiple backup sets accordingly. The default value for FILESPERSET is 64.

The RMAN behavior is illustrated by the following BACKUP commands:

BACKUP AS BACKUPSET (DATAFILE 3, 4, 5, 6, 7) (DATAFILE 8, 9);

BACKUP AS BACKUPSET DATAFILE 3, 4, 5, 6, 7, 8, 9;

BACKUP AS BACKUPSET DATAFILE 3, ... 72;

In the first command, RMAN places data files 3, 4, 5, 6, and 7 into one backup set and data files 8 and 9 into another backup set. In the second command, RMAN places all data files into one backup set. In the third command, the ellipses indicate data files 3 through 72. Because in this case RMAN is backing up 70 data files, RMAN places 64 files in one backup set and 6 in another.

By default, RMAN divides files among backup sets to make optimal use of channel resources. The number of files to be backed up is divided by the number of channels. If the result is less than 64, then this number is theFILESPERSET value. Otherwise, FILESPERSET defaults to 64.

Note: You cannot specify the number of backup pieces that are in a backup set.

 

632.Note the following parameter settings: Which setting is NOT allowed?

 

A. ALTER SYSTEM SET DB_CACHE_SIZE=50M;

B. ALTER SYSTEM SET DB_8K_CACHE_SIZE=10M;

C. ALTER SYSTEM SET DB_4K_CACHE_SIZE=10M;

D. ALTER SYSTEM SET DB_16K_CACHE_SIZE=10M;

 

 

Answer: B

答案解析:

根据db_block_size=8192可知,该数据库的标准块是8k,且不能改变标准块的大小。

sys@TEST1107> ALTER SYSTEM SET DB_8K_CACHE_SIZE=10M;

ALTER SYSTEM SET DB_8K_CACHE_SIZE=10M

*

ERROR at line 1:

ORA-32017: failure in updating SPFILE

ORA-00380: cannot specify db_8k_cache_size since 8K is the standard block size

 

 sys@TEST1107> ALTER SYSTEM SET DB_CACHE_SIZE=50M;

 

System altered.

 

sys@TEST1107> ALTER SYSTEM SET DB_4K_CACHE_SIZE=10M;

 

System altered.

 

sys@TEST1107> ALTER SYSTEM SET DB_16K_CACHE_SIZE=10M;

 

System altered.

 

633.Which three statements must be true before transporting a tablespace from a database on one platform to a database on another platform? (Choose three.)

A. Both source and target database must be the same character set

B. Both source and target database must have the same endian format

C. The COMPATIBLE parameter must be the same in the source and target databases.

D. The minimum compatibility level for both the source and target database must be 10.0.0.

E. All read-only and offline data files that belong to the tablespace to be transported must be platform aware.

 

 

Answer: ABD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN11396

To import a transportable tablespace set into an Oracle database on a different platform, both databases must have compatibility set to at least 10.0.0. 

Table 14-1 Minimum Compatibility Requirements

Transport Scenario

Minimum Compatibility Setting

Source Database

Destination Database

Databases on the same platform

8.0

8.0

Tablespace with different database block size than the destination database

9.0

9.0

Databases on different platforms

10.0

10.0

 

The database character sets of the source and the target databases are the same.

 

If the source platform and the destination platform are of different endianness, then an additional step must be done on either the source or destination platform to convert the tablespace being transported to the destination format. If they are of the same endianness, then no conversion is necessary and tablespaces can be transported as if they were on the same platform.

Before a tablespace can be transported to a different platform, the data file header must identify the platform to which it belongs. In an Oracle Database with compatibility set to 10.0.0 or later, you can accomplish this by making the data file read/write at least once.

 

634.Your database instance is running. You are not able to access Oracle Enterprise Manager Database Control because the listener is not started.Which tool or utility would you use to start the listener?

A. Oracle Net Manager

B. Listener Control utility

C. Database Configuration Assistant

D. Oracle Net Configuration Assistant

 

 

Answer: B

 

答案解析:

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

启动监听使用lsnrctl start就可以了

使用监听程序控制实用程序可控制监听程序。使用lsnrctl,可以:

• 启动监听程序

• 停止监听程序

• 检查监听程序的状态

• 根据配置文件参数重新初始化监听程序

• 动态配置多个监听程序

• 更改监听程序口令

该实用程序的基本命令语法为:

LSNRCTL> command [listener_name]

发出lsnrctl命令时,如果没有指定其它监听程序名称或执行SET CURRENT_LISTENER命令,此命令将作用于默认的监听程序(名为LISTENER)。如果监听程序名为LISTENER,则可省略listener_name参数。

 

635.While Monitoring the space usage in your database that is in ARCHIVELOG mode you observed that the flash recovery area does not have enough free space to accommodate any more files and you do not have necessary permissions to add more space to it. Identify the two events that can occur in the event of a log switch? (Choose two.)

A. An entry is created in the alert log file and the database instance continues to function normally

B. The log switch hangs occur for transactions until free space is available in the flash recovery area

C. The Oracle database server deletes a file that is on the obsolete file list to make free space in the flash recovery area

D. The database instance status is implicitly changed to RESTRICTED mode and file creations to the flash recovery area are prevented

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10897/backrest.htm#ADMQS09211

题问:FRA空间满的情况下,并且你没有权限去扩充空间。此时数据库为归档模式,一般情况,归档日志是放在FRA中,如果FRA空间满,则在日志切换发生归档时,该事务会hang住,另外,在FRA空间满的情况下,数据库服务器会根据备份保留策略来删除过期的备份,已释放更多的空间。

 

636.Identify the persistent configuration setting for the target database that can be set for the backup by using RMAN. (Choose all that apply.)

A. Backup retention policy

B. Default backup device type

C. Default destinations for backups

D. Multiple backup device types for single backup

E. Default section size for backups

 

 

Answer: ABC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV89399

 

 

Showing and Clearing Persistent RMAN Configurations

You can use the SHOW command to display the current value of RMAN configured settings for the target database. You can also view whether these commands are currently set to their default values.

To view or change your CONFIGURE command settings:

Start RMAN and connect to a target database and a recovery catalog (if used).

Run the RMAN SHOW command.

For example, run SHOW ALL as shown in Example 5-1 (sample output included). The output includes both parameters that you have changed and those that are set to the default. The configuration is displayed as the series of RMAN commands required to re-create the configuration. You can save the output in a text file and use this command file to re-create the configuration on the same or a different database.

Example 5-1 SHOW ALL Command

SHOW ALL;

 

RMAN configuration parameters for database with db_unique_name PROD1 are:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_DEVICE=tape1)';

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/disk1/oracle/dbs/snapcf_ev.f'; # default

You can also use the SHOW command with the name of a particular configuration. For example, you can view the retention policy and default device type as follows:

SHOW RETENTION POLICY;

SHOW DEFAULT DEVICE TYPE;

Optionally, use the CONFIGURE ... CLEAR command to return any configuration to its default value, as shown in the following examples:

CONFIGURE BACKUP OPTIMIZATION CLEAR;

CONFIGURE RETENTION POLICY CLEAR;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

 

637.Which three statements are true about windows? (Choose three.)

A. Only one window can be open at any given time

B. Consumer groups are associated with windows

C. Windows work with job classes to control resource allocation

D. The database service name must be provided during windows creation

E. Windows can automatically start job or change resource allocation among jobs for various time periods.

 

 

Answer: ACE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schedover.htm#ADMIN13083

 

Because only one window can be active at one time--A正确。

Windows work with job classes to control resource allocation. ----C正确。

You create windows to automatically start jobs or to change resource allocation among jobs during various time periods of the day, week, and so on. --E正确。

Windows

You typically create windows only when you are in the role of Scheduler administrator.

You create windows to automatically start jobs or to change resource allocation among jobs during various time periods of the day, week, and so on. A window is represented by an interval of time with a well-defined beginning and end, such as "from 12am-6am".

Windows work with job classes to control resource allocation. Each window specifies the resource plan to activate when the window opens (becomes active), and each job class specifies a resource consumer group or specifies a database service, which can map to a consumer group. A job that runs within a window, therefore, has resources allocated to it according to the consumer group of its job class and the resource plan of the window.

Figure 28-2 shows a workday that includes two windows. In this configuration, jobs belonging to the job class that links to Consumer Group 1 get more resources in the morning than in the afternoon. The opposite is true for jobs in the job class that links to Consumer Group 2.

Figure 28-2 Windows help define the resources that are allocated to jobs

 


Description of "Figure 28-2 Windows help define the resources that are allocated to jobs"

See Chapter 27, "Managing Resources with Oracle Database Resource Manager" for more information on resource plans and consumer groups.

You can assign a priority to each window. If windows overlap, the window with the highest priority is chosen over other windows with lower priorities. The Scheduler automatically opens and closes windows as window start times and end times come and go.

A job can name a window in its schedule_name attribute. The Scheduler then starts the job when the window opens. If a window is already open, and a new job is created that points to that window, the new job does not start until the next time the window opens.

 

Overlapping Windows

Although Oracle does not recommend it, windows can overlap.

Because only one window can be active at one time, the following rules are used to determine which window is active when windows overlap:

If windows of the same priority overlap, the window that is active will stay open. However, if the overlap is with a window of higher priority, the lower priority window will close and the window with the higher priority will open. Jobs currently running that had a schedule naming the low priority window may be stopped depending on the behavior you assigned when you created the job.

If, at the end of a window, there are multiple windows defined, the window with the highest priority opens. If all windows have the same priority, the window that has the highest percentage of time remaining opens.

An open window that is dropped automatically closes. At that point, the previous rule applies.

Whenever two windows overlap, an entry is written in the Scheduler log.

 

638.Which three statements are true about persistent configuration? (Choose three.)

A. A user cannot set privileges on the persistent lightweight jobs

B. Persistent lightweight jobs generate a large amount of metadata

C. It is possible to create fully self-contained persistent lightweight jobs

D. The use of a template is mandatory to create persistent lightweight jobs

E. Persistent lightweight jobs are useful when users need to create a large number of jobs in a short time

 

 

Answer: ADE

答案解析:

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

• 持久轻量作业在创建/删除时间方面有很大改进,因为它没有创建数据库对象的开销。每个轻量作业都是使用作业模板创建的,并作为程序进行存储。因为持久轻量作业在运行时要向磁盘写入状态信息,所以在执行时应该只有少量改进。持久轻量作业有多种限制:

- 用户无法设置对这些作业的权限,它们将从父作业模板中继承其权限。--A对

- 必须使用模板,无法创建完全自包含的持久轻量作业。---C错,D对

- 只有一些特定的作业属性是可设置的,如JOB_ARGUMENTS。

如果用户需要在非常短的时间内创建大量作业(每秒10 -100 个作业),并且有一组程序(作业模板)可供使用,则最适合使用轻量作业。--E对

 

639.You want to enable automatic PGA memory management in your database. Which setting is required to achieve this?

A. Set MEMORY_TARGET to zero

B. Set the STATISTICS_LEVEL parameter to BASIC

C. Set the WORKAREA_SIZE_POLICY parameter to MANUAL

D. Set the PGA_AGGREGATE_TARGET parameter to nonzero value

 

 

Answer: D

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#ADMIN11233

Using Automatic PGA Memory Management

By default, Oracle Database automatically and globally manages the total amount of memory dedicated to the instance PGA. You can control this amount by setting the initialization parameter PGA_AGGREGATE_TARGET. Oracle Database then tries to ensure that the total amount of PGA memory allocated across all database server processes and background processes never exceeds this target.

If you create your database with DBCA, you can specify a value for the total instance PGA. DBCA then sets the PGA_AGGREGATE_TARGET initialization parameters in the server parameter file (SPFILE) that it creates. If you do not specify the total instance PGA, DBCA chooses a reasonable default.

If you create the database with the CREATE DATABASE SQL statement and a text initialization parameter file, you can provide a value for PGA_AGGREGATE_TARGET. If you omit this parameter, the database chooses a default value.

With automatic PGA memory management, sizing of SQL work areas for all dedicated server sessions is automatic and all *_AREA_SIZE initialization parameters are ignored for these sessions. At any given time, the total amount of PGA memory available to active work areas on the instance is automatically derived from the parameter PGA_AGGREGATE_TARGET. This amount is set to the value of PGA_AGGREGATE_TARGET minus the PGA memory allocated for other purposes (for example, session memory). The resulting PGA memory is then allotted to individual active work areas based on their specific memory requirements.

There are dynamic performance views that provide PGA memory use statistics. Most of these statistics are enabled when PGA_AGGREGATE_TARGET is set.

 

 

 

640.Examine the parameter setting in your database:

 

Which statement is correct about the database?

A. Automatic memory management is disabled because PGA_AGGREGATE_TARGET and

SGA_TARGET are not set

B. The instance is started but the database will not be opened until PGA_AGGREGATE_TARGET and SGA_TARGET are set

C. The database is opened but users cannot perform transactions until PGA_AGGREGATE_TARGET

and SGA_TARGET are set

D. Automatic memory management is enabled and, as per policy, 60% of the memory for System Global Area (SGA) and 40% of the memory for Program Global Area (PGA) will be distributed at startup

 

 

Answer: D

答案解析:

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

 

因为Memory_target有设置有值,则启用AMM自动内存管理,使用动态内存管理时,SGA_TARGET和PGA_AGGREGATE_TARGET代表它们各自内存区域的最小设置,要让Oracle完全控制内存管理,这两个参数应该设置为0。

故只能选D。

 

641.Which three functions are performed by the SQL Tuning Advisor? (Choose three.)

A. Building the SQL profile

B. Recommending optimization of materialized views

C. Checking query objects for missing and stale statistics

D. Recommending bitmap, function-based, and B-tree indexes

E. Recommending restructuring SQL queries that are using bad plans

 

 

Answer: ACE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e40540/cncptdba.htm#CNCPT853

 

BD属于SQL Access Advisor

 

SQL Tuning Advisor

Automatic SQL tuning is exposed through SQL Tuning Advisor. SQL Tuning Advisor runs automatically during system maintenance windows as a maintenance task. During each automatic run, the advisor selects high-load SQL queries in the database and generates recommendations for tuning these queries.

SQL Tuning Advisor recommendations fall into the following categories:

Statistics analysis

SQL profiling

Access path analysis

SQL structure analysis

A SQL profile contains additional statistics specific to a SQL statement and enables the optimizer to generate a better execution plan. Essentially, a SQL profile is a method for analyzing a query. Both access path and SQL structure analysis are useful for tuning an application under development or a homegrown production application.

A principal benefit of SQL Tuning Advisor is that solutions come from the optimizer rather than external tools (see "Overview of the Optimizer"). Thus, tuning is performed by the database component that is responsible for the execution plans and SQL performance. The tuning process can consider past execution statistics of a SQL statement and customizes the optimizer settings for this statement.

 

642.In your production database, users report that they are unable to generate reports on an important table because it does not contain any data. While investigating the reason, you realize that another user executed the TRUNCATE TABLE command, which accidentally caused the data to be lost. Now you want to recover the lost data of the table without affecting objects in other schemas. Which method must you use to recover the lost data?

A. Complete Recovery with online redo log

B. Complete Recovery with archived redo log

C. Tablespace Point-in-Time Recovery (TSPITR)

D. Incomplete Recovery with system change number (SCN)

 

 

Answer: C

答案解析:

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

题问:因为执行了 TRUNCATE TABLE命令导致表中数据丢失,怎么恢复而不会影响别的schemas?

 

使用RMAN 自动表空间时间点恢复(TSPITR) 可将Oracle DB 中的一个或多个表空间快速恢复到以前的某个时间,而不会影响数据库中其它表空间和对象的状态。

 

643.View the Exhibit. You are creating a database by using Database Configuration Assistant (DBCA). You have chosen the File System option as the storage mechanism.What would be the result of choosing this option?

Exhibit:

 

A. Disk mirroring and striping would be done automatically

B. The database files would be managed by the operating system's file system

C. DBCA would not save the database files by using Optimal File Architecture (OFA)

D. The data files are automatically spread across all available storage devices to optimize performance and resource utilization

 

 

Answer: B

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e10897/install.htm#CHDFEFFF

 

File System—This default option creates database files that are managed by the file system of your operating system. You can specify the directory path where database files are to be stored. Oracle Database can create and manage the actual files.

 

644.View the Exhibit and examine the disk groups created at the time of migrating the database storage to Automatic Storage Management (ASM). Why does the FRA disk group initially have more free space even though both DATA and FRA disk groups are provided with the same size?

A. Because the FRA disk group will not support dynamic rebalancing

B. Because the FRA disk group is not configured to support mirroring

C. Because disks in the FRA disk group are not formatted at this stage

D. Because the FRA disk group will support only a single size of allocation unit

 

 

Answer: B

答案解析:

此题没有图,故猜想FRA采用外部冗余,DATA采用normal redundancy (mirroring)。

因此选B。

 

645.Which two statements are true about a job chain? (Choose two.)

A. A job chain can contain a nested chain of jobs.

B. The jobs in a job chain cannot have more than one dependency.

C. A job of the CHAIN type can be run using event-based or time-based schedules.

D. The jobs in a job chain can be executed only by using the events generated by the Scheduler

 

 

Answer: AC

答案解析:

 

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)

Another chain (a nested chain)

An event schedule, inline event, or file watcher

You define a step that points to a program or nested chain by using the DEFINE_CHAIN_STEP procedure. An example is the following, which adds two steps tomy_chain1:

BEGIN

  DBMS_SCHEDULER.DEFINE_CHAIN_STEP (

   chain_name      =>  'my_chain1',

   step_name       =>  'my_step1',

   program_name    =>  'my_program1');

  DBMS_SCHEDULER.DEFINE_CHAIN_STEP (

   chain_name      =>  'my_chain1',

   step_name       =>  'my_step2',

   program_name    =>  'my_chain2');

END;

/

 

参考:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_sched.htm#ARPLS72960

 

job_type

Job action type ('PLSQL_BLOCK', 'STORED_PROCEDURE', 'EXECUTABLE', or 'CHAIN')

 

repeat_interval

Inline time-based schedule

event_condition

Event condition for event-based jobs

 

646.View the exhibit and examine the TRANS table's storage information. After a massive delete

operation, you executed the following statement to shrink the TRANS table:

SQL> ALTER TABLE trans SHRINK SPACE CASCADE; Which statement describes the outcome of the command?

 

A. An error is produced.

B. The table and all related objects are compacted and the position of the high-water mark (HWM) for the table is adjusted

C. The table and related indexes are compacted but the position of the high-water mark (HWM) for the table remains unchanged

D. The unused space in the table is reclaimed and returned to the tablespace and the data manipulation language (DML) triggers on the table are fired during the shrinking process

 

 

Answer: B

答案解析:

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

 

使用SHRINK SPACE子句可以收缩段中的空间。如果指定了CASCADE,则收缩行为将级联到所有支持收缩操作的从属段,但实体化视图、LOB 索引和IOT(索引表)映射表例外。

 

 

647.You executed the following commands in a database session:

 

 

What could have caused the recycle bin to clean up?

A. There is demand for space from the new table

B. The undo tablespace does not have sufficient free space

C. The new table name is the same as the table name in the recycle bin

D. The temporary tablespace that is assigned to you does not have sufficient free space

 

 

Answer: A

 

7.4.6 Recycle Bin Capacity and Space Pressure

There is no fixed amount of space preallocated for the recycle bin. Therefore, there is no guaranteed minimum amount of time during which a dropped object will remain in the recycle bin.

The rules that govern how long an object is retained in the recycle bin and how and when space is reclaimed are explained in this section.

7.4.6.1 Understanding Space Pressure

Dropped objects are kept in the recycle bin until such time as no new extents can be allocated in the tablespace to which the objects belong without growing the tablespace. This condition is referred to as space pressure. Space pressure can also arise due to user quotas defined for a particular tablespace. A tablespace may have free space, but the user may have exhausted his or her quota on it.

Oracle never automatically reclaims space or overwrites objects in the recycle bin unless forced to do so in response to space pressure.

7.4.6.2 How the Database Responds to Space Pressure

When space pressure arises, the database selects objects for automatic purging from the recycle bin. Objects are selected for purging on a first-in, first-out basis, that is, the first objects dropped are the first selected for purging.

Actual purging of objects is done only as needed to meet ongoing space pressure, that is, the databases purges the minimum possible number of objects selected for purging to meet immediate needs for space. This policy serves two purposes:

It minimizes the performance penalty on transactions that encounter space pressure, by not performing more purge operations than are required;

It maximizes the length of time objects remain in the recycle bin, by leaving them there until space is needed.

Dependent objects such as indexes on a table are selected for purging before the associated table (or other required segment).

If space pressure is due to an individual user's quota on a tablespace being exhausted, the recycle bin purges objects belonging to the tablespace which count against that user's space quotas.

For AUTO EXTEND-able tablespaces, objects are purged from the recycle bin to reclaim space before datafiles are extended.

7.4.6.3 Recycle Bin Objects and Segments

The recycle bin operates at the object level, in terms of tables, indexes, and so on. An object may have multiple segments associated with it, such as partitioned tables, partitioned indexes, lob segments, nested tables, and so on. Because the database reclaims only the segments needed to immediately satisfy space pressure, it can happen that some but not all segments of an object are reclaimed. When this happens, any segments of the object not reclaimed immediately are marked as temporary segments. These temporary segments are the first candidates to be reclaimed the next time space pressure arises.

In such a case, the partially-reclaimed object can no longer be removed from the recycle bin with Flashback Drop. (For example, if one partition of a partitioned table is reclaimed, the table can no longer be the object of a Flashback Drop.)

 

648.Note the following statements that use flashback technology:

1. FLASHBACK TABLE <table> TO SCN <scn>;

2. SELECT * FROM <table> AS OF SCN 123456;

3. FLASHBACK TABLE <table> TO BEFORE DROP;

4. FLASHBACK DATABASE TO TIMESTAMP <timestamp>;

5. SELECT * FROM <table> VERSIONS AS OF SCN 123456 AND 123999;

Which of these statements will be dependent on the availability of relevant undo data in the undo segment?

A. 1, 2, and 5

B. 1, 3, and 4

C. 2, 3, 4, and 5

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

 

 

Answer: A

 答案解析:

参考:闪回数据库:http://blog.csdn.net/rlhua/article/details/12421005

闪回表和闪回版本查询:http://blog.csdn.net/rlhua/article/details/12404577

闪回删除:http://blog.csdn.net/rlhua/article/details/12407737

1.闪回表原理是还原数据。

2.闪回查询是还原数据。

3.闪回删除是回收站原理。

4.闪回数据库是基于闪回日志。

5.闪回版本查询是基于还原数据。

所以基于还原数据的是125.

 

649.Examine the CREATE DISKGROUP command used to create a disk group:

SQL> CREATE DISKGROUP misc EXTERNAL REDUNDANCY

DISK 'ORCL: FRA3' NAME misc1, 'ORCL: FRA4' NAME misc2;

In which situation would you use this method of disk group creation?

A. When two-way disk mirroring is required for the allocation units

B. When three-way disk mirroring is required for the allocation units

C. When using hardware mirroring or RAID

D. When disk mirroring is required for the Automatic Storage Management (ASM) disks

 

 

Answer: C

答案解析:

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

CREATE DISKGROUP语句,该语句的语法如下: 

CREATE DISKGROUP diskgroup_name 

  [ { HIGH | NORMAL | EXTERNAL } REDUNDANCY ] 

  [ FAILGROUP failgroup_name ] 

  DISK [ NAME disk_name ] [ SIZE size_clause ] [ FORCE | NOFORCE ] ...; 

•首先要指定的就是磁盘组名称(diskgroup_name);  

•指定冗余度,有三个选择:HIGH(高度冗余>三路)、NORMAL(标准冗余--双路)和EXTERNAL(外部存储冗余);   

•选择是否指定FAILGROUP(如果选择非external则必须指定);   

•指定该磁盘组中的成员(对应的LUN),在指定成员时一般ASM能够自动检测出磁盘的容量,不过如果DBA基于某些方面的考虑,希望限制ASM使用的空间的话,也可以在指定成员过程中,顺便指定大小(只要指定的大小不超出磁盘实际容量),在添加成员时,ASM也会自动检查磁盘头以确定该磁盘是否被加入到其它的磁盘组中,当发现该盘已加入其它磁盘组的话,你可以通过FORCE选项来强制修改该盘所属磁盘组。 

 

REDUNDANCY Clause

The REDUNDANCY clause lets you specify the redundancy level of the disk group.

NORMAL REDUNDANCY requires the existence of at least two failure groups (see the FAILGROUP clause that follows). Oracle ASM provides redundancy for all files in the disk group according to the attributes specified in the disk group templates. NORMAL REDUNDANCY disk groups can tolerate the loss of one group. 

NORMAL REDUNDANCY is the default if you omit the REDUNDANCY clause. Therefore, if you omit this clause, you must create at least two failure groups, or the create operation will fail.

HIGH REDUNDANCY requires the existence of at least three failure groups. Oracle ASM fixes mirroring at 3-way mirroring, with each extent getting two mirrored copies. HIGH REDUNDANCY disk groups can tolerate the loss of two failure groups.

EXTERNAL REDUNDANCY indicates that Oracle ASM does not provide any redundancy for the disk group. The disks within the disk group must provide redundancy (for example, using a storage array), or you must be willing to tolerate loss of the disk group if a disk fails (for example, in a test environment). You cannot specify the FAILGROUP clause if you specify EXTERNAL REDUNDANCY.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_5008.htm#sthref4362

 

EXTERNAL REDUNDANCY即是ASM不会有故障组,需要自己提供别的冗余方式,如硬盘或者raid冗余
 

 

650.Which three tasks can be performed using a duplicate database? (Choose three.)

A. Testing the backup and recovery procedures

B. Testing the upgrade of an Oracle database to a new release

C. Testing the effect of an application changes on database performance

D. Continuously updating archive log files from the target database to support failover

 

 

Answer: ABC

 答案解析:

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

副本数据库是目标数据库的副本,它具有一个新的唯一数据库标识符(DBID)。通过独立运行副本数据库(不依赖目标数据库)可执行以下任务:

• 测试备份和恢复过程。

•测试升级到新版本的Oracle数据库。
•测试应用程序的变化对数据库性能的影响。

• 创建包含副本数据库中对象的导出文件并将这些对象导入生产数据库,恢复不小心从目标数据库中删除的对象。

 

651.The user SYS creates a job by using the following command:

 

Which two statements are true about the job that was created by the preceding command? (Choose two.)

A. The job is enabled by default after creation

B. The job is automatically dropped after the end date

C. The job executes with the privileges of the user SYS

D. The globalization environment that exists at the time of the job creation prevails at the job runs

 

 

Answer: BC

答案解析:

By default, jobs are created with auto_drop set to TRUE. f auto_drop is TRUE, the job is dropped.--B正确。

Jobs are created as disabled by default. --A错误

 

repeat_interval

This attribute specifies how often the job repeats. You can specify the repeat interval by using calendaring or PL/SQL expressions.

The expression specified is evaluated to determine the next time the job should run. If repeat_interval is not specified, the job runs only once at the specified start date.

 

end_date

This attribute specifies the date and time after which the job expires and is no longer run. After the end_date, if auto_drop is TRUE, the job is dropped. If auto_drop is FALSE, the job is disabled and the STATE of the job is set to COMPLETED.

If no value for end_date is specified, the job repeats forever unless max_runs or max_failures is set, in which case the job stops when either value is reached.

The value for end_date must be after the value for start_date. If it is not, an error is generated when the job is enabled.

 

auto_drop

This flag, if TRUE, causes a job to be automatically dropped after it has completed or has been automatically disabled. A job is considered completed if:

Its end date (or the end date of the job schedule) has passed.

It has run max_runs number of times. max_runs must be set with SET_ATTRIBUTE.

It is not a repeating job and has run once.

A job is disabled when it has failed max_failures times. max_failures is also set with SET_ATTRIBUTE.

If this flag is set to FALSE, the jobs are not dropped and their metadata is kept until the job is explicitly dropped with the DROP_JOBprocedure.

By default, jobs are created with auto_drop set to TRUE.

 

Usage Notes

Jobs are created as disabled by default. You must explicitly enable them so that they will become active and scheduled. Before enabling a job, ensure that all program arguments, if any, are defined, either by defining default values in the program object or by supplying values with the job.

The JOB_QUEUE_PROCESSES initialization parameter specifies the maximum number of processes that can be created for the execution of jobs. Beginning with Oracle Database 11g Release 2 (11.2), JOB_QUEUE_PROCESSES applies to DBMS_SCHEDULER jobs. Setting this parameter to 0 disables DBMS_SCHEDULER jobs.

To create a job in your own schema, you need to have the CREATE JOB privilege. A user with the CREATE ANY JOB privilege can create a job in any schema. If the job being created will reside in another schema, the job name must be qualified with the schema name. For a job of type EXECUTABLE (or for a job that points to a program of type EXECUTABLE), the job owner must have the CREATE EXTERNAL JOB system privilege before the job can be enabled or run.

Associating a job with a particular class or program requires EXECUTE privileges for that class or program.

Not all possible job attributes can be set with CREATE_JOB. Some must be set after the job is created. For example, job arguments must be set with theSET_JOB_ARGUMENT_VALUE Procedure or the SET_JOB_ANYDATA_VALUE Procedure. Other job attributes, such as job_priority and max_runs, are set with the SET_ATTRIBUTE Procedure.

To create multiple jobs efficiently, use the CREATE_JOBS procedure.

 

652.Tape streaming is not happening while performing RMAN tape backup. On investigation, you find that it is not because of the incremental backup or the empty file backup and that RMAN is sending data blocks to the tape drive fast enough. What could be a solution to make tape streaming happen during the backup?

A. Configure backup optimization

B. Configure the channel to increase MAXOPENFILES

C. Configure the channel to increase the capacity with the RATE parameter

D. Configure the channel to adjust the tape buffer size with the BLKSIZE option

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtunin.htm#BRADV90070

RATE Channel Parameter

In the ALLOCATE and CONFIGURE CHANNEL commands, the RATE parameter specifies the bytes per second that are read on a channel. You can use this parameter to set an upper limit for bytes read so that RMAN does not consume excessive disk bandwidth and degrade online performance. Essentially, RATE serves as a backup throttle. For example, if you set RATE 1500K, and if each disk drive delivers 3 megabytes per second, then the channel leaves some disk bandwidth available to the online system.

 

653.View the Exhibits: Exhibit 1 and Exhibit 2 Both processes use an existing job template PROG_1. The time taken by the jobs are recorded in the TEST_LOG table. It was observed that the job creation process in exhibit 1 takes less time than in exhibit 2. What is the reason for this? Exhibit:

 

A.It creates less metadata for jobs

B.It creates jobs temporarily in memory only

C.It writes the jobs metadata to disk in compressed format

D.It updates tables in SYSTEM tablespace instead of creating new tables

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schedover.htm#ADMIN13368

从Exhibit #1中job_style=>'lightweight'可知,此作业是轻量型作业。

Lightweight Jobs

Use lightweight jobs when you have many short-duration jobs that run frequently. Under certain circumstances, using lightweight jobs can deliver a small performance gain.

Lightweight jobs have the following characteristics:

Unlike regular jobs, they are not schema objects.

They have significantly better create and drop times over regular jobs because they do not have the overhead of creating a schema object.

They have lower average session create time than regular jobs.

They have a small footprint on disk for job metadata and run-time data.

You designate a lightweight job by setting the job_style job attribute to 'LIGHTWEIGHT'. The other job style is 'REGULAR', which is the default.

Like programs and schedules, regular jobs are schema objects. In releases before Oracle Database 11g Release 1, the only job style supported by the Scheduler was regular.

A regular job offers the maximum flexibility but does entail some overhead when it is created or dropped. The user has fine-grained control of the privileges on the job, and the job can have as its action a program or a stored procedure owned by another user.

If a relatively small number of jobs that run infrequently need to be created, then regular jobs are preferred over lightweight jobs.

A lightweight job must reference a program object (program) to specify a job action. The program must be already enabled when the lightweight job is created, and the program type must be either 'PLSQL_BLOCK' or 'STORED_PROCEDURE'. Because lightweight jobs are not schema objects, you cannot grant privileges on them. A lightweight job inherits privileges from its specified program. Thus, any user who has a certain set of privileges on the program has corresponding privileges on the lightweight job.

 

654.You are using Recovery Manager (RMAN) with a recovery catalog to back up your production

database. The backups and the archived redo log files are copied to a tape drive on a daily basis.

Because of media failure, you lost your production database completely along with the recovery catalog database. You want to recover the target database and make it functional. You consider performing the following steps to accomplish the task:

1) Restore an autobackup of the server parameter file.

2) Restore the control file

3) Start the target database instance

4) Mount the database

5) Restore the data files

6) Open the database with RESETLOGS option

7) Recover the data files

8) Set DBID for the target database

Which option illustrates the correct sequence that you must use?

A. 8, 1, 3, 2, 4, 5, 7, 6

B. 1, 8, 3, 4, 2, 5, 7, 6

C. 1, 3, 4, 2, 8, 5, 6, 7

D. 1, 3, 2, 4, 6, 5, 7, 8

 

 

Answer: A

答案解析:

参考:执行灾难恢复:http://blog.csdn.net/rlhua/article/details/12346829

灾难恢复包括在丢失了整个目标数据库、所有当前控制文件、所有联机重做日志文件、所有参数文件和恢复目录数据库(如果有)后还原和恢复目标数据库。

要执行灾难恢复,至少需要以下备份:

• 数据文件的备份

• 在备份之后生成的相应归档重做日志

• 至少一个控制文件自动备份

基本过程:

• 还原服务器参数文件的自动备份。

• 启动目标数据库实例。

• 从自动备份还原控制文件。

• 装载数据库。

• 还原数据文件。

• 恢复数据文件。

• 使用RESETLOGS选项打开数据库。

 

655.Examine the following ALTER command:

SQL> ALTER DISKGROUP dgroup1 UNDROP DISKS;

What is the purpose of the command?

A. It cancels all pending disk drops within the disk group.

B. It restores disks that are being dropped as the result of a DROP DISKGROUP operation

C. It mounts disks in the disk group for which the drop-disk operation has already been co pleted

D. It restores all the dropped disks in the disk group for which the drop-disk operation has already been completed

E. It adds previously dropped disks back into the disk group

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1007.htm#SQLRF55558

 undrop_disk_clause

Use this clause to cancel the drop of disks from the disk group. You can cancel the pending drop of all the disks in one or more disk groups (by specifyingdiskgroup_name) or of all the disks in all disk groups (by specifying ALL).

This clause is not relevant for disks that have already been completely dropped from the disk group or for disk groups that have been completely dropped. This clause results in a long-running operation. You can see the status of the operation by querying the V$ASM_OPERATION dynamic performance view.

 

Undropping a Disk from a Disk Group: Example To cancel the drop of disks from a disk group, dgroup_01, issue the following statement:

ALTER DISKGROUP dgroup_01

  UNDROP DISKS;

 

656.The BACKUP_TAPE_IO_SLAVES parameter is set to FALSE for the database instance. Which statement is true while performing a tape backup in an RMAN session?

A. The tape I/O performed is asynchronous

B. The tape buffer is allocated from the System Global Area (SGA)

C. The tape buffer is allocated from the Program Global Area (PGA)

D. Oracle I/O uses an interrupt mechanism to determine when each I/O completes

 

 

Answer: C

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtunin.htm#BRADV90074

sys@TEST0910> show parameter BACKUP_TAPE_IO_SLAVES

 

NAME                                 TYPE        VALUE

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

backup_tape_io_slaves                boolean     FALSE

 

BACKUP_TAPE_IO_SLAVES specifies whether I/O server processes (also called slaves) are used by Recovery Manager to back up, copy, or restore data to tape. When the value is set to true, Oracle uses an I/O server process to write to or read from a tape device. When the value is set to false (the default), Oracle does not use I/O server process for backups. Instead, the shadow process engaged in the backup accesses the tape device.

Note:

You cannot perform duplexed backups unless you enable this parameter. Otherwise, Oracle returns an error. When this parameter is enabled, Recovery Manager will configure as many server processes as needed for the number of backup copies requested.

Tape I/O Slaves

RMAN allocates the tape buffers in the System Global Area (SGA) or the Program Global Area (PGA), depending on whether I/O slaves are used. If you set the initialization parameter BACKUP_TAPE_IO_SLAVES=true, then RMAN allocates tape buffers from the SGA. Tape devices can only be accessed by one process at a time, so RMAN starts as many slaves as necessary for the number of tape devices. If the LARGE_POOL_SIZE initialization parameter is also set, then RMAN allocates buffers from the large pool. If you set BACKUP_TAPE_IO_SLAVES=false, then RMAN allocates the buffers from the PGA.

If you use I/O slaves, then set the LARGE_POOL_SIZE initialization parameter to dedicate SGA memory to holding these large memory allocations. This parameter prevents RMAN I/O buffers from competing with the library cache for SGA memory. If I/O slaves for tape I/O were requested but there is not enough space in the SGA for them, slaves are not used, and a message appears in the alert log.

The parameter BACKUP_TAPE_IO_SLAVES specifies whether RMAN uses slave processes rather than the number of slave processes. Tape devices can only be accessed by one process at a time, and RMAN uses the number of slaves necessary for the number of tape devices.

 

657.The database is currently open and the temp03.dbf tempfile belonging to the default temporary tablespace TEMP has been corrupted. What steps should you take to recover from this tempfile loss in an efficient manner?

A. Allow the database to continue running, drop the TEMP tablespace, and then re-create it with new tempfiles

B. Shut down the database, restore and recover the tempfile from backup, and then open the database with RESETLOGS

C. Allow the database to continue running, take the TEMP tablespace offline, drop the missing tempfile, and then create a new tempfile

D. Allow the database to continue running, add a new tempfile to TEMP tablespace with a new name, and drop the tempfile that has been corrupted.

 

 

Answer: D

在11g中,如果删除临时文件,重启后会自动重新生成。

如果手动恢复,因为临时文件不会影响数据库的运行,所以可以直接添加一个新的临时,把损坏的drop掉。

 

658.Indentify two advantages of using recovery catalog instead of the control file of the database in Recovery Manager (RMAN). (Choose two.)

A. You can use RMAN stored scripts

B. Recovery is faster if data is stored in catalog in addition to the control file First Test,

C. You can store backup information of all registered databases in one place

D. Database backups are automatically deleted when they are older than the specified time period

 

 

Answer: AC

答案解析:

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

同503题:http://blog.csdn.net/rlhua/article/details/13277475

RMAN 资料档案库数据始终存储在目标数据库的控制文件中。此外,它也可以存储在一个名为“恢复目录”的单独数据库中。

恢复目录会在单独的数据库中保留备份信息,这在控制文件丢失时尤为有用。这样你可以存储更长的备份历史记录,比基于控制文件的资料档案库所存储的历史记录还要长。使用一个恢复目录可存储多个目标数据库的信息。恢复目录还可用来存放RMAN 存储脚本,这些脚本是RMAN 命令的序列。

如果你的备份管理要求很简单,则Oracle 建议你使用控制文件选项而不要使用恢复目录。拥有恢复目录意味着你需要管理并备份其它数据库。因此,只有在可利用恢复目录所提供的优点(如较长的备份保留时间)时,才使用恢复目录。

 

659.Which two commands never trigger an implicit rebalancing within the disk group?. (Choose two.)

A. ALTER DISKGROUP misc MOUNT;

B. ALTER DISKGROUP misc DROP DISK misc2;

C. ALTER DISKGROUP misc CHECK ALL NOREPAIR;

D. ALTER DISKGROUP misc RESIZE ALL SIZE 1023m;

E. ALTER DISKGROUP dgroupA ADD DISK '/devices/A*';

 

 

Answer: AC

只有改变磁盘组的大小才会促发重新平衡。故BDE会促发rebalance,AC不会。

 

660.You want to configure the Flashback Database feature and retain flashback logs for three days.Presently the database is open and configured in ARCHIVELOG mode.The following steps must be performed in the correct sequence to do this:

1. Set the retention target:

SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320;

2. Enable Flashback Database:

SQL> ALTER DATABASE FLASHBACK ON;

3. Mount the database:

SQL> STARTUP MOUNT EXCLUSIVE

4. Shutdown the instance:

SQL> SHUTDOWN IMMEDIATE

5. Open the database:

SQL> ALTER DATABASE OPEN;

Choose the correct sequence.

A. 4, 1, 3, 2, 5

B. 4, 3, 1, 2, 5

C. 2, 4, 3, 5, 1

D. 4, 2, 5, 3, 1

 

 

Answer: B

 

答案解析:

sys@TEST0910> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     1

Next log sequence to archive   3

Current log sequence           3

sys@TEST0910> shutdown immediate;                                                                                                          

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TEST0910> startup mount exclusive

ORACLE instance started.

 

Total System Global Area 2505338880 bytes

Fixed Size                  2230952 bytes

Variable Size             587203928 bytes

Database Buffers         1895825408 bytes

Redo Buffers               20078592 bytes

Database mounted.

sys@TEST0910> alter system set db_flashback_retention_target=4320;

 

System altered.

 

sys@TEST0910> alter database flashback on;

 

Database altered.

 

sys@TEST0910> alter database open;

 

Database altered.

 

 

To enable flashback logging:

Ensure the database instance is open or mounted. If the instance is mounted, then the database must be shut down cleanly unless it is a physical standby database. Other Oracle RAC instances can be in any mode.

Optionally, set the DB_FLASHBACK_RETENTION_TARGET to the length of the desired flashback window in minutes:

ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320; # 3 days

By default DB_FLASHBACK_RETENTION_TARGET is set to 1 day (1440 minutes).

Enable the Flashback Database feature for the whole database:

ALTER DATABASE FLASHBACK ON;

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/flashdb.htm#CFHEHEBA

 

 

661.View the Exhibit and examine the output. You execute the following RMAN command to perform the backup operation:

RMAN> RUN { ALLOCATE CHANNEL c1 DEVICE TYPE disk MAXOPENFILES 8;BACKUP DATABASE FILESPERSET 4; }What is the multiplexing level in the preceding backup process?

A. 4

B. 8

C. 7

D. 0

 

 

Answer: A

答案解析:

the level of multiplexing is simply the smallest number among FILESPERSET, MAXOPENFILES and total number of datafiles。

You can calculate the level of multiplexing as follows:
Multiplexing = Min (Min (DATAFILES,FILEPERSET) , MAXOPENFILES)

 

RMAN multiplexing is determined by several factors. For example, the FILESPERSET parameter of the BACKUP command determines how many datafiles to put in each backup set. The MAXOPENFILES parameter of ALLOCATE CHANNEL or CONFIGURE CHANNEL defines how many datafiles RMAN can read from simultaneously. The basic multiplexing algorithm is as follows:

Number of files in each backup set

This number is the minimum of the FILESPERSET setting and the number of files read by each channel. The FILESPERSET default is 64.

The level of multiplexing

This is the number of input files simultaneously read and then written into the same backup piece. The level of multiplexing is the minimum of MAXOPENFILES and the number of files in each backup set. The MAXOPENFILES default is 8.

Suppose that you back up 12 datafiles with one channel when FILEPERSET is set to 4. The level of multiplexing is the lesser of this number and 8. Thus, the channel simultaneously writes blocks from 4 datafiles into each backup piece.

Now suppose that you back up 50 datafiles with one channel. The number of files in each backup set is 50. The level of multiplexing is the lesser of this number and 8. Thus, the channel simultaneously writes blocks from 8 datafiles into each backup piece.

RMAN multiplexing of backup sets is different from media manager multiplexing. One type of media manager multiplexing occurs when the media manager writes the concurrent output from multiple RMAN channels to a single sequential device. Another type occurs when a backup mixes database files and non-database files on the same tape.

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#i1015964

 

662.To enable faster incremental backups, you enabled block change tracking for the database. Which two statements are true about the block change tracking file? (Choose two.)

A. Multiple change tracking files can be created for a database.

B. The change tracking file must be created after the first level 0 backup.

C. RMAN does not support backup and recovery of the change tracking file.

D. The database clears the change tracking file and starts tracking changes again, after whole database restore and recovery operations.

 

 

Answer: CD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#BRADV89534

Location of the Block Change Tracking File

One block change tracking file is created for the whole database. By default, the change tracking file is created as an Oracle managed file in the destination specified by the DB_CREATE_FILE_DEST initialization parameter. You can also place the change tracking file in any location that you choose, by specifying its name when enabling block change tracking. Oracle recommends against using a raw device (that is, a disk without a file system) as a change tracking file.

Note:

In an Oracle RAC environment, the change tracking file must be located on shared storage accessible from all nodes in the cluster.

RMAN does not support backup and recovery of the change tracking file. The database resets the change tracking file when it determines that the change tracking file is invalid. If you restore and recover the whole database or a subset, then the database resets the block change tracking file and starts tracking changes again. After you make a level 0 incremental backup, the next incremental backup can use change tracking data.



 

 

663.Which options would you consider while configuring a flash recovery area (fast recovery area in 11g Release 2) for your production database that is running in ARCHIVELOG mode? (Choose all that apply.)

A. Setting the FAST_START_MTTR_TARGET to set the mean time to recover

B. Setting the RECOVERY_PARALLELISM parameter to twice the number of CPUs

C. Using the DB_RECOVERY_FILE_DEST parameter to set the location for flash recovery area

D. Using the DB_RECOVERY_FILE_DEST_SIZE parameter to define the disk space limit for the

recovery files created in the flash recovery area

 

 

Answer: CD

答案解析:

即如果要配置flash recovery area (fast recovery area in 11g Release 2)

首先配置两个参数DB_RECOVERY_FILE_DEST和DB_RECOVERY_FILE_DEST_SIZE,指定flash recovery area 的目录以及大小

sys@TEST0924> show parameter recovery

 

NAME                                 TYPE                        VALUE

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

db_recovery_file_dest                string               /u01/app/oracle/fast_recovery_area

db_recovery_file_dest_size       big integer     4122M

recovery_parallelism                   integer            0

Specifying a Fast Recovery Area

The Fast Recovery Area is a location in which Oracle Database can store and manage files related to backup and recovery. It is distinct from the database area, which is a location for the current database files (data files, control files, and online redo logs).

You specify the Fast Recovery Area with the following initialization parameters:

DB_RECOVERY_FILE_DEST: Location of the Fast Recovery Area. This can be a directory, file system, or Automatic Storage Management (Oracle ASM) disk group. It cannot be a raw file system.

In an Oracle Real Application Clusters (Oracle RAC) environment, this location must be on a cluster file system, Oracle ASM disk group, or a shared directory configured through NFS.

DB_RECOVERY_FILE_DEST_SIZE: Specifies the maximum total bytes to be used by the Fast Recovery Area. This initialization parameter must be specified before DB_RECOVERY_FILE_DEST is enabled.

In an Oracle RAC environment, the settings for these two parameters must be the same on all instances.

You cannot enable these parameters if you have set values for the LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST parameters. You must disable those parameters before setting up the Fast Recovery Area. You can instead set values for the LOG_ARCHIVE_DEST_n parameters. The LOG_ARCHIVE_DEST_1 parameter is implicitly set to point to the Fast Recovery Area if a local archiving location has not been configured and LOG_ARCHIVE_DEST_1 value has not been set.

Oracle recommends using a Fast Recovery Area, because it can simplify backup and recovery operations for your database.

http://docs.oracle.com/cd/E11882_01/server.112/e25494/create.htm#sthref254

 

664.You want to take a complete database backup using RMAN. The backup should consist only the used blocks from your database.Which two statements are true about this backup operation? (Choose two.)

A. Backup compression should be enabled

B. Parallelism for the channel should be set to 2

C. All the files must be backed up as backup sets

D. The backup may be stored either on disk or on media with media manager

 

 

Answer: CD

答案解析:

排除法,AB选项,备份使用过的块,在备份时可以不用压缩,也可以不用设置为两个并行通道。

 

665.Which two statements are true about the Automatic Diagnostic Repository (ADR)? (Choose two.)

A. The ADR base keeps all diagnostic information in binary format

B. SQL*Plus provides the ADRI script, which can be used to work with ADR

C. The ADR can be used for problem diagnosis only when the database is open

D. The ADR can be disabled by settting the DIAGNOSTIC_DEST parameter to null

E. The ADR can be used for problem diagnosis even when the database instance is down

F. The ADR base is shared across multiple instances

 

 

Answer: EF

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#ADMIN11261

 

Structure, Contents, and Location of the Automatic Diagnostic Repository

The Automatic Diagnostic Repository (ADR) is a directory structure that is stored outside of the database. It is therefore available for problem diagnosis when the database is down.

Automatic Diagnostic Repository (ADR)

The ADR is a file-based repository for database diagnostic data such as traces, dumps, the alert log, health monitor reports, and more. It has a unified directory structure across multiple instances and multiple products. Beginning with Release 11g, the database, Oracle Automatic Storage Management (Oracle ASM), the listener, and other Oracle products or components store all diagnostic data in the ADR. Each instance of each product stores diagnostic data underneath its own home directory within the ADR. For example, in an Oracle Real Application Clusters environment with shared storage and Oracle ASM, each database instance and each Oracle ASM instance has an ADR home directory. ADR's unified directory structure, consistent diagnostic data formats across products and instances, and a unified set of tools enable customers and Oracle Support to correlate and analyze diagnostic data across multiple instances.

 

666.You are working in an online transaction processing (OLTP) environment. You use the

FLASHBACKTABLE command to flash back the CUSTOMERS table. Before executing the FLASHBACK TABLE command, the system change number (SCN) was 663571. After flashing back the CUSTOMERS table, you realize that the table is not in the correct state. Now, you need to reverse the effects of the FLASHBACK TABLE command. Which is the fastest and the most efficient option to reverse the effects of the FLASHBACK TABLE command?

A. Restore the backup control file and open the database with RESETLOGS option.

B. Perform point-in-time recovery because flashback cannot be performed again on this table

C. Execute the FLASHBACK DATABASE statement to retrieve the CUSTOMERS table as it was at SCN 663571

D. Execute another FLASHBACK TABLE statement to retrieve the CUSTOMERS table as it was at SCN 663571

 

 

Answer: D

答案解析:

参考:闪回表:http://blog.csdn.net/rlhua/article/details/12404577

 

可以再次使用闪回表返回之前的状态。

FLASHBACKTABLECUSTOMERS TOSCN 663571;

 

667.What does the DB_FLASHBACK_RETENTION_TARGET parameter configure?

A. An upper limit on how far you can flash back the database, depending on the information in the redo logs

B. An upper limit on how far you can flash back the database, depending on the information in the undo tablespace

C. The amount of time for which the flashback data is to be kept in the flash recovery area, provided that there is enough space

D. The amount of time for which the flashback data is guaranteed to be kept in the undo tablespace, provided that there is enough space

 

 

Answer: C

答案解析

默认值 1440分钟

改变:ALTER SYSTEM ... SID='*'

ys@TEST0910> show parameter DB_FLASHBACK_RETENTION_TARGET

 

NAME                                 TYPE        VALUE

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

db_flashback_retention_target        integer     1440

 

sys@TEST0910> alter system set DB_FLASHBACK_RETENTION_TARGET=1500;

 

System altered.

 

sys@TEST0910> show parameter DB_FLASHBACK_RETENTION_TARGET

 

NAME                                 TYPE        VALUE

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

db_flashback_retention_target        integer     1500

 

DB_FLASHBACK_RETENTION_TARGET specifies the upper limit (in minutes) on how far back in time the database may be flashed back. How far back one can flashback a database depends on how much flashback data Oracle has kept in the fast recovery area.

官方参考:http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams061.htm#sthref198

 

 

 

668.Examine the following RMAN script:

RMAN> run {

debug on;

allocate channel c1 type disk;

backup datafile 5;

}

Which statement describes the purpose of the script?

A. The data file is checked for physical corruption and backed up if found clean.

B. The backup of data file 5 is performed and the interactive messages during the backup are

suppressed.

C. The existing backup for the data file is checked and the backup is performed if there are changes in the data file after the last backup.

D. The backup of data file 5 is performed and all SQL statements that are executed during RMAN

compilation and their results are displayed

 

 

Answer: D

答案解析:

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

 

 DEBUG选项用于:

– 查看生成的PL/SQL

– 准确判断RMAN 命令在何处挂起或出错

• DEBUG选项是在RMAN 提示符下或者在run 块内指定的。

• DEBUG选项会创建大量输出,因此要将输出重定向到跟踪文件:

$ rman target / catalog rman/rman debug trace trace.log

 

DEBUG选项显示在RMAN 编译期间执行的全部SQL 语句以及执行结果。另外,还显示恢复目录PL/SQL 程序包生成的所有信息。以下示例中,在备份数据文件3 期间会写入DEBUG输出,但是在备份数据文件4 期间则不会:

RMAN> run {

debug on;

allocate channel c1 type disk;

backup datafile 3;

debug off;

backup datafile 4; }

记住,DEBUG输出可能非常大,所以请确保有足够的磁盘空间可供跟踪文件使用。

这个示例备份会话中没有生成任何错误,只创建了一个大约0.5 兆字节大小的跟踪文件:

$ rman target / catalog rman/rman debug trace sample.log

RMAN> backup database;

RMAN> host "ls –l sample.log";

-rw-r--r-- 1 user02 dba 576270 Apr 6 10:38 sample.log

host command complete

 

669.User SCOTT wants to back out the transactions on the REGIONS table in his schema. As a DBA, which commands must you execute to enable SCOTT to flash back the transactions? (Choose four.)

A. ALTER DATABASE FLASHBACK ON;

B. GRANT SELECT any transaction TO scott;

C. GRANT EXECUTE ON dbms_flashback TO scott;

D. ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

E. ALTER TABLESPACE undots1 RETENTION GUARANTEE;

F. ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;

 

 

Answer: BCDF 

 

答案解析:

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

 

四个先决条件。

 

 

670.After you have restored and recovered a database to a new host by using a previously performed Recovery Manager (RMAN) backup, which is the best option you would consider for the new database?

A. Opening the database in RESTRICTED mode

B. Opening the database with the RESETLOGS option

C. Setting a new DBID for the newly restored database

D. Restoring the server parameter file (SPFILE) to the new host

 

 

Answer: B

答案解析:

参考:将数据还原到新主机:http://blog.csdn.net/rlhua/article/details/12346829

为了还原数据库,请在还原主机上执行以下步骤:

1. 配置ORACLE_SID环境变量。

2. 启动RMAN 并在NOCATALOG模式下连接到目标实例。

3. 设置数据库标识符(DBID)。

4. 在NOMOUNT模式下启动实例。

5. 从备份集中还原服务器参数文件。

6. 关闭实例。

7. 编辑还原的初始化参数文件。

8. 在NOMOUNT模式下启动实例。

9. 创建RUN 块以执行下列任务:

– 还原控制文件

– 装载数据库

10.创建RMAN 恢复脚本以还原和恢复数据库。

11.执行RMAN 脚本。

12.使用RESETLOGS选项打开数据库。

 

671.Examine the following RMAN command:

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Which prerequisite must be met before accomplishing the backup?

A. Provide a password for the encryption

B. Set up an Oracle wallet for the encryption

C. No setup is required as it is a default encryption method

D. Both Oracle wallet and password must be set up for the encryption

 

 

Answer: B

答案解析:

参考:加密备份:http://blog.csdn.net/rlhua/article/details/12312463

可使用以下三种方法之一对备份进行加密:

• 透明加密:此方法使用wallet,是默认模式。

• 口令加密:此加密方法依赖于口令,不需要配置wallet。若要还原,必须知道用于备份的口令。

• 双模式加密:可同时使用透明加密和口令加密。若要还原,可使用透明模式或口令模式。

如果通常将备份还原到本地站点,但偶尔也会将备份传送到其它站点,则这种类型的加密十分有用。

CONFIGURE ENCRYPTION FOR DATABASE ON;

At this stage, all RMAN backup sets created by this database use transparent encryption by default.

官方参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfa.htm#CHDEDGHA

 

672.You are in the process of creating a Virtual Private Catalog (VPC) in your Oracle Database 11g database. The Prod1, Prod2 and Prod3 Oracle Database 10g databases are registered in the recovery catalog. The database user who owns the base recovery catalog is CATOWNER. CATOWNER executes the following command to grant privileges to a new user VPC1 using Oracle Database 11g RMAN executables:

RMAN> GRANT CATALOG FOR DATABASE prod 1 prod 2 TO vpc1;

Then you issue the following commands;

RMAN > CONNECT CATALOG vpc1/oracle@catdb;

RMAN> SQL "EXEC catowner.dbms_rcvcat.create virtual_catalog;“

What is the outcome of the above commands?

A. They execute and a create a virtual private catalog for pre-Oracle 11g clients

B. They produce an error because PROD1 and PROD 2 databases belong to the older version

C. They produce an error because you must connect as CATOWNER to execute this packaged procedure

D. They produce an error because you must connect to the target database to execute this packaged procedure

 

 

Answer: A

答案解析:

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

同15题:http://blog.csdn.net/rlhua/article/details/13276173

 

以下是使用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权限。

 

673.In Recovery Manager (RMAN), you are taking image copies of the datafiles of your production database and rolling them forward as regular intervals. You attempt to restart your database instance after a regular maintenance task, you realize that one of the data files that belongs to the USERS tablespace is damaged and you need to recover the datafile by using the image copy. You could perform the following steps to accomplish this:

1) Mount the database

2) Take the data file offline

3) Bring the data file online

4) Use the RMAN SWITCH TO command to switch the image copy

5) Apply the archived redo logs

6) Open the database

7) Use the RMAN RESTORE TO command to switch to the image copy

Which two options illustrate the correct sequence of steps that you could follow? (Choose two.)

A. 2, 6, 4, 5, 3

B. 1, 2, 4, 5, 3, 6

C. 1, 2, 4, 6, 3

D. 1, 2, 7, 5, 3, 6

 

 

Answer: BD

答案解析:

因为是users表空间的数据文件损坏,不是关键数据文件损坏,即可以使用数据文件offline下进行恢复。

又因为是image copy,所以可以使用switch to来还原数据文件,也可以使用restore to来还原数据文件

最后恢复文件,使数据文件online,然后再打开数据库。

 

674.View the Exhibit to observe the error. You receive this error regularly and have to shutdown the database instance to overcome the error. Automatic Shared Memory Management is configured for the instance. What can you do to reduce the chance of this error in the future?

 

A. Increase the value of SGA_MAX_SIZE

B. Enable automatic memory management

C. Set the PRE_PAGE_SGA parameter to true

D. Lock the System Global Area (SGA) in memory

 

 

Answer: B

答案解析:

使用自动内存管理来自动扩大SHARED_POOL_SIZE的尺寸。

[oracle@rtest ~]$ oerr ora 4031

04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"

// *Cause:  More shared memory is needed than was allocated in the shared

//          pool or Streams pool.

// *Action: If the shared pool is out of memory, either use the

//          DBMS_SHARED_POOL package to pin large packages,

//          reduce your use of shared memory, or increase the amount of

//          available shared memory by increasing the value of the

//          initialization parameters SHARED_POOL_RESERVED_SIZE and 

//          SHARED_POOL_SIZE.

//          If the large pool is out of memory, increase the initialization

//          parameter LARGE_POOL_SIZE.  

//          If the error is issued from an Oracle Streams or XStream process,

//          increase the initialization parameter STREAMS_POOL_SIZE or increase

//          the capture or apply parameter MAX_SGA_SIZE.

 

自动内存管理http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#BGBJAHEJ

 

 

 

675.Which two client requests are captured during database replay Capture? (Choose two)

A. Flashback queries

B. Shared server requests

C. Login and logoff activities of sessions

D. Direct path load of data from external files by using utilities such as SQL *loader

E. Data definition language (DDL) and data manipulation language (DML) operations

 

 

Answer: CE

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41481/dbr_capture.htm#RATUG115

排除法,选CE

The following types of user sessions and client requests are not supported by Database Replay:

Direct path load of data from external files using utilities such as SQL*Loader

Non-PL/SQL based Advanced Queuing (AQ)

Flashback queries

Oracle Call Interface (OCI) based object navigations

Non SQL-based object access

Distributed transactions

Any distributed transactions that are captured will be replayed as local transactions.

XA transactions

XA transactions are not captured or replayed. All local transactions are captured.

JAVA_XA transactions

If the workload uses the JAVA_XA package, JAVA_XA function and procedure calls are captured as normal PL/SQL workload. To avoid problems during workload replay, consider dropping the JAVA_XA package on the replay system to enable the replay to complete successfully.

Database Resident Connection Pooling (DRCP)

Workloads using OUT binds

Multi-threaded Server (MTS) and shared server sessions with synchronization mode set to OBJECT_ID

Migrated sessions

The workload is captured for migrated sessions. However, user logins or session migration operations are not captured. Without a valid user login or session migration, the replay may cause errors because the workload may be replayed by a wrong user.

Typically, Database Replay refrains from capturing these types of non-supported user sessions and client requests. Even when they are captured, Database Replay will not replay them. Therefore, it is usually not necessary to manually filter out non-supported user sessions and client requests. In cases where they are captured and found to cause errors during replay, consider using workload capture filters to exclude them from the workload.

 

676.Which command creates an image copy?

A. backup as copy

B. backup copy

C. copy as backup

D. copy back

 

 

Answer: A

答案解析:

image copy

A bit-for-bit copy of a single data file, archived redo log file, or control file that is:

Usable as-is to perform recovery (unlike a backup set, which uses unused block compression and is in an RMAN-specific format)

Generated with the RMAN BACKUPASCOPY command, an operating system command such as the UNIX cp, or by the Oracle archiver proces

官方参考:http://docs.oracle.com/cd/E16655_01/backup.121/e17630/glossary.htm#BRADV90178

 

677.What are the prerequisites for performing flashback transactions? (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://blog.csdn.net/rlhua/article/details/12224763

 

要使用闪回回退事务处理功能,必须启用补充事件记录功能并建立正确的权限。例如,HR方案中的HR用户决定对REGIONS表使用闪回事务处理。SYSDBA可确保数据库处于归档日志模式,

并在SQL*Plus 中执行以下设置步骤:

alter database add supplemental log data;

alter database add supplemental log data (primary key) columns;

grant execute on dbms_flashback to hr;

grant select any transaction to hr;

 

 

 

678.Which are the two prerequisites before setting up Flashback Data Archive? (Choose two.)

A.Flash recovery area must be defined

B.Undo retention guarantee must be enabled.

C.Database must be running in archivelog mode.

D.Automatic undo management must be enabled.

E.The tablespace in which the Flashback Data Archive is created must have automatic segment space Management (ASSM).

 

 

Answer: DE

 答案解析:

闪回数据归档参考:http://blog.csdn.net/rlhua/article/details/12221269

A,错误,闪回数据归档跟FRA区没有关系,闪回归档的数据是保存在闪回数据表空间的数据文件里。

B,错误,参考http://blog.csdn.net/rlhua/article/details/12222819,闪回数据归档和undo数据没关系。

C,错误,在非归档模式下也能创建闪回数据归档。

sys@TEST0924> archive log list

Database log mode              No Archive Mode

Automatic archival             Disabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     16

Current log sequence           20

sys@TEST0924> create flashback archive fla1 tablespace users quota 10M retention 1 year;

 

Flashback archive created.

 

D,正确,必须是自动还原管理

自动管理下能创建成功,切换到手动管理后,创建失败。

sys@TEST0924> show parameter undo

 

NAME                                 TYPE        VALUE

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

undo_management                      string      AUTO

undo_retention                       integer     900

undo_tablespace                      string      UNDOTBS1

sys@TEST0924> create flashback archive fla1 tablespace users quota 10M retention 1 year;

 

Flashback archive created.

 

sys@TEST0924> alter system set undo_management=manual scope=spfile;

 

System altered.

 

sys@TEST0924> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TEST0924> startup

ORACLE instance started.

 

Total System Global Area 3340451840 bytes

Fixed Size                  2232960 bytes

Variable Size            3204451712 bytes

Database Buffers          117440512 bytes

Redo Buffers               16326656 bytes

Database mounted.

Database opened.

sys@TEST0924> show parameter undo

 

NAME                                 TYPE        VALUE

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

undo_management                      string      MANUAL

undo_retention                       integer     900

undo_tablespace                      string      UNDOTBS1

sys@TEST0924> create flashback archive fla2 tablespace users quota 10M retention 1 year;

create flashback archive fla2 tablespace users quota 10M retention 1 year

*

ERROR at line 1:

ORA-55628: Flashback Archive supports Oracle 11g or higher

 

E,正确。TESTUNDOTBS 为手动管理的,在此上面创建闪回数据归档,报错。所以必须在ASSM表空间下使用

sys@TEST0924> select tablespace_name,segment_space_management from dba_tablespaces;

 

TABLESPACE_NAME                SEGMEN

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

SYSTEM                         MANUAL

SYSAUX                         AUTO

UNDOTBS1                       MANUAL

TEMP                           MANUAL

USERS                          AUTO

EXAMPLE                        AUTO

TESTTBS                        AUTO

TESTUNDOTBS                    MANUAL

 

8 rows selected.

 

sys@TEST0924> create flashback archive fla2 tablespace users quota 10M retention 1 year

  2  

sys@TEST0924> create flashback archive fla2 tablespace TESTUNDOTBS quota 10M retention 1 year;

create flashback archive fla2 tablespace TESTUNDOTBS quota 10M retention 1 year

                                         *

ERROR at line 1:

ORA-55627: Flashback Archive tablespace must be ASSM tablespace

 

679.Which mode of database shutdown requires an instance recovery at the time of the next database startup?

A.ABORT

B.NORMAL

C.IMMEDIATE

D.TRANSACTIONAL

 

 

Answer: A

 

答案解析:

 

 

The possible SHUTDOWN statements are:

 

SHUTDOWN ABORT

 

This mode is intended for emergency situations, such as when no other form of shutdown is successful.

This mode of shutdown is the fastest. However, a subsequent open of this database may take substantially longer

because instance recovery must be performed to make the data files consistent.

 

Note:

Because SHUTDOWN ABORT does not checkpoint the open data files, instance recovery is necessary before the database can reopen.

The other shutdown modes do not require instance recovery before the database can reopen.

因为shutdown abort不会生成检查点,所以再次打开数据库时要进行实例恢复。

 

SHUTDOWN IMMEDIATE

 

This mode is typically the fastest next to SHUTDOWN ABORT.

Oracle Database terminates any executing SQL statements and disconnects users.

Active transactions are terminated and uncommitted changes are rolled back.

 

SHUTDOWN TRANSACTIONAL

 

This mode prevents users from starting new transactions, but waits for all current transactions to complete before shutting down.

This mode can take a significant amount of time depending on the nature of the current transactions.

 

SHUTDOWN NORMAL

 

This is the default mode of shutdown. The database waits for all connected users to disconnect before shutting down.

 

官网参考:http://docs.oracle.com/cd/E11882_01/server.112/e40540/startup.htm#CNCPT955

 

 

 

680.Which two operations are NOT performed by the DUPLICATE command in Recovery Manager

(RMAN) while duplicating a running database? (Choose Two)

A.Creating the control file for the duplicate database

B.Restoring the target data files to the duplicate database

C.Performing complete recovery using all available backups

D.Generating a new, unique DBID for the duplicate database

E.Copying the online redo log files from the target database to the duplicate database

 

 

Answer: CE

答案解析:

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

当执行DUPLICATE命令时,RMAN 会执行下列操作:

1A.为辅助实例创建服务器参数文件(对于活动数据库和使用目标连接执行的基本备份的复制),或:

1B.从备份中还原(对于备用数据库和没有目标连接的基于备份的复制)

2. 装载备份控制文件

3. 对于基于备份的复制:选择用于将数据文件还原到辅助实例的备份

4. 将目标数据文件还原到副本数据库

5. 使用所有可用的增量备份和归档重做日志文件执行不完全恢复

6. 关闭辅助实例并以NOMOUNT模式重新启动它

7. 新建一个控制文件,然后控制文件在数据文件中创建并存储新的DBID

8. 通过RESETLOGS选项打开副本数据库

9. 为副本数据库创建联机重做日志文件

注:数据库复制过程在重新执行时尝试从故障点继续。

 

C应该为不完全恢复。因为源数据库为open状态,只能热备份,恢复时恢复到目的数据库,因为联机重做日志无法应用,故只能不完全恢复。

E,因为源数据库中的联机重做日志文件未备份且无法应用于副本数据库,就算复制也没用,所以RMAN 执行数据库时间点恢复必需的。

副本数据库的最远恢复点是由源数据库归档的最近重做日志文件。

 

681. The environmental variable ORACLE-BASE is set.  You want to check the diagnostic files created as part of the Automatic Diagnostic Repository (ADR). Vi ew the Exhibit and note the various parameters set in your database.  

 

What will be the location of the ADR base?

A.It is set to ORACLE-BASE.

B.It is set to ORACLE_HOME/log.

C.It is set to /u01/app/ oracle/admin/orcl/adump.

D.It is set to /u01/app/oracle/flash_recovery_area.

 

 

Answer: A 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#CHDIABAA

既然题中已经说明The environmental variable ORACLE-BASE is set,那么

根据If environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to the directory designated by ORACLE_BASE.

此题应该选A。

 

Structure, Contents, and Location of the Automatic Diagnostic Repository

The Automatic Diagnostic Repository (ADR) is a directory structure that is stored outside of the database. It is therefore available for problem diagnosis when the database is down.

The ADR root directory is known as ADR base. Its location is set by the DIAGNOSTIC_DEST initialization parameter. If this parameter is omitted or left null, the database sets DIAGNOSTIC_DEST upon startup as follows:

If environment variable ORACLE_BASE is set, DIAGNOSTIC_DEST is set to the directory designated by ORACLE_BASE.

If environment variable ORACLE_BASE is not set, DIAGNOSTIC_DEST is set to ORACLE_HOME/log.

 

682. Identify the scenarios in which the RMAN CROSSCHECK comm and is useful. (Choose all that apply.)

A.To check that the obsolete backups are deleted from the repository records and from the disk.

B.To update the RMAN repository if  you delete archived redo logs with operating system commands.

C.To update outdated information about backups that  disappeared from disk or tape or became corrupted and inaccessible.

D.To synchronize the actual files on disk or in the media management catalog  with the RMAN repository for which the backup was  not taken using RMAN.

 

 

Answer: BC 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmmaint.htm#BRADV287

正确答案应为BC

Crosschecks are useful because they can do the following:

Update outdated information about backups that disappeared from disk or tape or became corrupted

Update the repository if you delete archived redo logs or other files with operating system commands

 

683. Your production database it f unctional on the SHOST1 host. Y ou are backing up the production database by using Recovery Manager (RMAN) with the recovery catalog. You want to replicate the production database to anther host , SHOST2, for testing new applications. After you ensured that the backups of the target database are accessible on the new host, what must you do to restore and recover the backup for the test environment?

A.Restoring the control file from the backup by using the NOCATAL OG option to restore, and recovering the data files

B.Restoring the data files by us ing the NOCATALOG option and us ing the SET NEWNAME command to change the location

C.Restoring the server parameter file from the backup by using the recovery catalog to restore, and recovering the data files

D.Restoring the data files from the backup by using the recovery catalog to recover the files, and using the SWITCH command to change the location.

 

 

Answer: D 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmadvre.htm#BRADV370

正确答案选A

你的生产库在SHOST1,你使用rman的恢复目录来备份生产库。你想复制生产库到另一台主机上SHOST2作为测试用

之后你确定在新的主机上你的目标数据库的备份能够被访问,什么是你必须要在测试环境还原和恢复的?

 

Start RMAN on hostb and connect to the target database without connecting to the recovery catalog. C错D错

If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host. B错误

 

Testing the Restore of a Database on a New Host

This scenario assumes that you want to test whether you can restore your database to a new host. In this scenario, you have two networked Linux hosts,hosta and hostb. A target database named trgta is on hosta and is registered in recovery catalog catdb. You want to test the restore and recovery of trgta onhostb, while keeping database trgta up and running on hosta.

Now, assume that the directory structure of hostb is different from hosta. The target database is located in /net/hosta/dev3/oracle/dbs, but you want to restore the database to /net/hostb/oracle/oradata/test. You have tape backups of data files, control files, archived redo logs, and the server parameter file on a media manager accessible by both hosts. The ORACLE_SID for the trgta database is trgta and does not change for the restored database.

Caution:

If you are restoring the database for test purposes, then never connect RMAN to the test database and the recovery catalog.

To restore the database on a new host:

Ensure that the backups of the target database are accessible on the new host.

To test disaster recovery, you must have a recoverable backup of the target database. When preparing your disaster recovery strategy, ensure that the backups of the data files, control files, and server parameter file are restorable on hostb. Thus, you must configure the media management software so that hostb is a media manager client and can read the backup sets created on hosta. Consult the media management vendor for support on this issue.

Configure the ORACLE_SID on hostb.

This scenario assumes that you want to start the RMAN client on hostb and authenticate yourself through the operating system. However, you must be connected to hostb either locally or through a net service name.

After logging in to hostb with administrator privileges, edit the /etc/group file so that you are included in the DBA group:

dba:*:614:<your_user_name>

Set the ORACLE_SID environment variable on hostb to the same value used on hosta:

% setenv ORACLE_SID trgta

Start RMAN on hostb and connect to the target database without connecting to the recovery catalog. C错

For example, enter the following command:

% rman NOCATALOG

RMAN> CONNECT TARGET /

Set the DBID and start the database instance without mounting the database.

For example, run SET DBID to set the DBID, then run STARTUP NOMOUNT:

SET DBID 1340752057;

STARTUP NOMOUNT

RMAN fails to find the server parameter file, which has not yet been restored, but starts the instance with a "dummy" file. Sample output follows:

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/net/hostb/oracle/dbs/inittrgta.ora'

 

trying to start the Oracle instance without parameter files ...

Oracle instance started

Restore and edit the server parameter file.

Because you enabled the control file autobackup feature when making your backups, the server parameter file is included in the backup. If you are restoring an autobackup that has a nondefault format, then use the SET CONTROLFILE AUTOBACKUP FORMAT command to indicate the format.

Allocate a channel to the media manager, then restore the server parameter file as a client-side parameter file and use the SET command to indicate the location of the autobackup (in this example, the autobackup is in /tmp):

RUN

{

  ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';

  SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/%F';

  RESTORE SPFILE

    TO PFILE '?/oradata/test/inittrgta.ora'

    FROM AUTOBACKUP;

  SHUTDOWN ABORT;

}

Edit the restored initialization parameter file.

Change any location-specific parameters, for example, those ending in _DEST, to reflect the new directory structure. For example, edit the following parameters:

  - IFILE

  - LOG_ARCHIVE_DEST_1

  - CONTROL_FILES

Restart the instance with the edited initialization parameter file.

For example, enter the following command:

STARTUP FORCE NOMOUNT PFILE='?/oradata/test/inittrgta.ora';

Restore the control file from an autobackup and then mount the database.

For example, enter the following command:

RUN

{

  ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';

  RESTORE CONTROLFILE FROM AUTOBACKUP;

  ALTER DATABASE MOUNT;

}

RMAN restores the control file to whatever locations you specified in the CONTROL_FILES initialization parameter.

Catalog the data file copies that you copied in "Restoring Disk Backups to a New Host", using their new file names or CATALOG START WITH (if you know all the files are in directories with a common prefix easily addressed with a CATALOG START WITH command). For example, run:

CATALOG START WITH '/oracle/oradata/trgt/';

If you want to specify files individually, then you can execute a CATALOG command as follows:

CATALOG DATAFILECOPY

  '/oracle/oradata/trgt/system01.dbf', '/oracle/oradata/trgt/undotbs01.dbf',

  '/oracle/oradata/trgt/cwmlite01.dbf', '/oracle/oradata/trgt/drsys01.dbf',

  '/oracle/oradata/trgt/example01.dbf', '/oracle/oradata/trgt/indx01.dbf',

  '/oracle/oradata/trgt/tools01.dbf', '/oracle/oradata/trgt/users01.dbf';

Start a SQL*Plus session on the new database and query the database file names recorded in the control file.

Because the control file is from the trgta database, the recorded file names use the original hosta file names. You can query V$ views to obtain this information. Run the following query in SQL*Plus:

COLUMN NAME FORMAT a60

SPOOL  LOG '/tmp/db_filenames.out'

SELECT FILE# AS "File/Grp#", NAME

FROM   V$DATAFILE

UNION

SELECT GROUP#,MEMBER

FROM   V$LOGFILE;

SPOOL OFF

EXIT

Write the RMAN restore and recovery script. The script must include the following steps:

For each data file on the destination host that is restored to a different path than it had on the source host, use a SET NEWNAME command to specify the new path on the destination host. If the file systems on the destination system are set up to have the same paths as the source host, then do not use SET NEWNAME for those files restored to the same path as on the source host. B错误

For each online redo log that is to be created at a different location than it had on the source host, use SQL ALTER DATABASE RENAME FILEcommands to specify the path name on the destination host. If the file systems on the destination system are set up to have the same paths as the source host, then do not use ALTER DATABASE RENAME FILE for those files restored to the same path as on the source host.

Perform a SET UNTIL operation to limit recovery to the end of the archived redo logs. The recovery stops with an error if no SET UNTIL command is specified.

Restore and recover the database.

Run the SWITCH DATAFILE ALL command so that the control file recognizes the new path names as the official new names of the data files.

Example 20-3 shows the RMAN script reco_test.rman that can perform the restore and recovery operation.

Example 20-3 Restoring a Database on a New Host

RUN

{

  # allocate a channel to the tape device

  ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS '...';

 

  # rename the data files and online redo logs

  SET NEWNAME FOR DATAFILE 1 TO '?/oradata/test/system01.dbf';

  SET NEWNAME FOR DATAFILE 2 TO '?/oradata/test/undotbs01.dbf';

  SET NEWNAME FOR DATAFILE 3 TO '?/oradata/test/cwmlite01.dbf';

  SET NEWNAME FOR DATAFILE 4 TO '?/oradata/test/drsys01.dbf';

  SET NEWNAME FOR DATAFILE 5 TO '?/oradata/test/example01.dbf';

  SET NEWNAME FOR DATAFILE 6 TO '?/oradata/test/indx01.dbf';

  SET NEWNAME FOR DATAFILE 7 TO '?/oradata/test/tools01.dbf';

  SET NEWNAME FOR DATAFILE 8 TO '?/oradata/test/users01.dbf';

  SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo01.log''

      TO ''?/oradata/test/redo01.log'' ";

  SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo02.log''

      TO ''?/oradata/test/redo02.log'' ";

 

  # Do a SET UNTIL to prevent recovery of the online logs

  SET UNTIL SCN 123456;

  # restore the database and switch the data file names

  RESTORE DATABASE;

  SWITCH DATAFILE ALL;

 

  # recover the database

  RECOVER DATABASE;

}

EXIT

Execute the script created in the previous step.

For example, start RMAN to connect to the target database and run the @ command:

% rman TARGET / NOCATALOG

RMAN> @reco_test.rman

Open the restored database with the RESETLOGS option.

From the RMAN prompt, open the database with the RESETLOGS option:

ALTER DATABASE OPEN RESETLOGS;

Caution:

When you re-open your database in the next step, do not connect to the recovery catalog. Otherwise, the new database incarnation created is registered automatically in the recovery catalog, and the file names of the production database are replaced by the new file names specified in the script.

Optionally, delete the test database with all of its files.

Note:

If you used an ASM disk group, then the DROP DATABASE command is the only way to safely remove the files of the test database. If you restored to non-ASM storage then you can also use operating system commands to remove the database.

Use the DROP DATABASE command to delete all files associated with the database automatically. The following example deletes the database files:

STARTUP FORCE NOMOUNT PFILE='?/oradata/test/inittrgta.ora';

DROP DATABASE;

Because you did not perform the restore and recovery operation when connected to the recovery catalog, the recovery catalog contains no records for any of the restored files or the procedures performed during the test. Likewise, the control file of the trgta database is completely unaffected by the test.

 

684. Your database is running in ARCHIVELOG mode. You have been taking backups of all the data files and control files regularly.  You are informed that some important tables in  the BILLING tablespace have been dropped on February 28, 2007 at 10.30 AM and must be recovered.You decide to perform an incomplete recovery using the following command:

SQL> RECOVER DATABASE UNTIL TIME ‘2007-02-28:10:15:00’;

Identify the files that must be restored to recover the missing tables successfully.

A.Restore the backup of all the data files.

B.Restore the backup of all the  data files and the control file.

C.Restore the backup of only the data files that  contain the dropped tables.

D.Restore the backup of all the data files belonging to the tablespace containing the dropped tables.

 

 

Answer: A

答案解析:

你的数据库运行在归档模式,并且定期备份了所有的数据文件和控制文件。

你被通知一些在BILLING表空间的重要的表在ebruary 28, 2007 at 10.30 AM丢失,并且要求恢复。

你决定使用以下命令执行不完全恢复SQL> RECOVER DATABASE UNTIL TIME ‘2007-02-28:10:15:00’;

 

从以下实验中看出,如果是recover database,则必须先restore databse  ,则是restore所有备份的数据文件。

 

此题应该选A

 

第一步:创建测试表,并插入数据

10:43:49 scott@TESTDB>create table dept_new as select * from dept;

 

Table created.

 

10:44:05 scott@TESTDB>select * from dept_new;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

 

10:44:15 scott@TESTDB>insert into dept_new values (50,'IT','CHINA');

 

1 row created.

 

10:45:07 scott@TESTDB>select * from dept_new;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

        50 IT             CHINA

 

第二步:rman备份数据库

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 27 10:45:36 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TESTDB (DBID=2617656787)

 

RMAN> backup database;

 

Starting backup at 27-DEC-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=37 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/testdb/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/testdb/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/testdb/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/testdb/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/testdb/users01.dbf

channel ORA_DISK_1: starting piece 1 at 27-DEC-13

channel ORA_DISK_1: finished piece 1 at 27-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_27/o1_mf_nnndf_TAG20131227T104552_9csth1ns_.bkp tag=TAG20131227T104552 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:02:05

Finished backup at 27-DEC-13

 

Starting Control File and SPFILE Autobackup at 27-DEC-13

piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/autobackup/2013_12_27/o1_mf_s_835267679_9cstm02l_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 27-DEC-13

 

第三步:drop表

10:49:05 scott@TESTDB>select * from dept_new;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

        50 IT             CHINA

 

10:49:13 scott@TESTDB>commit;

 

Commit complete.

 

10:49:30 scott@TESTDB>insert into dept_new values(60,'CLERK','BEIJING');

 

1 row created.

 

10:50:34 scott@TESTDB>commit;

 

Commit complete.

 

10:50:55 scott@TESTDB> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

 

Session altered.

 

10:51:26 scott@TESTDB>select sysdate from dual;

 

SYSDATE

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

2013-12-27 10:51:34

 

10:51:34 scott@TESTDB>drop table dept_new purge;

 

Table dropped.

 

第四步:恢复

在mount状态下不完全恢复

sys@TESTDB>shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TESTDB>startup mount;

ORACLE instance started.

 

Total System Global Area  309673984 bytes

Fixed Size                  1364312 bytes

Variable Size             268439208 bytes

Database Buffers           33554432 bytes

Redo Buffers                6316032 bytes

Database mounted.

 

 

在rman里做restore database

[oracle@rtest ~]$ rman target /

 

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Dec 27 10:54:59 2013

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: TESTDB (DBID=2617656787, not open)

 

RMAN> restore database;

 

Starting restore at 27-DEC-13

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=20 device type=DISK

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/testdb/system01.dbf

channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/testdb/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/testdb/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/testdb/users01.dbf

channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/testdb/example01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_27/o1_mf_nnndf_TAG20131227T104552_9csth1ns_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TESTDB/backupset/2013_12_27/o1_mf_nnndf_TAG20131227T104552_9csth1ns_.bkp tag=TAG20131227T104552

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:56

Finished restore at 27-DEC-13

 

RMAN> 

 

 

在sqlplus里面做recover database until  time

sys@TESTDB>alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

 

Session altered.

 

sys@TESTDB>select sysdate from dual;

 

SYSDATE

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

2013-12-27 10:58:12

 

sys@TESTDB>recover database until time '2013-12-27:10:51:34';          

Media recovery complete.

sys@TESTDB>alter database open resetlogs;

 

Database altered.

 

sys@TESTDB>select * from scott.dept_new;

 

    DEPTNO DNAME          LOC

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

        10 ACCOUNTING     NEW YORK

        20 RESEARCH       DALLAS

        30 SALES          CHICAGO

        40 OPERATIONS     BOSTON

        50 IT             CHINA

        60 CLERK          BEIJING

 

6 rows selected.

 

 

685. In your test database:

-You are using Recovery Manager (RMAN) to perform incremental backups of your test database

-The test database is running in NOARCHIVELOG mode

-One of the data files is corrupted

-All online redo log files are lost because of a media failure

Which option must you consider in this scenario?

A.Configuring the database in ARCHVIELOG mode and  then using incremental backup to recover the database

B.Using incremental backup to recover the damaged data file and then manually creating the online redo log files

C.Creating a new test database because  the database is not recoverable du e to the fact that the database is configured in NOARCHIVELOG mode

D.Using incremental backups to recover the database by using the RECOVER DATABASE NOREDO command and then using the RESETLOGS option to open the database.  

 

 

Answer: C 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2001.htm#RCMRF90258

根据官方文档,此题应该选D

Example 3-6 Recovering a NOARCHIVELOG Database

You can perform limited recovery of changes to a database running in NOARCHIVELOG mode by applying incremental backups. The incremental backups must be consistent, like all backups of a database run in NOARCHIVELOG mode, so you cannot back up the database when it is open.

Assume that you run database prod in NOARCHIVELOG mode with a recovery catalog. You shut down the database consistently and make a level 0 backup of database prod to tape on Sunday afternoon. You shut down the database consistently and make a level 1 differential incremental backup to tape at 3:00 a.m. on Wednesday and Friday.

On Saturday, a media failure destroys half the data files and the online redo logs. Because the online logs are lost, you must specify the NOREDO option in the RECOVER command. Otherwise, RMAN searches for the redo logs after applying the Friday incremental backup and issues an error message when it does not find them.

After connecting RMAN to prod and the catalog database, recover as follows:

STARTUP FORCE NOMOUNT;

RESTORE CONTROLFILE;      # restore control file from consistent backup

ALTER DATABASE MOUNT;

RESTORE DATABASE;         # restore data files from consistent backup

RECOVER DATABASE NOREDO;  # specify NOREDO because online redo logs are lost

ALTER DATABASE OPEN RESETLOGS;

The recovered database reflects only changes up through the time of the Friday incremental backup. Because there are no archived redo log files, there is no way to recover changes made after the incremental backup.

 

 

686. You execute the following FLASHBACK TABLE command:

 

Which two statements are correct?(Choose two.)

A.The EMP table that was dropped by  mistake earlier is restored.

B.The FLASHBACK TABLE statement is  executed as a single transaction.

C.The FLASHBACK TABLE statement does not maintain existing indexes on the EMP table.

D.The changes made to the EMP table since the specified time are undone if no constraint is violated during flashback.  

 

 

Answer: BD 

 

答案解析:

排除法:A错,C错,D正确

正确选BD

A,应该使用FLASHBACK TABLE ... TO BEFORE DROP来恢复,利用回收站原理。A错

参考:

注意 A 如实 drop 行则对,如果 drop 表则错。 C flashback table .. to timestamp/scn …这样语句执行的 DML 操作,索
引会根据 dml 类型做相应的处理。http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmflash.htm#BRADV89742

 

Logical Flashback Features Useful in Backup and Recovery

The remaining flashback features operate at the logical level. The logical features documented in this chapter are as follows:

Flashback Table

You can recover a table or set of tables to a specified point in time in the past without taking any part of the database offline. In many cases, Flashback Table eliminates the need to perform more complicated point-in-time recovery operations. Flashback Table restores tables while automatically maintaining associated attributes such as current indexes C, triggers and constraints, and not requiring you to find and restore application-specific properties.

"Rewinding a Table with Flashback Table" explains how to use this feature.

Flashback Drop

You can reverse the effects of a DROP TABLE statement.

"Rewinding a DROP TABLE Operation with Flashback Drop" explains how to use this feature.

 

 

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN01505

Recovering Tables Using Oracle Flashback Table

Oracle Flashback Table enables you to restore a table to its state as of a previous point in time. It provides a fast, online solution for recovering a table that has been accidentally modified or deleted by a user or application. In many cases, Oracle Flashback Table eliminates the need for you to perform more complicated point-in-time recovery operations.

Oracle Flashback Table:

Restores all data in a specified table to a previous point in time described by a timestamp or SCN.

Performs the restore operation online.

Automatically maintains all of the table attributes, such as indexes, triggers, and constraints that are necessary for an application to function with the flashed-back table.

Maintains any remote state in a distributed environment. For example, all of the table modifications required by replication if a replicated table is flashed back.

Maintains data integrity as specified by constraints. Tables are flashed back provided none of the table constraints are violated. D正确

This includes any referential integrity constraints specified between a table included in the FLASHBACK TABLE statement and another table that is not included in theFLASHBACK TABLE statement.

Even after a flashback operation, the data in the original table is not lost. You can later revert to the original state.

 

 

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmflash.htm#BRADV81517

 

 

687. Users are connected to a database instance that is using Automatic Storage Management (ASM).The DBA executes the command as follows to shut down the ASM instance:

SQL> SHUTDOWN IMMEDIATE;

What happens to the database instance?

A.It shuts down long with the ASM instance.

B.It is aborted and the ASM instance shuts down normally.

C.It stays open and SHUTDOWN command for the ASM instance fails.  

D.It shuts down only after all pending transactions are completed and the ASM instance waits for this before shutting down.

 

 

Answer: C 

Asm 实例 shutdown abort,数据库实例会自动 shutdown abort
Asm 实例 shutdown [immediate],会报错 ORA-15097: cannot SHUTDOWN ASM instance with connected client
考试本题自己仔细看 shutdown 执行的那个命令

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm#OSTMG13640

 

IMMEDIATE or TRANSACTIONAL Clause

Oracle ASM waits for any in-progress SQL to complete before performing an orderly dismount of all of the disk groups and shutting down the Oracle ASM instance. Oracle ASM does not wait for users currently connected to the instance to disconnect. If any database instances are connected to the Oracle ASM instance, then the SHUTDOWN command returns an error and leaves the Oracle ASM instance running. Because the Oracle ASM instance does not contain any transactions, the TRANSACTIONAL mode behaves the same as IMMEDIATE mode.

个人觉得这道应该选C?

 

[grid@rtest ~]$ export ORACLE_SID=+ASM

[grid@rtest ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 5 20:57:54 2013

 

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

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Automatic Storage Management option

 

SQL> shutdown immediate

ORA-15097: cannot SHUTDOWN ASM instance with connected client (process 4733)

[grid@rtest ~]$ oerr ora 15097

15097, 00000, "cannot SHUTDOWN ASM instance with connected client (process %s)"

// *Cause:  A SHUTDOWN command was issued to an ASM instance that had one or 

//          more connected clients.

// *Action: Stop all clients that are using this ASM instance and retry the 

//          SHUTDOWN command.  Alternatively, use the SHUTDOWN ABORT command.  

//          Note that issuing the SHUTDOWN ABORT command to an ASM instance 

//          results in abormal termination of all RDBMS instances connected 

//          to that ASM instance. One of the active clients has been listed

//          in the error message. Query the V$ASM_CLIENT fixed view in an 

//          ASM instance or use ASMCMD LSOF to list all active clients.

//

SQL> select * from V$ASM_CLIENT;

 

GROUP_NUMBER INSTANCE_NAME        DB_NAME  STATUS       SOFTWARE_VERSION     COMPATIBLE_VERSION

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

           1 rcat1028             rcat1028 CONNECTED    11.2.0.3.0           11.2.0.0.0

           2 rcat1028             rcat1028 CONNECTED    11.2.0.3.0           11.2.0.0.0

 

 

688. Which two statements are true about the compressed backups in RMAN? (Choose two.)

A.Compressed backups can only  be taken on the tape drives.

B.The binary compression creates some performance overhead during backup operation.

C.The ZLIB compression algorithm can be used only if the COMPATIBLE in itialization parameter is set to 11.1.0.

D.The media manager compression for the tape drive should be enabled for taking compressed backups on the tape.  

 

 

Answer: BD 

答案解析:

A错,也可以备份在disk上。

C错, only if the  COMPATIBLE in itialization parameter is set to 11.1.0,应该是11.0.0或者以上

sys@TEST0221> select ALGORITHM_NAME,ALGORITHM_COMPATIBILITY,ALGORITHM_DESCRIPTION from v$rman_compression_algorithm

  2  /

 

ALGORITHM_NAME                                                   ALGORITHM_COMPATIB ALGORITHM_DESCRIPTION

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

BZIP2                                                            9.2.0.0.0          good compression ratio

BASIC                                                            9.2.0.0.0          good compression ratio

LOW                                                              11.2.0.0.0         maximum possible compression speed

ZLIB                                                             11.0.0.0.0         balance between speed and compression ratio

MEDIUM                                                           11.0.0.0.0         balance between speed and compression ratio

HIGH                                                             11.2.0.0.0         maximum possible compression ratio

 

6 rows selected.

 

 

689. View the Exhibit and examine the RMAN commands

 

Which statement describes the effect of a backup retention policy on the backup of a backup set?
A.Either all the copies of a backup set are obsolete or none of them are as per the retention policy.
B.The copies of the backup will be reported as obsolete under a redundancy-based backup retention policy.
C.The copies of the backup will be reported as obsolete under a recovery window-based backup retention policy.
D.All the copies of the backup set are counted as one instance of a backup and will deleted in backup set exceeds the redundancy-based backup retention policy.

 

Answer:A

 

 

690. The database users regularly complain about the difficulty in performing transactions. On investigation, you find that some users perform long-running transactions that consume huge amounts of space in the undo tablespace, which caused the problem. You want to control the usage of the undo tablespace only for these user sessions and you do not want these sessions to perform long-running operations. How would you achieve this?
A.Implement a profile for the users.
B.Implement external roles for the users.
C.Set the threshold for the undo tablespace.
D.Implement a Database Resource Manager plan.

 

Answer:D

 

 

691. You work in a data warehouse environment that involves the execution  of complex queries. The current content of the SQL cache contains the ideal workload for analysis. You want to analyze only a few most resource-intensive statements. What must you do to receive recommendations on efficient use of indexes and materialized views to improve query performance?

A.Run the SQL Access Advisor.

B.Run the SQL Tuning Advisor (STA).

C.Run the Automatic Workload Repository (AWR) report.

D.Run the Automatic Database  Diagnostic Monitor (ADDM).

 

 

Answer: A 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF94878

 

Figure 18-1 illustrates how SQL Access Advisor recommends access structures for a given workload obtained from a user-defined table or the SQL cache. If a workload is not provided, then it can generate and use a hypothetical workload also, provided the user schema contains dimensions defined by the CREATEDIMENSION keyword.

Figure 18-1 Materialized Views and SQL Access Advisor


Description of "Figure 18-1 Materialized Views and SQL Access Advisor"

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.

In addition, you can use SQL Access Advisor API to do the following:

Perform a quick tune using a single SQL statement.

Show how to make a materialized view fast refreshable.

Show how to change a materialized view so that general query rewrite is possible.

 

来源: <http://docs.oracle.com/cd/E11882_01/server.112/e41573/advisor.htm#PFGRF94878>

 

 

692. Your company wants to upgrade the production database to a Real Application Clusters (RAC) environment. You set up the best RAC database and want to  replay a recorded workload captured from the production database on  the test machine.

The following steps may be used to  replay the database workload:

1)  Preprocess the captured workload

2)  Restart the database in RESTRICTED mode.

3)  Set up Replay Clients.

4)  Restore the test database to the point when the capture started.

5) Remap connections.

Which is the correct sequence of the required steps?

A.1, 4, 3, 5

B.1, 4, 5, 3

C.2, 1, 5, 3, 4

D.1, 2, 4, 5, 3

 

 

Answer: A 

答案解析:

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

个人觉得应该选B.

数据库重放步骤:

捕获工作量--预处理工作量--重放工作量--还原数据库----连接映射--设置客户机--分析

 

 

693. Which two statements are true about an image copy backup? (Choose two.)

A. It may only be taken to disk.

B. It will contain only the used blocks.

C. It will contain all used and unused blocks.

D. It can be performed on disk as well as on tape.  

 

 

Answer: AC 

When the AS COPY option is used, RMAN generates image copies of the input files. An image copy is a byte-for-byte identical copy of the original file. You can create image copy backups of datafiles, datafile copies, and archived redo log files. Image copy files can only exist on disk.

 

 

694. As part of archiving the historical data, you want to trans fer data from one database to another database, which is on another server. All tablespaces in the source database are read/write and online.

The source and target databases use the same  compatibility level and character sets.  View the Exhibit and examine the features in the source and target database. Which of the following steps are required to transport a tablespace from the database to the target database:

1.Make the tablespace read-only at the source database.

2.Export metadata from the source database.

3.Convert data filed by using Recovery Manager (RMAN).

4.Transfer the dump file and data filed to the target machine.

5.Import metadata at the target database.

6.Make the tablespace read/write at the target database.

A.2, 4, and 5

B.All the steps

C.2, 3, 4 and 5

D.1, 2, 4, 5 and 6

 

 

Answer: D或者B

答案解析:

答案选D

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

http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN11400

read_only--expdp--4-import-read_wrtie

 

 12456(可选)

 

If both platforms have the same endianness, no conversion is necessary. Otherwise you must do a conversion of the tablespace set either at the source or destination database.

If both platforms have the same endianness, no conversion is necessary因为都是32位的操作系统,故不需要转换。3不需要。故C是错误的。B也是错的。

 

If no endianness conversion of the tablespace set is needed, or if you already converted the tablespace set:

Transport the dump file to the directory pointed to by the DATA_PUMP_DIR directory object, or to any other directory of your choosing.

Run the following query to determine the location of DATA_PUMP_DIR:

SELECT * FROM DBA_DIRECTORIES WHERE DIRECTORY_NAME = 'DATA_PUMP_DIR';

 

OWNER      DIRECTORY_NAME   DIRECTORY_PATH

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

SYS        DATA_PUMP_DIR    C:\app\orauser\admin\orawin\dpdump\

Transport the data files to the location of the existing data files of the destination database.

On the UNIX and Linux platforms, this location is typically /u01/app/oracle/oradata/SID/ or +DISKGROUP/SID/datafile/.



695. Identify two options that Oracle recommends while configuring the backup and recovery environment for your recovery catalog. (Choose two.)

A. configuring control  file autobackup to be ON

B. backing up data filed only and not the archived redo log files

C. running the recovery catalog database in NOARCHIVELOG mode.

D. setting the retention policy to a REDUNDANCY value greater than 1

E. backing up the recovery catalog to the same disk as that of  the target database

 

 

Answer: AD

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcatdb.htm#BRADV89648

 

正确应为AD

 

Basic Concepts for the Recovery Catalog

The recovery catalog contains metadata about RMAN operations for each registered target database. When RMAN is connected to a recovery catalog, RMAN obtains its metadata exclusively from the catalog. The catalog includes the following types of metadata:

Data file and archived redo log backup sets and backup pieces  B错

Data file copies

Archived redo logs and their copies

Database structure (tablespaces and datafiles)

Stored scripts, which are named user-created sequences of RMAN commands

Persistent RMAN configuration settings (包括A+D)

 

Configuring the Recovery Catalog Database

When you use a recovery catalog, RMAN requires that you maintain a recovery catalog schema. The recovery catalog is stored in the default tablespace of the schema. The SYS user cannot be the owner of the recovery catalog.

Decide which database you will use to install the recovery catalog schema, and also how you will back up this database. Also, decide whether to operate the catalog database in ARCHIVELOG mode, which is recommended.  C错

 

Note:

Do not use the target database to be backed up as the database for the recovery catalog. The recovery catalog must be protected if the target database is lost.  E错

 

696. Examine the following command for RMAN backup:

 

 Which statement Is true regarding the approach in the command?

A.The RMAN multiplexing level is 4.

B.It is the use of asynchronous I/O by RMAN.

C.It is a case of parallelization of the backup set.

D.It is an implementation of a multisection backup.

 

 

Answer: C 

答案解析:

从以上图片中以及以下的实验中看出,分了三个通道并行备份。

图中1,4,5数据文件使用通道C1,2,3,9数据文件使用通道C2,6,7,8使用通道C3,

这三个通道并行执行备份。

RMAN> report schema;

 

using target database control file instead of recovery catalog

Report of database schema for database with db_unique_name RCAT1028

 

List of Permanent Datafiles

===========================

File Size(MB) Tablespace           RB segs Datafile Name

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

1    710      SYSTEM               ***     +DATA/rcat1028/datafile/system.262.830015445

2    660      SYSAUX               ***     +DATA/rcat1028/datafile/sysaux.261.830015451

3    80       UNDOTBS1             ***     +DATA/rcat1028/datafile/undotbs1.265.830015451

4    5        USERS                ***     +DATA/rcat1028/datafile/users.259.830015453

5    15       RCAT                 ***     +DATA/rcat01.dbf

 

List of Temporary Files

=======================

File Size(MB) Tablespace           Maxsize(MB) Tempfile Name

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

1    29       TEMP                 32767       +DATA/rcat1028/tempfile/temp.256.830015677

 

RMAN> run{

2> allocate channel c1 device type disk;

3> allocate channel c2 device type disk;

4> allocate channel c3 device type disk;

5> backup

6> incremental level=0

7> (datafile 1,2 channel c1)

8> (datafile 3,4 channel c2)

9> (datafile 5 channel c3);

10> sql 'alter system archive log current';

11> }

 

allocated channel: c1

channel c1: SID=192 device type=DISK

 

allocated channel: c2

channel c2: SID=221 device type=DISK

 

allocated channel: c3

channel c3: SID=8 device type=DISK

 

Starting backup at 05-NOV-13

channel c1: starting incremental level 0 datafile backup set

channel c1: specifying datafile(s) in backup set

input datafile file number=00001 name=+DATA/rcat1028/datafile/system.262.830015445

input datafile file number=00002 name=+DATA/rcat1028/datafile/sysaux.261.830015451

channel c1: starting piece 1 at 05-NOV-13

channel c2: starting incremental level 0 datafile backup set

channel c2: specifying datafile(s) in backup set

input datafile file number=00003 name=+DATA/rcat1028/datafile/undotbs1.265.830015451

input datafile file number=00004 name=+DATA/rcat1028/datafile/users.259.830015453

channel c2: starting piece 1 at 05-NOV-13

channel c3: starting incremental level 0 datafile backup set

channel c3: specifying datafile(s) in backup set

input datafile file number=00005 name=+DATA/rcat01.dbf

channel c3: starting piece 1 at 05-NOV-13

channel c3: finished piece 1 at 05-NOV-13

piece handle=+RECOVERY/rcat1028/backupset/2013_11_05/nnndn0_tag20131105t222104_0.276.830730067 tag=TAG20131105T222104 comment=NONE

channel c3: backup set complete, elapsed time: 00:00:16

channel c2: finished piece 1 at 05-NOV-13

piece handle=+RECOVERY/rcat1028/backupset/2013_11_05/nnndn0_tag20131105t222104_0.275.830730067 tag=TAG20131105T222104 comment=NONE

channel c2: backup set complete, elapsed time: 00:00:19

channel c1: finished piece 1 at 05-NOV-13

piece handle=+RECOVERY/rcat1028/backupset/2013_11_05/nnndn0_tag20131105t222104_0.261.830730065 tag=TAG20131105T222104 comment=NONE

channel c1: backup set complete, elapsed time: 00:03:19

channel c1: starting incremental level 0 datafile backup set

channel c1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel c1: starting piece 1 at 05-NOV-13

channel c1: finished piece 1 at 05-NOV-13

piece handle=+RECOVERY/rcat1028/backupset/2013_11_05/ncsnn0_tag20131105t222104_0.277.830730269 tag=TAG20131105T222104 comment=NONE

channel c1: backup set complete, elapsed time: 00:00:04

Finished backup at 05-NOV-13

 

sql statement: alter system archive log current

released channel: c1

released channel: c2

released channel: c3

 

 

697. Which statement is true about a Scheduler-generated event?
A. It can be generated when a file arrives on the file system.
B. it indicates state changes that occur within the Scheduler itself.
C. it is raised by an application that is consumed by the Scheduler to start a job.
D. it requires jobs to be defined with an event condition and a queue specification.

 

Answer:B

 

698. In your production database, you:

-Are using Recovery Manager (RMAN) with a recovery catalog to perform the backup operation at regular intervals

-Set the control file autobackup to “on”

-Are maintaining image copi es of the database files

You have lost the server parameter file (SPFILE)  and the control file. Which  option must you consider before restoring the SPFILE and the control f ile by using the control file autobackup?

A.Setting DBID for the database

B.Using the RMAN SWITCH command

C.Using the RMAN SRT NEWNAME command

D.Starting up the database instance in the NOMOUNT state

 

 

Answer: B 

答案解析:catalog 必须 switch

须启动到nomount状态来restore spfile和control file

同32题一样

 

699. Your database is using a default temporary tablespace that contains the temp01.tmp temporary file. All the users on the database use the default temporary tablspace. A user issues a query on the ORDERS table and receives the following error:

 

What would be the most efficient way to rectify this error?

A.Add a new tempfile to the user’s temporary tablespace and drop the tempfile  that produced the error.

B.Shut down the database instance, restore the temp01.tmp file from the backup, and then restart the database.

C.Allow the database to continue runn ing, drop the temp01.tmp temporary file, and then re-create it with new tempfiles.

D.Take the temporary tablespace offline, recover the missing tempfile by applying redo logs, and then bring the temporary tablespace online.  

 

 

Answer: A 

答案解析:

临时文件在删除后,数据库再次启动时会自动创建。

并且在数据库运行的过程中,使用rm删除,并不影响排序的查询。

我不会模拟出临时文件损坏的情况,但是,在临时文件损坏的情况下,可以增加一个临时文件,然后drop那个损坏的,就可以了。

另外A和C的区别就是先删除还是先增加?通过以下可知,当只有一个临时文件的时候,是不允许删除的。

故选A,此题答案有误。

sys@TEST1107> ALTER TABLESPACE TEMP DROP TEMPFILE '/u01/app/oracle/oradata/test1107/temp01.dbf';

ALTER TABLESPACE TEMP DROP TEMPFILE '/u01/app/oracle/oradata/test1107/temp01.dbf'

*

ERROR at line 1:

ORA-03261: the tablespace TEMP has only one file

 

700. Which two statements are true  about a duplicate database that is created by  using the DUPLICATE command in RMAN? (Choose two.)

A.It is a copy or a subset of the target database.

B.It is opened in RESTRICT mode after a duplicating operation.  

C.It is created by using backups and archived redo log files from the target database.

D.It is created with the same database identifier (DBID) as that of target database.

 

 

Answer: AC

答案解析:

根据the DUPLICATE command automatically assigns the duplicate database a different DBID D错误。

根据Opens the duplicate database with the RESETLOGS option B错误。

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

所以,正确答案应该为AC

If you copy a database with operating system utilities instead of the DUPLICATE command, then the DBID of the copied database remains the same as the original database. To register the copy database in the same recovery catalog with the original, you must change the DBID with the DBNEWID utility (seeOracle Database Utilities). In contrast, the DUPLICATE command automatically assigns the duplicate database a different DBID so that it can be registered in the same recovery catalog as the source database.

D错误。

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#BRADV89928

 

 

701. A user receives the following error while performing a large volume of inserts into a table:

 

The issue is resolved by increasing the space quota on the USERS tablespace for the user. But the user may perform such transaction in the future. You want to ensure that the command waits rather than produce an error when such an event occurs the next time.  What can you do to achieve this before running the command in the future?

A.Set RESUMABLE_TIMEOUT for the instance.

B.Set the RESOURCE_LIMIT Parameter to TRUE.

C.Enable the database instance to use asynchronous commit.

D.Set the LOG_CHECKPOINT_TIMEOUT parameter  to a nonzero value for the database instance.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/schema.htm#ADMIN11584

根据官方文档,此题选A

[oracle@rtest ~]$ oerr ora 1536

01536, 00000, "space quota exceeded for tablespace '%s'"

// *Cause:  The space quota for the segment owner in the tablespace has

//          been exhausted and the operation attempted the creation of a

//          new segment extent in the tablespace.

// *Action: Either drop unnecessary objects in the tablespace to reclaim

//          space or have a privileged user increase the quota on this

//          tablespace for the segment owner.

 

How Resumable Space Allocation Works

The following is an overview of how resumable space allocation works. Details are contained in later sections.

A statement executes in resumable mode only if its session has been enabled for resumable space allocation by one of the following actions:

The ALTER SESSION ENABLE RESUMABLE statement is issued in the session before the statement executes when the RESUMABLE_TIMEOUT initialization parameter is set to a nonzero value.

The ALTER SESSION ENABLE RESUMABLE TIMEOUT timeout_value statement is issued in the session before the statement executes, and thetimeout_value is a nonzero value.

A resumable statement is suspended when one of the following conditions occur (these conditions result in corresponding errors being signalled for non-resumable statements):

Out of space condition

Maximum extents reached condition

Space quota exceeded condition.

When the execution of a resumable statement is suspended, there are mechanisms to perform user supplied operations, log errors, and query the status of the statement execution. When a resumable statement is suspended the following actions are taken:

The error is reported in the alert log.

The system issues the Resumable Session Suspended alert.

If the user registered a trigger on the AFTER SUSPEND system event, the user trigger is executed. A user supplied PL/SQL procedure can access the error message data using the DBMS_RESUMABLE package and the DBA_ or USER_RESUMABLE view.

Suspending a statement automatically results in suspending the transaction. Thus all transactional resources are held through a statement suspend and resume.

When the error condition is resolved (for example, as a result of user intervention or perhaps sort space released by other queries), the suspended statement automatically resumes execution and the Resumable Session Suspended alert is cleared.

A suspended statement can be forced to throw the exception using the DBMS_RESUMABLE.ABORT() procedure. This procedure can be called by a DBA, or by the user who issued the statement.

A suspension time out interval, specified by the RESUMABLE_TIMEOUT initialization parameter or by the timeout value in the ALTER SESSION ENABLE RESUMABLETIMEOUT statement, is associated with resumable statements. A resumable statement that is suspended for the timeout interval wakes up and returns the exception to the user if the error condition is not resolved within the timeout interval.

A resumable statement can be suspended and resumed multiple times during execution.

 

702. View the Exhibit and examine the parameter settings in your server-side parameter file (SPFILE).

 

When you tried to start the database instance, you received the following error:

 

Why did the instance fail to start?

A.Because the PGA_AGGREGATE_TARGET parameter is not set

B.Because the STATISTICS_LEVEL parameter is set to BASIC

C.Because MEMORY_TARGET and MEMORY_MAX_TARGET cannot be equal

D.Because both the SGA_TARGET and MEMORY_TARGET parameters are set.

 

 

Answer: B 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory.htm#ADMIN11207

以下实验说明SGA_TARGET and MEMORY_TARGET可以同时set,而从官方文档看出STATISTICS_LEVEL initialization parameter must be set to TYPICAL (the default) or ALL

故这道题的答案D是错误的,正确应该为B

Setting SGA Target Size

You enable the automatic shared memory management feature by setting the SGA_TARGET parameter to a nonzero value. This parameter sets the total size of the SGA. It replaces the parameters that control the memory allocated for a specific set of individual components, which are now automatically and dynamically resized (tuned) as needed.

Note:

The STATISTICS_LEVEL initialization parameter must be set to TYPICAL (the default) or ALL for automatic shared memory management to function.

 

[oracle@rtest ~]$ oerr ora 824

00824, 00000, "cannot set SGA_TARGET or MEMORY_TARGET due to existing internal settings"

// *Cause: Could not set SGA_TARGET or MEMORY_TARGET due to current parameter settings.

// *Action: Check the other error messages for additional information.

sys@TEST1107> alter system set memory_target=1210M scope=spfile;

 

System altered.

 

sys@TEST1107> alter system set sga_target=500M scope=spfile;

 

System altered.

 

sys@TEST1107> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@TEST1107> startup

ORACLE instance started.

 

Total System Global Area 1269366784 bytes

Fixed Size                  2227984 bytes

Variable Size             805306608 bytes

Database Buffers          452984832 bytes

Redo Buffers                8847360 bytes

Database mounted.

Database opened.

sys@TEST1107> show parameter target 

 

NAME                                 TYPE        VALUE

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

archive_lag_target                   integer     0

db_flashback_retention_target        integer     1440

fast_start_io_target                 integer     0

fast_start_mttr_target               integer     0

memory_max_target                    big integer 1216M

memory_target                        big integer 1216M

parallel_servers_target              integer     128

pga_aggregate_target                 big integer 0

sga_target                           big integer 512M

sys@TEST1107> 

 

703. Given below are RMAN commands to enable backup optimization and set the retention policy:

 

The USERS tablespace has never been backed up. You take the USERS tablespace offline on Monday.View the Exhibit to examine the operations performed by using RMAN. Which two statements are true about the backup of the USERS tablespace? (Choose two.)

 

A.It will be backed up as a part of database backup on Friday.  

B.It will be backed up as a part of database backup on Tuesday.  

C.It will not be backed up as a part of database backup on Wednesday.  

D.The command on Sunday deletes the backup of the USERS tablespace taken on Tuesday.

 

 

Answer: BD 

 

答案解析:

从以下答案指导BD正确。

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV89464

Backup Optimization for SBT Backups With Redundancy Retention Policy

Assume that you configure a retention policy for redundancy. In this case, RMAN only skips backups of offline or read-only data files to SBT when there are r + 1 backups of the files, where r is set in CONFIGURE RETENTION POLICY TO REDUNDANCY r.

For example, assume that you enable backup optimization and set the following retention policy:

CONFIGURE DEFAULT DEVICE TYPE TO sbt;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

With these settings, RMAN only skips backups when three identical files are already backed up. Also assume that you have never backed up the userstablespace, which is read/write, and that you perform the actions described in Table 5-5 over the course of the week.

Table 5-5 Effect of Redundancy Setting on Backup Optimization

Day

Action

Result

Redundant Backup

Monday

Take users offline normal.

 

 

Tuesday

BACKUP DATABASE

The users tablespace is backed up.

 

Wednesday

BACKUP DATABASE

The users tablespace is backed up.

 

Thursday

BACKUP DATABASE

The users tablespace is backed up.

Tuesday backup

Friday

BACKUP DATABASE

The users tablespace is not backed up.

Tuesday backup

Saturday

BACKUP DATABASE

The users tablespace is not backed up.

Tuesday backup

Sunday

DELETE OBSOLETE

The Tuesday backup is deleted.

 

Monday

BACKUP DATABASE

The users tablespace is backed up.

Wednesday backup

 

The backups on Tuesday, Wednesday, and Thursday back up the offline users tablespace to satisfy the condition that three backups must exist (one more than redundancy setting). The Friday and Saturday backups do not back up the users tablespace because of backup optimization. The Tuesday backup of users is obsolete beginning on Thursday.

On Sunday, you delete all obsolete backups, which removes the Tuesday backup of users. The Tuesday backup is obsolete because of the retention policy setting. The whole database backup on Monday then backs up the users tablespace to satisfy the condition that three backups must exist (one more than redundancy setting). In this way, you can recycle your tapes over time.

 



RMAN> show all;

 

RMAN configuration parameters for database with db_unique_name TEST0221 are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

CONFIGURE BACKUP OPTIMIZATION ON;

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_test0221.f'; # default

 

RMAN> list backup;

 

specification does not match any backup in the repository

 

RMAN> sql 'alter tablespace users offline';----------星期一offline

 

sql statement: alter tablespace users offline

 

RMAN> backup database; -----------------星期二,全库备份

 

Starting backup at 06-MAR-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/test0221/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/test0221/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/test0221/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/test0221/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/test0221/users01.dbf

channel ORA_DISK_1: starting piece 1 at 06-MAR-14

channel ORA_DISK_1: finished piece 1 at 06-MAR-14

piece handle=/u01/app/oracle/fast_recovery_area/TEST0221/backupset/2014_03_06/o1_mf_nnndf_TAG20140306T123613_9khysyg0_.bkp tag=TAG20140306T123613 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 06-MAR-14

channel ORA_DISK_1: finished piece 1 at 06-MAR-14

piece handle=/u01/app/oracle/fast_recovery_area/TEST0221/backupset/2014_03_06/o1_mf_ncsnf_TAG20140306T123613_9khyxm0v_.bkp tag=TAG20140306T123613 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

Finished backup at 06-MAR-14

 

RMAN> backup database;----------星期三全库备份

 

Starting backup at 06-MAR-14

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/test0221/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/test0221/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/test0221/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/test0221/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/test0221/users01.dbf

channel ORA_DISK_1: starting piece 1 at 06-MAR-14

channel ORA_DISK_1: finished piece 1 at 06-MAR-14

piece handle=/u01/app/oracle/fast_recovery_area/TEST0221/backupset/2014_03_06/o1_mf_nnndf_TAG20140306T123854_9khyyyqz_.bkp tag=TAG20140306T123854 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:56

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 06-MAR-14

channel ORA_DISK_1: finished piece 1 at 06-MAR-14

piece handle=/u01/app/oracle/fast_recovery_area/TEST0221/backupset/2014_03_06/o1_mf_ncsnf_TAG20140306T123854_9khz2mf1_.bkp tag=TAG20140306T123854 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 06-MAR-14

 

 

704. View the Exhibit and examine the data manipulation language (DML) operations that you performed on the NEWEMP table. Note that the first two updated are not listed by the Flashback Versions Query.

 

What could be the reason?
A.The first two updated were not explicitly committed.
B.ALTER TABLE caused the recycle bin to release the space.
C.The data definition language (DDL) operation caused a log switch.
D.Flashback Versions Query stops producing versions of rows that existed before a change in the table structure.

 

Answer:C

 

705. View Exhibit1 to examine the DATA disk group when all the disks are online.  

  

Why is the rebalancing not performed and the content of  the disk group not empty in Exhibit2?

A.Because the disk group is created with NORMAL redundancy

B.Because the disk repair time attribute is set to a nonzero value

C.Because the mirrored extents cannot be rebalanced across the other three disks

D.Because the other three disks have 60% free space, the disk rebalancing is delayed

 

 

Answer: D 

答案解析:

途中对比,发现第二文件的path没有了,题中问为什么没有重新平衡。

因为设置了DISK_REPAIR_TIME 参数,to repair the disk and bring it back online,推迟了重新平衡。故选B。

Configuring Disk Repair Time

Specify a time period that is long enough for you to repair a disk in the disk group.

For information about disk group repair time, see "Oracle ASM Fast Mirror Resync".

http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10044、

 

Oracle ASM Fast Mirror Resync

Restoring the redundancy of an Oracle ASM disk group after a transient disk path failure can be time consuming. This is especially true if the recovery process requires rebuilding an entire Oracle ASM failure group. Oracle ASM fast mirror resync significantly reduces the time to resynchronize a failed disk in such situations. When you replace the failed disk, Oracle ASM can quickly resynchronize the Oracle ASM disk extents.

Note:

To use this feature, the disk group compatibility attributes must be set to 11.1 or higher. For more information, refer to "Disk Group Compatibility".

Any problems that make a failure group temporarily unavailable are considered transient failures that can be recovered by the Oracle ASM fast mirror resync feature. For example, transient failures can be caused by disk path malfunctions, such as cable failures, host bus adapter failures, controller failures, or disk power supply interruptions.

Oracle ASM fast resync keeps track of pending changes to extents on an OFFLINE disk during an outage. The extents are resynced when the disk is brought back online.

By default, Oracle ASM drops a disk in 3.6 hours after it is taken offline. You can set the DISK_REPAIR_TIME disk group attribute to delay the drop operation by specifying a time interval to repair the disk and bring it back online. The time can be specified in units of minutes (m or M) or hours (h or H). If you omit the unit, then the default unit is hours. The DISK_REPAIR_TIME disk group attribute can only be set with the ALTER DISKGROUP SQL statement.

If the attribute is not set explicitly, then the default value (3.6h) applies to disks that have been set to OFFLINE mode without an explicit DROP AFTER clause. Disks taken offline due to I/O errors do not have a DROP AFTER clause.

The default DISK_REPAIR_TIME attribute value is an estimate that should be adequate for most environments. However, ensure that the attribute value is set to the amount of time that you think is necessary in your environment to fix any transient disk error, and that you are willing to tolerate reduced data redundancy.

The elapsed time (since the disk was set to OFFLINE mode) is incremented only when the disk group containing the offline disks is mounted. The REPAIR_TIMERcolumn of V$ASM_DISK shows the amount of time left (in seconds) before an offline disk is dropped. After the specified time has elapsed, Oracle ASM drops the disk. You can override this attribute with the ALTER DISKGROUP OFFLINE DISK statement and the DROP AFTER clause.

 

706. You execute the following command to set the redundancy retention policy in Recovery Manager (RMAN):

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

Identify the statement that correctly describes the implications of this command.  

A, when there are already three backups, for the fourth backup RMAN removes the oldest backup.  

B. When there are already three backups, for the  fourth backup RMAN marks the oldest backup as obsolete. 

C. the number of backups that are retained is equal to three and it includes full, incremental, and cumulative backups.

D. when there are already three backup, one of the existing backups must be removed manually before taking the fourth backup.

 

 

Answer: B 

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmconfb.htm#BRADV89436

个人觉得应该选B,超过冗余度的备份,rman会标志为obsolete,除非使用DELETE OBSOLETE来删除。

Configuring a Redundancy-Based Retention Policy

The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many full or level 0 backups of each data file and control file that RMAN should keep. If the number of full or level 0 backups for a specific data file or control file exceeds the REDUNDANCY setting, then RMAN considers the extra backups as obsolete. The default retention policy is REDUNDANCY 1.

As you produce more backups, RMAN keeps track of which ones to retain and which are obsolete. RMAN retains all archived logs and incremental backups that are needed to recover the nonobsolete backups.

Assume that you make a full backup of data file 7 on Monday, Tuesday, Wednesday, and Thursday. You now have four full backups of this data file. IfREDUNDANCY is 2, then the Monday and Tuesday backups are obsolete. If you make another backup on Friday, then the Wednesday backup of data file 7 becomes obsolete.

Assume a different case in which REDUNDANCY is 1. You run a level 0 database backup at noon on Monday, a level 1 cumulative backup at noon on Tuesday and Wednesday, and a level 0 backup at noon on Thursday. Immediately after each daily backup you run the command DELETE OBSOLETE. The Wednesday DELETEcommand does not remove the Tuesday level 1 backup because this backup is not redundant: the Tuesday level 1 backup could be used to recover the Monday level 0 backup to a time between noon on Tuesday and noon on Wednesday. However, the DELETE command on Thursday removes the previous level 0 and level 1 backups.

Run the CONFIGURE RETENTION POLICY command at the RMAN prompt, as in the following example:

CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

 

707. Because of a logical corruption in the EMPLOYES tables, you want to perform Tablespace Point-in-Time Recovery (TSPITR) to recover the table. Before you started the TSPITR process, you queried the TS_PITR_CHECK view and you realized that the table has a referential constraint with DEPARTMENTS that exists in another tablespace, MASTERTBS. Which two actions will permit the TSPITR to work? (Choose two.)

A.Taking the MASTERTBS tablespace offline

B.Dropping the relationship between the tables

C.Adding the MASTERTBS tablespace to the recovery set

D.Putting the MASTERTBS tablespace in read-only mode

 

 

Answer: BC

答案解析:

http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmtspit.htm#BRADV99978

个人觉得这道题应该选BC。

If constraints for the tables in tablespace tbs1 are contained in tablespace tbs2, then you cannot recover tbs1 without also recovering tbs2.

 

 

708. You executed the following query:

 

Considering that all the redo logs are available, what information can you derive from the output of the preceding query?

A.The time when the last flashback operation in your database was performed

B.The time when the first flashback operation in your database was performed

C.The approximate time and the lowest system change number (SCN) to  which you can flashback your database

D.The system change number (SCN) and the time when the Flashback Database was enabled in the database instance

 

 

Answer: C 

答案解析:

题中问:考虑到所有的重做日志可用,什么样的信息可以来自上述查询的输出?

V$FLASHBACK_DATABASE_LOG

V$FLASHBACK_DATABASE_LOG displays information about the flashback data. Use this view to help estimate the amount of flashback space required for the current workload.

Column

Datatype

Description

OLDEST_FLASHBACK_SCN

NUMBER

Lowest system change number (SCN) in the flashback data, for any incarnation

OLDEST_FLASHBACK_TIME

DATE

Time of the lowest SCN in the flashback data, for any incarnation

RETENTION_TARGET

NUMBER

Target retention time (in minutes)

FLASHBACK_SIZE

NUMBER

Current size (in bytes) of the flashback data

ESTIMATED_FLASHBACK_SIZE

NUMBER

Estimated size of flashback data needed for the current target retention

 

709. A database has three online redo log groups with one member each. A redo log member with the status ACTIVE is damages while the database is running.What is the first step you should take to solve this problem?

A.Attempt to Issue a checkpoint.

B.Restart the database using the RESETLOGS option.

C.Drop the redo log number and create it in a different location.

D.Perform and incomplete recovery up to the most recent available redo log.

 

 

Answer: A

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90049

根据官方文档,此题应该选A

Recovering After Losing All Members of an Online Redo Log Group

If a media failure damages all members of an online redo log group, then different scenarios can occur depending on the type of online redo log group affected by the failure and the archiving mode of the database.

If the damaged online redo log group is current and active, then it is needed for crash recovery; otherwise, it is not. Table 30-4 outlines the various recovery scenarios.

Table 30-4 Recovering After the Loss of an Online Redo Log Group

If the Group Is...

Then...

And You Should...

Inactive

It is not needed for crash recovery

Clear the archived or unarchived group.

Active

It is needed for crash recovery

Attempt to issue a checkpoint and clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

Current

It is the redo log that the database is currently writing to

Attempt to clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

 

710. You executed the following commands in a database session:

 

Which statement is true about the contents of the recycle bin in this situation?

A.They remain unaffected.

B.They are moved to flashback logs.

C.They are moved to the undo tablespace.

D.They are moved to a temporary tablespace.

E.The objects in the recycle bin that are in the default tablespace for the session user are cleaned up.

 

 

Answer: E 

回收站中的对象在会话用户的默认表空间被清理掉了。

[oracle@rtest ~]$ oerr ora 1536

01536, 00000, "space quota exceeded for tablespace '%s'"

// *Cause:  The space quota for the segment owner in the tablespace has

//          been exhausted and the operation attempted the creation of a

//          new segment extent in the tablespace.

// *Action: Either drop unnecessary objects in the tablespace to reclaim

//          space or have a privileged user increase the quota on this

//          tablespace for the segment owner.

意思是没有足够的空间来创建myspace这张表。

 

711. The following command is executed to shut down an Automatic Storage Management (ASM) instance:

SQL>SHUTDOWN ABORT;

Which two statements describe the consequences of the above command? (Choose two.)

A.The disk groups are orderly dismounted.

B.The ASM instance requires recovery when it is started.

C.The database instance that are currently clients of the ASM instance are aborted.

D.The CSS daemon stops and has to be restarted before the ASM instance is restarted.

 

 

Answer: BC

答案解析:

参考:http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm#OSTMG13640

ABORT Clause

The Oracle ASM instance immediately shuts down without the orderly dismount of disk groups. This causes recovery to occur upon the next Oracle ASM startup.

If any database instance is connected to the Oracle ASM instance, then the database instance aborts.

If any Oracle Automatic Storage Management Cluster File System (Oracle ACFS) file systems are currently mounted on Oracle ADVM volumes, those file systems should first be dismounted. Otherwise, applications encounter I/O errors and Oracle ACFS user data and metadata may not be written to storage before the Oracle ASM storage is fenced. 

 

712 Why does the number of blocks for the table remain the sale after the shrink operation?
A.Because the table did not contain migrated or chained rows
B.Because the row IDs remain the same for all rows during the shrink operation
C.Because the progress of the shrink operation is not saved in the bitmap blocks of the table
D.Because the high-water mark (HWM) did not move due to the COMPACT option that is used in the shrink operation

 

答案解析:

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_3001.htm#sthref3374

 

COMPACT If you specify COMPACT, then Oracle Database only defragments the segment space and compacts the table rows for subsequent release. The database does not readjust the high water mark and does not release the space immediately. You must issue another ALTER TABLE ... SHRINK SPACE statement later to complete the operation. This clause is useful if you want to accomplish the shrink operation in two shorter steps rather than one longer step. 

 

选D。

 

 

 

 

 

 

 

posted on 2016-08-09 20:35  hoyong  阅读(2640)  评论(0编辑  收藏  举报