ocp 1Z0-043 1-60题解析

时间:2022-03-22 21:55:29

1.You observe that a database performance has degraded over
a period of time. While investigating the reason, you find the size of
the database buffer cache is not large enough to cache all the needed data
blocks. Which advisory component wold you refer to, in order to determine
that required size of the database buffer cache?
A. Memory Advisor
B. Segment Advisor
C. SQL Tuning Advisor
D. SQL Access Advisor
E. Automatic Database Diagnostic Monitor(ADDM)
Answer: A
你发现你的数据高速缓存区(Database Buffer Cache)不够用了,可以使用Memory
Advisor 来确定其大小,自动数据库诊断监视器 (ADDM):执行自上而下的实例分析,确定问
题和潜在的原因,并提供修复问题的建议案。ADDM 可潜在地调用其他指导。SGA 指导(Memory
Advisor):根据系统全局区(SGA) 中各个组件的访问模式,负责优化和建议SGA 的大小。
Adequate physical memory has a significant impact on the performance of your
Oracle Database. With its automatic memory management capabilities, Oracle Database
can automatically adjust the memory distribution among the various SGA and PGA
components for optimal performance. These adjustments are made within the boundaries
of the total amount of memory that you allocate to the database.
ADDM periodically evaluates the performance of your database to determine
performance problems. If ADDM finds that the current amount of available memory is
inadequate and adversely affecting performance, then it can recommend that you
increase memory allocations. You can select new memory allocations using the Memory
Advisors.
Additionally, you can use the Memory Advisors to perform what-if analysis on the
following:
The database performance benefits of adding physical memory to your database
The database performance impact of reducing the physical memory available to your
database
With the Memory Advisors, you can obtain memory sizing advice as follows:
If automatic memory management is enabled, then you can get advice for setting
the target amount of memory to allocate to the Oracle instance.
If automatic memory management is disabled and automatic shared memory management
is enabled, then you can get advice on configuring the target sizes of the SGA and
instance PGA.
If only manual shared memory management is enabled, then you can get advice on
sizing the shared pool, buffer cache, and instance PGA.
http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/montune.htm#A
DMQS1034
2.Exhibit
In your production database, the total waits and the time waited for log
file parallel write are significantly high. While investigating the
reason, you find that there are three redo log groups with two members
in each group, and all redo log members are places on a single physical
disk. What action would you take to minimize the waits?
A. Start the log writer slave processes
B. Increase the number of redo log files
C. Increase the size of the redo log buffer
D. Place the redo log files on the different disks.
E. Increase the number of log writer processes.
Answer:D
把日志建在不同的磁盘上来分散i/o 压力,提高写入速度
3. One of the tablespace is read-only in your database. The loss of all
control file forced you to recreate the control file. Which operation do
you need to perform after re-creating the control file and opening the
database?
A. Drop and re-create the read-only tablespaces
B. Rename the read-only data file to their correct file names.
C. Change the tablespace status from read/write to read-only.
D. Re-create the read-only tablespace because it is automatically
removed.
Answer: B
因为你的tablespace 是read-only 的,所以你只需要用rename 来update
一下controlfile 就可以了.
alter database rename file 'D:\ORACLE\ORA92\DATABASE\MISSING00005' to
'E:\DBDATA\ORADATA\RMIS\EXAMPLE01.DBF';
4. You have set some of the initialization parameters as:
DB_BLOCK_SIZE=8KB
SGA_MAX_SIZE=2GB
SGA_TARGET =0
SHARED_POOL_SIZE=120MB
DB_CHCHE_SIZE=896MB
STREAM_POOL_SIZE=0
LARGE_POOL_SIZE=110MB
Which two statements are correct?(Choose two).
A. You can not set a value for the DB_8K_CHCHE_SIZE parameter.
B. If you increase the size of the large pool to 120MB, then the memory
allocated to the shared poll will be reduced to 110MB.
C. If the value for SGA_TARGET is changed to 1GB and SHARED_POOL_SIZE is
120MB, then memory cannot be taken from the shared pool, even if the shared
pool has free space available.
D. If an application attempts to allocate more than 120MB from the shared
pool and free space is available in the buffer pool, then the free space
from the buffer pool is allocated to the shared pool.
Answer: AC
已经设置了DB_BLOCK_SIZE = 8k 就不能设置DB_8K_CACHE_SIZE 了
如果指定了shared pool size 那么就不能再缩小了,只能增大
不能使用DB_nK_CACHE_SIZE 参数来调整标准块的大小.例如,假如DB_BLOCK_SIZE 设置
为2K,设置DB_2K_CACHE_SIZE. 等于2K 是无效的.标准缓存的块大小总是由DB_CACHE_SIZE
决定的.
Oracle 10g 中,与内存相关的参数可以归为两类:
q 自动调优的SGA 参数:目前这些参数包括DB_CACHE_SIZE 、SHARED_POOL_SIZE、
LARGE_POOL_SIZE 和JAVA_POOL_SIZE。(注意LOG_BUFFER 不在自动之列)
q 手动SGA 参数:这些参数包括LOG_BUFFER 、STREAMS_POOL 、DB_NK_CACHE_SIZE、
DB_KEEP_CACHE_SIZE 和DB_RECYCLE_CACHE_SIZE。
在Oracle 10g 中,任何时候你都能查询V$SGAINFO,来查看SGA 的哪些组件的大小可以调
整。注意 要使用自动SGA 内存管理,参数STATISTICS_LEVEL 必须设置为TYPICAL 或ALL。
如果不支持统计集合,数据库就没有必要的历史信息来确定大小。
采用自动SGA 内存管理时,确定自动调整组件大小的主要参数是SGA_TARGET,这个参数可
以在数据库启动并运行时动态调整,最大可以达到 SGA_MAX_SIZE 参数设置的值(默认等于
SGA_TARGET , 所以如果想增加SGA_TARGET , 就必须在启动数据库实例之前先把
SGA_MAX_SIZE 设置得大一些)。数据库会使用SGA_TARGET 值,再减去其他手动设置组件的
大小(如 DB_KEEP_CACHE_SIZE、DB_RECYCLE_CACHE_SIZE 等),并使用计算得到的内存量来
设置默认缓冲区池、共享池、大池和 Java 池的大小。在运行时,实例会根据需要动态地对
这4 个内存区分配和撤销内存。如果共享池内存用光了,实例不会向用户返回一个ORA-
04031“Unable to allocate N bytes of shared memory”(无法分配N 字节的共享内存)
错误,而是会把缓冲区缓存缩小几MB(一个颗粒的大小),再相应地增加共享池的大小。
5. You are performing a block media recovery on the tools01.dbf data file
in the SALES database using RMAN. Which two statements are correct in this
scenario? (Choose two.)
A. You must ensure that the SALES database is mounted or open.
B. You must restore a backup control file to perform a block media
recovery.
C. You must take the tools01.dbf data file offline before you start a block
media recovery.
D. You must put the database in NOARCHIVELOG mode to perform a block media
recovery.
E. You can perform only a complete media recovery of individual blocks,
point-in-time recovery of individual data blocks is not supported.
Answer: A, E
数据库必须在mounted or open 状态下才可以使用RMAN BLOCKRECOVER
RMAN BLOCKRECOVER 始终执行完全恢复。使用BLOCKRECOVER 命令时,不能执行时间点恢复
point-in-time recovery=TSPITR
TSPITR 相关的概念和术语:
(1) TSPITR (Tablespace Point-In-Time Recover)。TSPITR 是表空间时间点恢复的英文缩
写格式,它表示将一个或多个表空间恢复到过去时间点的状态,而其他表空间仍然保持现有
状态。
(2) TSPITR 实现方法。当实现表空间时间点恢复时,既可以使用用户管理的表空间时间点
恢复方法,也可以使用RMAN 管理的表空间时间点恢复。
(3) DBPITR (Database Point-In-Time Recovery)。DBPITR 是数据库时间点恢复的英文缩
写格式,它表示将数据库的所有表空间恢复到过去时间点的状态。注意,DBPITR 只适用于
ARCHIVELOG 模式。
(4) 主数据库(Primary Database)。主数据库是指用于存放应用系统数据的Oracle 数据库,
也被称为产品数据库或目标数据库。当执行TSPITR 时,主数据库是指包含被恢复表空间的
数据库。
(5) 恢复集(Recovery Set)。恢复集是指在主数据库上需要执行 TSPITR 的表空间集合。注
意,当在恢复集的表空间上执行TSPITR 时,要求这些表空间必须是自包含的。
(6) 辅助数据库(Auxiliary Database)。辅助数据库是主数据库的一个副本数据库。当执行
TSPITR 时,辅助数据库用于将恢复集表空间恢复到过去时间点。注意,辅助数据库的所有
物理文件都是从主数据库备份中取得,并且辅助数据库必须包含SYSTEM 表空间、UNDO 表
空间以及恢复集表空间的备份文件。
(7) 辅助集(Auxiliary Set)。辅助集是指辅助数据库所需要的、除了恢复集表空间文件之
外的其他文件集合。当执行 TSPITR 时,辅助数据库除了需要恢复集表空间的备份文件之外,
还需要备份控制文件、SYSTEM 表空间的备份文件、UNDO 表空间的备分文件。
注意:恢复集表空间必须为自包含;
违反自包含表空间集合的常见情况如下:
1> 表空间集合包含有SYS 方案对象
2> 表空间集合包含了索引所在的表空间,但没有包含索引基表所在的表空间
3> 表空间集合没有包含分区表的所有分区
4> 表空间集合包含了表所在的表空间,但没有包含其LOB 列所在的表空间
检查自包含方式:
SQL> connect sys/oracle@demo as sysdba
SQL> execute dbms_tts.transport_set_check('user01',true);
SQL> Select * From transport_set_violations;
到了oracle10g,可不用这么麻烦了,我们会首先选择database flashback,将整个数据
库rollback 到某一个时间点,而不是表空间时间点恢复.
6.Exhibit
You executed the following command to perform a backup of the
USERStablespace:
RMAN > BACKUP TABLESPACE USERS;
Which type of backup would this command perform?
A. backup set
B. image copy
C. incremental backup
D. None; the user receives an error indicating that the backup type must
be specified.
Answer: A
缺省为CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;
如果要镜像备份: CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY;
7. In your database, online redo log files are multiplexed and one of the
members in a group is lost due to media failure?
How would you recover the lost redo log member?
A.import the database from the last export
B.restore all the members in the group from the last backup
C.drop the lost member from the database and then add a new member to the
group
D.restore all the database files from the backup and then perform a
complete recovery
E.restore all the database files from the backup and then perform an
incomplete recovery
Answer: C
Redo group 里如果有多个成员,那么他们是冗余的。 每个成员里的内容都
一样,所以删除再添加一个即可。
8. You are using Oracle Database 10g. Which statement regarding an
incomplete recovery is true?
A. You do not need to restore all the data files.
B. You do not need to open the database with the RESETLOGS operation
C. You do not need to perform a full backup after the RESETLOGS operation.
D. You do not need to recover all the data files to the same system change
number (SCN).
Answer: C
1:10g 以前,在进行了不完全恢复用resetlogs 打开后,必须立即执行全备份,因
为日志序号被复位,以防止后续日志被应用。
2:10g 后,控制文件保留了resetlogs 之前的归档日志序列,并且日志recid 继
续增长,允许跨越resetlogs 时间点进行完全/不完全恢复。(10g 前,使用当前控
制文件不再能够恢复之前的备份)。
Sql>select recid,stamp,first_change#,first_time,next_change# from
v$log_history where recid>###;
9.Exhibit
View the Exhibit and examine the Resource Manager settings for the gr
oups at different levels.
Which two effects would be the result of this setting? (Choose two.)
A. The members of LOW_GROUP would get more priority than those of OTH
ER_GROUPS.
B. The members of SYS_GROUP would get most of the CPU allocation at l
evel 1.
C. The members of LOW_GROUP would get most of the CPU allocation beca
use it has CPU allocation at two different levels.
D. The members of LOW_GROUP would get no CPU allocation at level1 if
the members of OTHER_GROUPS are using all the CPU at level 2.
E. The members of SYS_GROUP would get no CPU allocation at level 1 if
the members of OTHER_GROUPS are using all the CPU at level 2.
Answer: A, B
Editor’s notes:You can see the deail contents in <10GOCP 官方教材
043.pdf>.But,the knowledge of the managing resource is not so
popular.so,just see see.
resource plan 指的是整个系统CPU(O8i 只有CPU)的分配计画,
resource plan 是设定 cpu 使用权的先后顺序
例如 level 1 sys_group 100%
level 2 oltp 75%
level 2 dss 25%
表示sys_group 可用所有的CPU resource , 若其有剩下在按比率分给 oltp 与
dss,level 高的先分配
10. The current time zone for one of the user sessions is set to the
database local time zone. For one application, the user session requi
res the time zone to be set to the local operating system time zone w
ithout affecting other user sessions.
Which two solutions could the user implement to achieve this objectiv
e? (Choose two.)
A. use the ALTER SYSTEM command to change the time zone
B. use the ALTER SESSION command to change the time zone
C. use the ALTER DATABASE command to change the time zone
D. set the value for the operating system variable ORA_SDTZ on the cl
ient machine
E. set the value for the operating system variable ORA_SDTZ on the da
tabase server machine
Answer: B, D
对于一个应用,在你的回话中你想设定本地操作系统时间,而不影响其它的回话,
a、你需要使用 alter session 修改该会话的时间
b、在客户机上修改操作系统的参数ORA_SDTZ
11. You work as a database administrator at Certkiller .com. Your dat
abase is open and running in ARCHIVELOG mode. You take RMAN full bac
kups every Sunday night. On Monday morning, while querying the user1.
employees table, you receive the following error message:
01578: ORACLE data block corrupted (file # 5, block # 51)
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
You need to rectify the corruption while ensuring the following:
The data file should remain online. The mean time to recover (MTTR) s
hould be minimal. You are not using a backup control file and all the
archived logs are accessible. Which option would you choose?
A. flash back the corrupted blocks
B. use the DBMS_REPAIR package
C. use the RMAN TSPITR command
D. use the RMAN BLOCKRECOVER command
E. use the RESTORE DATABASE and RECOVER DATABASE commands
F. investigate the time at which the corruption occurred and perf
orm a point-in-time recovery
Answer: D
数据库在归档模式下,每个星期天进行一次全备份,星期一早晨发现数据块损
坏,要求MTTR 时间最少,要求data file 在线,所以最好的方法就是RMAN
BLOCKRECOVER
12. You are working on an Oracle Database 10g database. You enabled t
he Flashback Database feature. Which two statements regarding flashba
ck logs are true? (Choose two.)
A. Flashback logs are not archived.
B. Flashback logs are maintained in redo log files.
C. Flashback logs are maintained in the Flash Recovery Area.
D. Flashback logs are used to maintain Flashback Database related
errors.
E. Flashback logs need to be cleared manually after you disable F
lashback Database.
Answer: A, C
关于FLashback logs,首先FLashback logs 不会被归档,其次 FLashback
logs 会被存放在 flashback Recovery area,如果disable flashback
database,flashback log 会自动清除
Flashback Database uses the flashback logs to perform flashback.
Flashback Drop uses therecycle bin. All other techniques use undo data
注意Flashback log 不是记录错误的日志
13. You executed the following query:
SELECT operation, undo_sql, table_name FROM flashback_transaction_que
ry;
Which statement is correct regarding the query output?
A. It would return information regarding only the last committed tran
saction.
B. It would return only the active transactions in all the undo segme
nts in the database.
C. It would return only the committed transactions in all the undo se
gments in the database.
D. It would return both active and committed transactions in all the
undo segments in the database.
E. It would return information regarding the transactions that began
and were committed in the last 30 minutes.
Answer: D
该语句会查询到正在活动的(active)和committed 的undo 数据 什么叫活动的?
关于active 的一些信息,可参考:
select sum(bytes / 1024 / 1024), status, tablespace_name
from dba_undo_extents group by status, tablespace_name;
该查询将返回以STATUS 分组的各状态回滚信息所使用的空间量,一般存在三种STATUS 状态:
EXPIRED,UNEXPIRED,ACTIVE。ACTIVE 表示目前仍活跃的事务相关回滚信息,UNEXPIRED
表示虽然事务已经结束但回滚信息保留的时间仍未超过实例参数UNDO_RETENTION 所设定的
值,EXPIRED 表示回滚信息保留时间已超过UNDO_RETENTION 所设定的值。
在UNDO 表空间未启用guarantee 选项的情况下(当前使用情况),新事务的回滚空间分配
遵循以下依据:
a) 寻找不存在ACTIVE 区间的回滚段,若没有则创建一个新的回滚段,若空间不允许生成新
段,则返回错误。
b) 如果有一个回滚段被选中,但是其中空闲的空间并不足以存储该事务的回滚信息,那么
它将尝试创建区间,如果表空间上没有空间,那么将会进入下一步。
c) 如果创建新区间失败,它将会搜索其他回滚段中的EXPIRED 区间并重用。
d) 如果其他回滚段中没有EXPIRED 区间可使用,那么它会继续搜索其他回滚段中
UNEXPIRED 区间并重用,注意事务不会重用本回滚段中的UNEXPIRED 区间,故UNEXPIRED 的
回滚空间仅部分可以为Oracle 重用;若仍得不到所需则返回错误。
结论(warehouse):flashback_transaction_query 中的数据来自undo datafile,只要事务
对应的before image 在undo datafile 中存在,flashback_transaction_query 里面就可
以查询到数据...目前没发现受那个参数的制约
14. Consider the following configuration:
/devices/D1 is a member of disk group dgroupA.
/devices/D2 is a member of disk group dgroupA.
/devices/D3 is a member of disk group dgroupA.
You plan to add a new disk, /devices/D4,to the disk group dgroupA.
You execute the following command:
SQL> ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
Which task would be accomplished by the command?
A. The command adds the new disk, D4, to the disk group.
B. The command would result in an error because the is no disk by the
name "'/devices/D*'"
C. The command will be ignored because disks starting with "D" are al
ready members of the disk group.
D. The command would result in an error because no wildcard character
s can be used in the disk name.
E. The command first detaches all the member disks starting with "D",
and the reattaches them including the new disk.
Answer: A
Editor’s notes:
/devices/D1 is a member of disk group DGROUPA.
/devices/D2 is a member of disk group DGROUPA.
/devices/D3 is a member of disk group DGROUPA.
/devices/D4 is a candidate disk.
So,if you execute the command above,oracle will add a member automaticly.
Reblanceis automatically done as disks are added, dropped, or resized
ALTER DISKGROUP dgroupA ADD DISK '/devices/D*';
将D4 添加到 DGROUPA 磁盘组。由于其它磁盘已经是 DGROUPA 磁盘组的成员,
因此即使它们与搜索字符串匹配,第二个语句仍将忽略这些磁盘。向磁盘
组添加磁盘时,ASM 实例将确保该磁盘是可寻址的并且可用,然后,才会对该磁
盘进行格式化并使其重新平衡。由于需要将每个文件的分配单元移到新磁盘上,
因此重新平衡过程非常耗时。
15. You work as a database administrator at Certkiller .com. In your
production database there is a job, CALC_STAT, which has been schedul
ed to run every Friday at 5.00 p.m. CALC_STAT updates the optimizer s
tatistics for the objects owned by the APPS schema. You want the task
to be generic, there by allowing users to modify the attributes of th
e task at run time without affecting the original task.
Which component of Oracle Scheduler must you define to achieve this?
A. Window
B. Program
C. Job class
D. Window group
Answer: B
Scheduler 中的Program对象并不是常规意义上的"程序"或"应用",而就是一个"对象",由
DBA定义的,具有执行某项功能的特殊对象。Program中实际执行的操作可以分为下列三种类
型:
1.PL/SQL BLOCK :标准的pl/sql 代码块;
2.STORED PROCEDURE :编译好的PL/SQL 存储过程,或者Java 存储过程,以及外部的c 子
程序;
3.EXECUTEABLE :ORACLE 数据库之外的应用,比如操作系统命令等等。
实际上SCHEDULER 中创建job 时,也可以指定执行外部的程序。SCHEDULER 中的Job 更
像是之前版本继承过来的JOBS,只不过10g 中SCHEDULER 管理的JOBS 功能更加强大。
Programs 与Jobs 不同的是,Jobs 是定义好的,定时执行的任务,而Programs 则是定义好
的,等待被执行的对象。
• A window is represented by an interval of time with a well-defined beginning and
end,and is used to activate different resource plans at different times. This allows
you to change resource allocation during a time period such as time of day or time
of the sales year.
• A window group represents a list of windows, and allows for easier management of
windows. You can use a window or window group as the schedule for a job to ensure
that the job runs only when a window and its associated resource plan are active.
• A job class defines a category of jobs that share common resource usage requirements
and other characteristics. A job class groups jobs into larger entities.
• A resource consumer group associated with the job class determines the resources
that are allocated to the jobs in the job class.
• A resource plan enables users to prioritize resources (most notably CPU) among
resource consumer groups.
16. Immediately after adding a new disk to or removing an existing di
sk from an Automatic Storage Management (ASM) instance, you find that
the performance of the database decreases initially, until the addit
ion or removal process is completed.
Performance then gradually returns to normal levels. Which two activi
ties could you perform to maintain a consistent performance of the da
tabase while adding or removing disks? (Choose two.)
A. increase the number of checkpoint processes
B. define the POWER option while adding or removing the disks
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
E. increase the number of ASM Rebalance processes by setting up a hig
her value for ASM_POWER_LIMIT during the disk addition or removal Ans
wer: B, E
Editor’s notes:
在ASM 实例添加和删除磁盘,在没有完之前数据库会很慢,用什么方法可以在不影响数据库
速度的情况下添加或删除磁盘
Striping:条带化
条带化是把连续的数据分割成相同大小的数据块,把每段数据分别写入到阵列中不同磁
盘上的方法。此技术非常有用,它比单个磁盘所能提供的读写速度要快的多,当数据从第一
个磁盘上传输完后,第二个磁盘就能确定下一段数据。数据条带化正在一些现代数据库和某
些RAID 硬件设备中得到广泛应用。
ASM_POWER_LIMIT:该参数控制重新平衡操作的速度。值的范围在1 到 11 之间,11 表
示速度最快。如果省略,该值将默认为 1。从属进程的数量可以从手动重新平衡命令 (POWER)
中指定的并行级别派生,或者通过 ASM_POWER_LIMIT 参数派生。
ALTER DISKGROUP dg1 add disk ‘ddd’ REBALANCE POWER 5;
最小值0 代表不做Rebalance
最大值11 代表最快的速度,也意味最严重的性能影响
1 代表最慢的速度和最小的性能影响
重新平衡不会妨碍任何数据库操作。重新平衡进程主要会对系统上的 I/O 负载产生影响。
重新平衡的强度越高,它加在系统上的 I/O 负载也就越大。这样,可供数据库I/O 使用的
I/O 带宽就越少。
如果 ASM 环境是使用命令行而不是通过EM 创建的,则必须先创建磁盘组然后才能装
载。
ASM_POWER_LIMIT controls the speed for a rebalance operation. Values range from
1 to 11, with 11 being the fastest. If omitted, this value defaults to 1. The number
of slaves is derived from the parallelization level specified in a manual rebalance
command (POWER), or by the ASM_POWER_LIMIT parameter.
17. The current time is 12:00 noon. You want to recover the USERS tab
lespace from a failure that occurred at 11:50 a.m. You discover that
the only member of an unarchived redo log group containing informatio
n from 11:40 a.m. onwards is corrupt.
With reference to this scenario, if you are not using Recovery Manage
r (RMAN),
which recovery method would you use?
A. time-based recovery
B. log sequence recovery
C. cancel-based recovery
D. change-based recovery
Answer: C
使用recover database until cancel 进行恢复时,可以一直输入回车,直到没有归档
日志文件可用为止(在这种情况下,若已经将所有的在线日志文件归档,那么利用这种情况
可以恢复所有的数据);也可以在恢复的过程中,输入CANCEL,利用一部分归档日志文件
进行恢复(这种情况可能只能恢复一部分数据)。
In cancel-based recovery, recovery proceeds by prompting you with the suggested
filenames of archived redo log files. Recovery stops when you specify CANCEL instead
of a filename or when all redo has been applied to the datafiles.
Cancel-based recovery is better than change-based or time-based recovery if you
want to control which archived log terminates recovery.
For example, you may know that you have lost all logs past sequence 1234,
so you want to cancel recovery after log 1233 is applied.
RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
The database indicates whether recovery is successful. If you cancel before all the
datafiles have been recovered to a consistent SCN and then try to open the database,
you will get an ORA-1113 error if more recovery is necessary. As explained in
"Determining Which Datafiles Require Recovery", you can query V$RECOVER_FILE to
determine whether more recovery is needed, or if a backup of a datafile was not
restored prior to starting incomplete recovery.
(warehous 实验)把25,26 号删除,恢复到24,再手工输入联机日志文件,因为该语句
recover database using backup controlfile 是一个完全恢复,oracle 需要用到当前联机
日志的!(即使有相同序号的归档日志也不会用)现在已经恢复到26 号了,27 号没有了,加上
cancel 就行了,当成一个不完全恢复recover database using backup controlfile until
cancel;如果有当前日志实际上是一个完全恢复,现在可以alter database open resetlog
了.即使是完全恢复,oracle 的scn 还是有损失了,只要有损失,就必需resetlog 打开
18.You lost the PRODSTD tablespace, which was read/write. The tablesp
ace was read-only when the last backup was performed. How would you r
ecover the tablespace?
A. restore the tablespace from the backup; there is no need to ap
ply the redo information
B. restore the full database to recover the data up to the point
when you performed the backup
C. restore the tablespace from the backup and then perform a reco
very using the backup control file
D. restore the tablespace from the backup and then recover the ta
blespace; all the redo information from the point when the tablespace
was made read/write is applied
Answer: D
19. You are using an Automatic Storage Management (ASM) instance to m
anage the files of your production database. You have two disk groups
, DG1and DG2 with one device each. In the parameter file of the produ
ction database, the following parameters have been specified:
DB_CREATE_ONLINE_LOG_DEST_1 = '+dg1'
DB_CREATE_ONLINE_LOG_DEST_2 = '+dg2'
What would be the impact of this setting?
A. When a new log group is added, it would have one member in each di
sk group.
B. When a new log group is added, it would have two members in each d
isk group.
C. When a new tablespace is added, it would have one data file in eac
h disk group.
D. When a new log file is added, it would have one member spread acro
ss the disk groups.
Answer: A
DB_CREATE_ONLINE_LOG_DEST_1 = '+dg1'
DB_CREATE_ONLINE_LOG_DEST_2 = '+dg2'
当一个新的日志组加入了以后,会在每个磁盘组中有个成员。
Editor’s notes:
DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) specifies the default
location for Oracle-managed control files and online redo logs. If more than one
DB_CREATE_ONLINE_LOG_DEST_n parameter is specified, then the control file or online
redo log is multiplexed across the locations of the other
DB_CREATE_ONLINE_LOG_DEST_n parameters. One member of each online redo log is
created in each location, and one control file is created in each location.
Specifying at least two parameters provides greater fault tolerance for the
control files and online redo logs if one of the locations should fail.
If a file system directory is specified as the default location, then the
directory must already exist; Oracle does not create it. The directory must have
appropriate permissions that allow Oracle to create files in it. Oracle generates
unique names for the files, and a file thus created is an Oracle-managed file.
db_recovery_file_dest 参数启用redo、control、rman backups、archived logs、flashback
logs 文件的omf 管理,类似的db_create_online_log_dest_n 参数启用redo、control 的omf
管理,从中我们也可以看出redo、control 文件的重要性!!这三个参数对redo、control
文件位置的影响:
1.位置优先级:【control_files 初始化参数】 > db_create_online_log_dest_n >
db_recovery_file_dest >= db_create_file_dest
此处的等于号比较有意思:如果没有db_create_online_log_dest_n,而存在
db_create_file_dest 时,db_recovery_file_dest 就相当
db_create_online_log_dest_2,db_create_file_dest 则相当于
db_create_online_log_dest_1
2.redo 文件的多路复用
通常应该通过指定db_create_online_log_dest_n 来达到该目的!
3.如果三个参数指定相同的值会怎样?自己猜吧 :)
4.omf 文件的命名规则
<_dest_参数路径>/<db_unique_name_or_db_name>/<datafile>/o1_mf_%t_%u_.dbf
(做题目的时候容易想的跟选的不一致)
20. An RMAN backup job fails, displaying the following error:
ORA-19809: limit exceeded for recovery files
Your analysis shows that the Flash Recovery area is full. Which two a
ctions could you take to resolve the error and avoid this error in th
e future? (Choose two.)
A. take the backup of the flash recovery area less frequently
B. increase the value of the UNDO_RETENTION initialization parameter
C. change the value of the WORKAREA_SIZE_POLICY initialization parame
ter to AUTO
D. change the backup retention policy to retain the backups for a sma
ller period of time
E. increase the value of the DB_RECOVERY_FILE_DEST_SIZE initializatio
n parameter
F. increase the value of the CONTROL_FILE_RECORD_KEEP_TIME initializa
tion parameter
Answer: D, E
你的flash recovery area 空间不够用了
1、增加DB_RECOVERY_FILE_DEST_SIZE 的大小
2、修改保留策略
每次 RMAN 在快速恢复区中创建文件时,Oracle 数据库都会更新磁盘上不
再需要的文件的列表。
需要将某个文件写入快速恢复区但空间不够时,Oracle 数据库会删除位于
作废文件列表中的文件,并在预警日志中写入一条通知。由于快速恢复区中没有
文件可以删除,使快速恢复区的空间紧张或空闲空间过低时,将发出警告。
21. Your database operates in ARCHIVELOG mode. User-managed consisten
t backups are performed every Sunday night.
On Tuesday, client A drops a table at 8:00 a.m. as follows:
SQL> DROP TABLE cust_ord PURGE;
Table dropped.
Client B executes a query at 9:00 a.m. on the same table as follows:
SQL> SELECT * FROM cust_ord;
SELECT * FROM cust_ord
ERROR at line 1:
ORA-00942: table or view does not exist
Client B needs the dropped table and reports the problem to you.
With reference to this scenario, which action should you take?
A. retrieve the table by using the flashback feature
B. restore all the data files from last Sunday's backup and then perf
orm a time-based recovery
C. restore all the data files from last Sunday's backup and then perf
orm a log sequence recovery
D. restore all the data files from last Sunday's backup and then perf
orm a cancel-based recovery
E. restore from last Sunday's backup only data files that belong to t
he tablespace in which the table was stored and then perform a comple
te recovery
Answer: B
表被删除,同时purge 从recycle bin 中,无法使用闪回来闪回表,只能基
于scn 或时间的不完全恢复,因为是不完全恢复,必须基于数据库级,而且已经
知道时间要恢复的时间了,所以recover all data files 基于时间的不完全恢复。
22. You performed an incomplete recovery on your Oracle Database 10g
database using the following command:
SQL> RECOVER DATABASE
2 UNTIL TIME '2004-08-05:12:10:03'
3 USING BACKUP CONTROLFILE;
In which situation would the above recovery be required?
A. A user table was lost at the specified time.
B. A redo log file was lost at the specified time.
C. The backup control file is on a faster disk than the current one.
D. The current control file has a different path compared with the in
tended time of recovery.
E. The current control file does not match the physical structure of
the database at the intended time of recovery.
Answer: E
什么时候使用基于备份控制文件的恢复
基于备份控制文件恢复是指使用备份控制文件将数据库恢复到备份点与失败点之间某个时
刻的状态。
a、表空间被意外删除
b、所有控制文件全部损坏
比如说你不小心删除了一个表空间,那么current 控制文件肯定不包含被删除表空间的
信息,只能使用原来的控制文件
recover database using backup controlfile;
(加这句话告诉oracle 这个时候控制文件不是新的,最根本就是要告诉oracle 恢复的终点不
是当前控制文件所记录的scn,是多少,不明确)
recover database using backup controlfile 有可能是一个完全恢复,oracle 需要用到当
前联机日志的!现在已经恢复到26 号了,27 号没有了,加上cancel 就行了,当成一个不完全
恢复recover database using backup controlfile until cancel;如果有当前日志实际上
是一个完全恢复,现在可以alter database open resetlog 了,即使是完全恢复,oracle 的
scn 还是有损失了,只要有损失,就必需resetlog 打开
23. While creating a job class using the DBMS_SCHEDULER package, you
set the logging level to LOGGING_RUNS. What would be the impact of th
is setting?
A. Oracle Scheduler would write detailed information to the job log f
or each run of each job in the job class.
B. Oracle Scheduler would write detailed information to the job log f
or the first run of each job in the job class.
C. Oracle Scheduler would write detailed information to the job log f
or each run of only the first job in the job class.
D. Oracle Scheduler would write detailed information for all operatio
ns performed on all jobs in the job class.
Answer: A
Editor’s notes:
任务类(job class)任务类的特有参数:
(1)job_class_name :必须在sys 模式内唯一
(2)resource_consumer_group :此任务类属于哪一个资源消费群。
(3)service :在RAC 下,只在指定服务名的实例上运行。
(4)logging_level :可以设定写在任务日志中的内容。有三个值:
dbms_scheduler.logging_off :无日志。
dbms_scheduler.logging_runs :只记录任务运行产生的日志。
dbms_scheduler.logging_full :记录任务的所有情况。
(5)log_history :指定了日志内容的保留天数。默认是30 天。超出时间的内容会被自动
清除。
创建任务类:
dbms_scheduler.create_job_class(
job_class_name => 'name',
resource_consumer_group => 'group',
logging_level => dbms_scheduler.logging_runs)
Job Logging
By default, all job runs are logged. However, when creating a new class, you
can specify parameters that further control what information is logged and how long
the logging information is retained. The logging_level parameter for a class can
be set to one of the following constant values of the DBMS_SCHEDULER package:
·LOGGING_OFF: No logging is performed for any jobs in this class.
·LOGGING_RUNS: The scheduler writes detailed information to the job log for
each run of each job in this class.
·LOGGING_FULL: Besides recording every run in the job log, the scheduler also
logs all other operations performed on all jobs in this class, such as creating new
jobs, enabling or disabling jobs, and so on.
The DBA_SCHEDULER_JOB_LOG view stores a row for each job operation
logged.
The log_history parameter specifies how many days a log entry remains in the
log before it is eligible for purging.
A PURGE_LOG job is created automatically. This job clears out old log entries
once a day. Log entries may also be cleared out manually by using the
DBMS_SCHEDULER.PURGE_LOG procedure.
http://blog.csdn.net/tianlesoftware/archive/2009/10/23/4715218.aspx
24. You are designing an application for Certkiller .com and you have
been asked to design a database table to facilitate monthly bill gen
eration. The bill would include details of customer calls, listed in
chronological order. Which method would you follow to achieve this ob
jective without increasing the overhead of sorting the rows?
A. create a hash cluster to store the data
B. create an index cluster to store the data
C. create a partitioned table to store the data
D. create a sorted hash cluster to store the data
E. create a heap table with rowid to store the data
Answer: D
Editor’s notes:There are three cluster types:index cluster/hash cluster/sort hash
cluster.how can these cluster types be uesd?
簇是一个或多个表的组合,这些表的数据存储在相同的数据块中,当通过簇键查询这些
表时,只需读一个数据块就能返回连接的多个表的数据;
关于hash cluster 和sorted hash cluster,在TOM 的那本<Expert Oracle Database
Architecture: 9i and 10g Programming Techniques and Solutions>第10 章有相当清楚
地讲解。在相同hash 值对应的块里面,数据行是按指定的列排序存储的。
索引聚簇表是表相关的表共享同一数据块中的相同列,并把相关数据存储中同一个数据
块上。创建索引聚簇表中最重要的是对SIZE 参数有很好的估量,否则聚簇将会降低空间利
用,降低效率。
使用索引聚簇表的注意点:
1、如果表中数据有大量DML 操作的话,那么聚簇将不适用,因为会消极地影响到DML 性能。
2、聚簇中,全表扫描将受到影响。这是因为将扫描聚簇中不同表的数据,额外增加很多无
用的数据。
3、如果经常TRUNCATE 表和装载表的话,聚簇将不适用。聚簇中的表无法被TRUNCATE 的,
这是因为每个块中不只是存储一张表的数据。
SQL> truncate table emp;
ORA-03292: Table to be truncated is part of a cluster
4,如果大部分是读取操作,且通过聚簇码索引或聚簇表中其他索引来读取的话,聚簇将会比
较比较适用。
索引聚簇加载数据应该是同时装载同一聚簇码的所有数据,而不是一次装载聚簇中不同
表的数据。这是因为如果一次装载单张表数据的话,很有可能单个码值的数据大于SIZE 指
定的数据,但是由于聚簇码已经分配完成,此时将会聚簇码块有许多链接块,影响性能。通
过一次装载每个码值对应的数据,可以更好地利用聚簇块的空间。
散列(哈希)聚簇表:概念上同索引聚簇表一样,不同的是用哈希函数代替了索引聚簇
码来进行数据的分配。事实上在散列聚簇中数据就是索引,因为数据决定行的物理位置。散
列聚簇表中ORACLE 根据行的码值,利用内部函数或提供的函数对聚簇码值进行运算,以决
定数据的物理存储位置。散列聚簇通常意味着如果通过聚码访问的话,一个IO 就能够提取
到所需的数据。创建散列聚簇时,必须指定散列码值的数目。由于使用哈希函数来确定数据
的分布,对散列聚簇表不能使用范围扫描。全扫描散列聚簇表时,不论表是否为空,ORACLE
将全扫描所有块,这是因为散列聚簇中数据块都是预先分配的。散列聚簇的初始数据装
载将会比较慢。自定义的散列函数限定只能使用表中可用的列和ORACLE 内置函数。
散列聚簇要点:
1、 散列聚簇通过散列码查询的时候需要的IO 很少。几乎一个IO 就可以提取到所需的数据,
除非发生了行溢出。而传统索
引至少需要2 个IO 才能得到数据。
2、散列聚簇查询CPU 开销大。散列聚簇是CPU 密集型的,而索引是IO 密集型的。
3、对表中数据量比较有把握,如行数,每行占用空间,有合理的上限,正确设置好HASHKYES
和SIZE 参数,那么散列聚簇将比较适用。
4、散列聚簇降低DML 性能。
5、总是经常通过HASHKEY 等值访问数据。
http://www.itpub.net/viewthread.php?tid=442689&highlight=Index%2BCluster(需试
验)
http://www.itpub.net/viewthread.php?tid=138815&highlight=index%2Bcluster
25. You set the recovery window to seven days and the backup optimiza
tion to ON using the CONFIGURE command of Recovery Manager (RMAN). Th
e most recent backup of the TOOLStablespace to disk was taken on Janu
ary 3. The TOOLStablespace is read-only. On February 21, when you exe
cute a command to back up all the tablespaces to disk, you find that
RMAN backs up the TOOLStablespace also, even though the contents of t
he tablespace have not changed after the backup on January 3. Because
there are no changes made to the TOOLStablespace, you decide that th
e tablespace should not be backed up by RMAN. What can you do to skip
backing up the TOOLStablespace without changing the current backup
optimization setting?
A. configure a default device for RMAN backups
B. temporarily disable the retention policy for RMAN backups
C. configure automatic channel allocation for RMAN backups
D. use the CONFIGURE command to reconfigure the recovery window to 60
days
Answer: D
Editor’s notes:
Backup Optimization When Backing Up Backup Sets If backup
optimization is enabled when you issue the command to back up a backup
set, and if the identical backup set has already been backed up to the
same device type, then RMAN skips the backup of this backup set. For
example, when backup optimization is turned on, the following command
backs up to tape only those backup sets not already backed up on device
type sbt:BACKUP DEVICE TYPE sbt BACKUPSET ALL;
置备份优化可以跳过已经备份而且规定时间内没有变化的数据
26. Exhibit:
You want to configure the Flashback Database feature and retain flash
back logs for three days.
The steps used in this process are displayed in the exhibit.
In what sequence would you need to perform these steps to enable the
Flashback Database feature?
A. D, C, A, B, E
B. D, A, C, B, E
C. B, D, C, E, A
D. D, B, E, C, A
Answer: A
27. In which scenarios would you rebuild an index? (Choose all that a
pply.)
A. when you need to disable the index usage
B. when you need to change storage options
C. when you need to enable index monitoring
D. when you need to move the index to another tablespace
Answer: B, D
哪种情况下需要你需要重建索引
a、当你需要改变存储选项
b、当你需要把索引移动到其它的表空间
28. You enabled Automatic Shared Memory Management. The initializatio
n parameters are set as shown below:
SGA_TARGET= 10GB
SGA_MAX_SIZE = 14GB
STREAMS_POOL_SIZE = 1GB
SHARED_POOL_SIZE = 3GB
Which two statements are correct in this scenario? (Choose two.)
A. A maximum of 3 GB can be allocated to shared pool.
B. The value for SGA_TARGET can be increased up to a maximum of 14 GB
C. A total of 14 GB memory will be allocated to the automatically tun
ed memory components.
D. Increasing the value for SGA_TARGET will automatically increase th
e memory allocated for STREAMS_POOL_SIZE.
E. Increasing the value for SGA_TARGET to 12 GB will automatically in
crease the memory allocated to autotuned parameters.
F. Reducing the value for SGA_TARGET to 9 GB will automatically decre
ase the memory allocated to shared pool from 3 GB to 2 GB.
Answer: B, E
SHARED_POOL_SIZE 设置值后只会增加,不会减少
29. Which statement correctly describes the change tracking writer (C
TWR) background process?
A. It keeps track of changes in the background processes.
B. It records the system change number (SCN) in the control file.
C. It writes audit records for user changes to the change tracking fi
le.
D. It records any changes to the listened configuration in the listen
er.ora file.
E. It records any changes to the database parameters in the change tr
acking file.
F. It records the physical location of all the changes that are made
to the database in the change tracking file.
Answer: F
(Change Tracking Writer)CTWR-执行增量备份的目的是为了只备份自上一
次备份以来更改过的数据块。每个增量备份过程中都会读取整个数据文件,即使
自上次增量备份以来该文件只有很小一部分进行了更改。块更改跟踪功能使用更
改跟踪写进程 (CTWR) 这一后台进程将所有数据库更改的实际位置,记录到名为
“更改跟踪文件”的新类型的文件中。启用更改跟踪后,第一个级别为 0 的增
量备份仍须扫描整个数据文件,因为更改跟踪文件尚未反映块的状态。对于后续
增量备份,RMAN 将使用更改跟踪数据来确定增量备份过程中要读取的块,无需
读取整个数据文件,从而提高了性能。
Explanation:
This is a new process Change Tracking Writer (CTWR) which works w
ith the new block changed tracking features in 10g for fast RMAN incr
emental backups.
This is a clarification of the documentation for sizing the Block
Change Tracking File.
Block Change Tracking is used to optimize incremental backups. A new
file is introduced:
- Changed blocks are tracked by the CTWR background process as redo i
s generated
- Database backups automatically use the change tracking file Sizing
of this file is important, and even though you can use
V$BLOCK_CHANGE_TRACKING view to monitor the usage, it may in some cas
es not be easy to change the size, ie when using raw devices.
RMAN 可以不再扫描整个文件以查找变更数据。
30. You work as a database administrator at Certkiller .com. In your
production database, you observe that users' transactions are consumi
ng a lot of resource and you plan to impose resource restrictions by
using Resource Manager. For which three resources can you enable usag
e restrictions by using Resource Manager? (Choose three.)
A. CPU usage
B. degree of parallelism
C. number of open cursors
D. number of sorts performed
E. idle time for blocking sessions
F. number of disk I/O operations performed
G. number of memory I/O operations performed
Answer: A, B, E
数据库资源管理器提供了多种分配资源的方式:
1.CPU 方法: 可以指定在使用者组和子计划之间如何分配 CPU 资源。
2.并行度限制:可以控制使用者组中任何操作的最大并行度。
3.具有队列的活动会话池:可以限制使用者组或子计划的并发活动会话数。如果某个组的会
话数超过了允许的最大值,则新的会话将放在队列中,等待某个活动会话完成。您还可
以指定会话在退出并返回错误之前将等待的时间限制。
4.还原池:可以控制使用者组或子计划能够生成的还原操作的总数。当还原空间的总数超过
UNDO_POOL 指定的数量时,在相同组中其它会话释放还原空间或者增大使用者组的还原池之
前,不允许执行任何新的 INSERT、UPDATE 或 DELETE 命令。如果使用者组在执行 DML 语
句时超过了限额,则中止操作并返回错误。此时仍可进行查询,即便使用者组已经超出其还
原阈值。
5.执行时间限制:可以指定操作所允许的最大执行时间。Oracle 数据库使用基于成本的优
化程序统计信息来估计操作所需的时间。如果耗时超过了所允许的最大时间
(MAX_EST_EXEC_TIME),则操作返回错误并且不会启动。如果资源使用者组有多个指
定了 MAX_EST_EXEC_TIME 的计划指令,则资源管理器将选择所有传入值中限制性最
强的那个值。
6.空闲时间限制:可以指定会话的空闲时间,超过该时间后将终止会话 (MAX_IDLE_TIME)。
可以进一步限制资源管理器,使其只终止阻塞其它会话的(MAX_IDLE_TIME_BLOCKER)。
另: create user test7 identified by test7 default profile;
口令10 次锁定 password 验证函数 idle time cpu 空闲
建立新的profile sys: @..\rdbms\admin\utlpwdmg.sql;可以修改这段脚本
password 验证函数 verify_function
31. You have specified the warning and critical threshold values of a
n application tablespace to be 60% and 70% respectively. From the tab
lespace space usage metrics, you find that the actual space usage has
reached the specified warning threshold value, but no alerts have be
en generated. What could be the reason for this?
A. The EVENT parameter was not set.
B. The SQL_TRACE parameter is set to FALSE.
C. The Enterprise Manager Grid Control is not used.
D. The STATISTICS_LEVEL parameter is set to BASIC.
E. The TIMED_STATISTICS parameter is set to FALSE.
Answer: D
statistics_level 默认是typical,在10g 中表监控是激活的,强烈建议在
10g 中此参数的值是typical.如果STATISTICS_LEVEL 设置为basic,不仅不能监
控表,而且将禁掉如下一些10g 的新功能:
ASH(Active Session History)
ASSM(Automatic Shared Memory Management)
AWR(Automatic Workload Repository)
ADDM(Automatic Database Diagnostic Monitor)
32. You executed the following command in Recovery Manager (RMAN) aga
inst your Oracle 10g database:
RMAN> REPORT NEED BACKUP days 3;
What would be the output of this command?
A. a list of files that require a backup within three days
B. a list of files that have not been backed up for three days
C. a list of files that RMAN recommends be backed up only once in eve
ry three days, based on low volatility
D. a list of files for which a backup has already been performed and
may need a backup after three days
Answer: B
要报告需要三个或更多增量备份来进行恢复的文件:
RMAN > REPORT NEED BACKUP incremental 3 database;
要报告三天以来尚未进行备份的系统文件:
RMAN > REPORT NEED BACKUP days 3 tablespace system;
要报告需要进行备份以恢复到三天前的数据状态:
REPORT NEED BACKUP recovery window of 3 days;
如果不具有两个或更多个备份则需要进行备份 redundancy 冗余
REPORT NEED BACKUP redundancy 2
这个report 出来的应该都是数据文件,而不是备份集或者映像副本
33. Your database operates in ARCHIVELOGmode. The redo log files are
not multiplexed and one of the online redo logs is missing. The missi
ng redo log sequence, 230, is not archived and it contained informati
on from 10:35 a.m. onwards. The current time is 11:00 a.m. Because of
a disk crash, you executed the following command to perform an incom
plete recovery:
RMAN> RUN {
2> SET UNTIL SEQUENCE 230 THREAD 1;
3> ALTER DATABASE MOUNT;
4> RESTORE DATABASE;
5> RECOVER DATABASE;
6> ALTER DATABASE OPEN RESETLOGS;
7> };
With reference to this scenario, which statement is true?
A. RMAN recovers up to log sequence 230, but not including 230.
B. RMAN returns an error because the log sequence number mentioned in
the command should be 229.
C. RMAN returns an error because the log sequence number mentioned in
the command may never be missing.
D. RMAN recovers up to and including log sequence 229 but then return
s an error because log sequence 230 is missing.
Answer: A
由于未被归档redo log file 丢失,比如说230 丢失,如果不执行基于取消的
恢复,那么数据库只能恢复到229,使用命令SET UNTIL SEQUENCE 230 THREAD 1
recover database until '2009/12/27 14:37:24';
恢复出来是小于那个时间点
http://www.itpub.net/thread-1014022-1-1.html
34. In your database, all the tablespaces are locally managed. You st
arted Recovery Manager (RMAN) using recovery catalog and restored the
control file by using the following command:
RMAN> RESTORE CONTROLFILE;
Which two operations do you need to perform after restoring the contr
ol file from backup? (Choose two.)
A. shut down and restart the instance
B. add new tempfiles to the temporary tablespaces after recovery
C. perform a media recovery and open the database with the RESETLOGS
option
D.perform a media recovery and bring the database to NOARCHIVELOG mod
e
Answer: B, C
在使用了RESTORE CONTROLFILE 后你需要做什么
a、重新建立临时文件
b、使用recover database 后,用resetlogs 打开数据库(截断scn)
(题目问的是使用了RESTORE CONTROLFILE 后你需要做什么????)
35. While designing your database, you have created the EMPLOYEES tab
le as an index-organized (IOT). You want to create a bitmap index on
the JOD_ID column to make queries faster. Which task must have been c
ompleted so that you are able to create the bitmap index?
A. A primary key must have been created.
B. A mapping table must have been created.
C. An overflow tablespace must have been specified.
D. The PCTTHRESHOLD option must have been specified.
Answer: B
A mapping table is required for creating bitmap indexes on an
index-organized table.
你创建了一个IOT 表,想在上面的其中一列建立位图索引,你必须建立一
个mapping table
注意到Mapping table 是个heap table, 用来存储IOT table 的logical
rowid (primary key)。 Mapping table 的每一行存储了对应的IOT 表中记录
的logical rowid.
因此这个mapping table 就维护了IOT 表logical rowid 和 mapping table
的每一行的physical rowid 的mapping 的关系。为什么要这样做呢?
因为bitmap 索引条目中保存的rowid 要用physical rowid, 而IOT 是无法
提供稳定的physical rowid 的,因此就借助于mapping table 的physical rowid。
通过bitmap 索引来访问表中的数据的执行计划大概就是首先根据bitmap
index 中的physical rowid 访问mapping table, 然后通过mapping table 中的
logical rowid 再来访问IOT 表。
36. Exhibit
One of the important tables in the USERS tablespace was dropped and p
urged from the recycle bin at 9:00 a.m. You noticed this
at 11:00 a.m. and you want to perform an incomplete recovery to recov
er the table. Which statement is true?
A. You must recover all data files to the required system change numb
er (SCN).
B. You must recover all data files, except those that are offline, to
the required SCN.
C. You must recover all data files belonging to the USERS tablespace
to the required SCN.
D. You cannot recover all data files because segment space management
is performed manually for the undo tablespace.
Answer: B
不完全恢复只能针对整个数据库,不能针对某个表空间或某个数据文件
应该只restore USERS 表空间的文件,但恢复需要将所有文件(除了离线的)恢复到同一
SCN.
不同的声音:I think there are two ways to recover the tables. One is as describled
in answer C. That's is TPITR(tablespace point in time recovery). Another way is fulll
database incomplete recovery which is like a clone the database and recover the
cloned database to the point-in-time. So answer A seems like for this purpose.
It's not necessary to have the same SCN between controlfile abd datafile to bring
datafiles (tablespace) online. So that is the mechanism of TSPITR incomplete
recovery. I think the answer C is correct. Why I suggested to choose A is that with
answer A it could do incomplete table recovery by cloning a database. With this
consideration, the answer A and B should be ththe same because you don't need recover
any datafiles which were offlined before.Wish it helps.(我也无法确认)
37. You work as a database administrator at Certkiller .com. Your pro
duction database uses an Automatic Storage Management (ASM) instance
to manage its files. You want to add a new disk group to the ASM inst
ance to manage the increased data load. What action would you perform
to include the new disk group in the ASM instance without causing an
y impact on the currently connected users?
A. mount the new disk group in the ASM instance
B. restart the ASM instance and the production database instance
C. register the new disk groups in the production database instance
D. restart the ASM instance without restarting the production databas
e instance
E. include the new disk group in the ASM_DISKSTRING parameter in the
parameter file and restart the ASM instance
Answer: A
要使用 ASM,在启动数据库实例之前,必须启动一个名为 ASM 实例的特殊实
例。ASM 实例不会装载数据库,而是管理使 ASM 文件可用于普通数据库实例所
必需的那些元数据。ASM 实例和数据库实例都能访问一些公共的磁盘集,这些公
共磁盘集称为磁盘组。数据库实例直接访问 ASM 文件的内容,它们与ASM 实例
通信的目的只是为了获取这些文件的布局信息。
ASM 指的是一个在物理卷(或者磁盘分区)上特别为Oracle 数据文件而创建
的"专用"文件系统。该文件系统由Oracle 内核保存并维护,Oracle 知道数据所
处的位置,并自动管理这些位置,进而获得适用于数据库的最高性能和最大可用

38. The DB_BLOCK_CHECKING initialization parameter is set to TRUE. Wh
at would be the result of this setting on the data blocks being writt
en to the datafiles, every time the DBWn writes?
A. The Oracle database will check all data blocks by going through
the data on each block, making sure the data is self-consistent.
B. The DBWn and the direct loader will calculate a checksum and store
it in the cache header of every data block when writing it to disk.
C. The Oracle database will check data blocks belonging to the SYSTEM
tablespace only, by going through the data on each block, making
sure the data is self-consistent.
D. The Oracle database will check data blocks belonging to the SYSAUX
tablespace only, by going through the data on each block, making
sure the data is self-consistent.
E. The Oracle database will check data blocks in the SYSTEM and SYSAU
X tablespaces only, by going through the data on each block, making s
ure the data is self-consistent.
Answer: A
DB_BLOCK_CHECKING=ture,改为TRUE 之后会有4 种状态,Oracle 数据库将
对所有数据块执行块检查。Oracle 数据库通过读取块中的数据来检查块,以确
保此数据块的自我一致性。
Editor’s notes:
DB_BLOCK_CHECKING has four values showed like that:OFF | LOW | MEDIUM
| FULL
Off will not check the data bolck,but system tablespace’s data block
will always check.
Low will check the basic block header off all data block that changed
in memory(eg. Update or insert).
Medium and full is check more than off.
39. In your production database you want to use an Automatic Storage
Management (ASM) instance to manage the database files. Which option
would you use to migrate the database files from a non-ASM instance t
o an ASM instance?
A. Oracle Migration Assistant
B. Recovery Manager (RMAN)
C. Oracle Data Pump Export and Import
D. conventional Oracle Export and Import
E. operating system utilities to copy the files to the ASM instance
Answer: B
40. In the parameter file of your production database, the CONTROL_FI
LE_RECORD_KEEP_TIME parameter is set to 31. What would be the impact
of this setting on the backup that is being performed by using Recove
ry Manager (RMAN)?
A. The backup would be retained on the media for 31 days.
B. The backup would be maintained in the recovery catalog for 31
days.
C. The backup metadata would be retained in the control file for
31 days.
D. The backup metadata would be maintained in the recovery catalo
g for 31 days.
E. Automatic backups of the control file will be retained in the
flash recovery area for 31 days.
Answer: C
监控控制文件记录重写:
没有恢复目录的情况下,oracle 的控制文件记录了所有的历史备份记录,为了保证控
制文件不会无限制的增长,oracle 提供了一个可以设置控制文件保留时间的阀值的初始化
参数:CONTROL_FILE_RECORD_KEEP_TIME.
例如我们设置了CONTROL_FILE_RECORD_KEEP_TIME=14,任何超过14 天的纪录都有可能
被覆盖,如果没有超过14 天 的记录,oracle 将扩展控制文件的大小,如果由于受到操作
系统的限制(比如磁盘空间满)无法扩展控制文件的大小,oracle 会强制覆盖最老的记录
并 且在alter.log 中记录这一情kccwnc: following controlfile record written over:
快速恢复区Flash Recovery Area 和控制文件记录保存时间参
CONTROL_FILE_RECORD_KEEP_TIME 之间的相互作用
如果我们在使用快速恢复区保留RMAN 备份的话,控制文件将记录恢复区中文件的创建
记录,因为一般来讲文件创建的记录要比执行备份的信息要晚, 如果有备份文件超过了
CONTROL_FILE_RECORD_KEEP_TIME 参数所规定的时间,ORACLE 试图删除这些这些文件,否则
ORACLE 将增加控制文件的大小并且在alter.log 中记录这一情况。如下所示:
kccwnc: tring to expand controlfile section nnnn for Oracle Managed Files
如果无法扩展控制文件,则alter.log 中将出现以下信息:
WARNING: Oracle Managed File filename is unknown to controlfile. This is the result
of limitation in control file size that could not keep all recovery area files.
也就是不能满足备份的保留冗余策略来保存备份了。
为了避免和降低这种情况的发生,我们可以采取以下措施:
使用32K 大小的块创建控制文件,如果想设置控制文件32K 大小的BLOCK,我们必须首
先把SYSTEM 表空间设置成为大于或者等于控制文件使用的BLOCK SIZE.修改了控制文件
BLOCK_SIZE 后,必须重建控制文件。
使用BACKUP RECOVERY AREA 命令备份快速恢复区使得快速恢复区的文件成为可以删除的文
件, 或者减小备份保留时间或者减小备份保留冗余度维护控制文件中的RMAN 备份存储库。
41 . You decided to change the location of the flash recovery area. Y
ou executed the following command:
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+disk1' SCOPE=BOTH SID='*';
Which statement is true?
A. The location can be changed only if the flash recovery area is emp
ty.
B. After executing the command, all new flash recovery area files wil
l be created in the new location.
C. The command will generate an error because you cannot change the f
lash recovery area while the database is open.
D. All the existing files in the flash recovery area will be moved to
the new location and all new Flash Recovery Area files will be creat
ed in the new location.
Answer: B
你决定改变flashback area 的位置,但你改变位置后,新的flash recovery
area 将被放到新的地方,应该由DB_RECOVERY_FILE_DEST 来决定flash recovery
area 位置,这个DB_RECOVERY_FILE_DEST_SIZE 决定其大小
42. Exhibit
A user has inserted wrong department data in the DEPT3 table in the U
SERS tablespace. You use the Flashback Table functionality to rectify
the erroneous inserts. While performing the recovery, you choose 200
4343 as the Flashback SCN.
Which two statements are correct in this scenario? (Choose two.)
A. Only the row with DEPARTMENT_ID 290 would be flashed back.
B. The rows with DEPARTMENT_ID 290 and 300 would be flashed back.
C. The rows with DEPARTMENT_ID 290 and 280 would be flashed back.
D. You would have taken the USERS tablespace offline before starting
the Flashback Table operation.
E. You would have enabled row movement for the DEPT3 table before sta
rting the Flashback Table operation.
Answer: C, E
而参考答案是B,E,质疑
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
SQL> drop table t_dept; (注:sys 用户不支持闪回)
SQL> create table t_dept(a int);
SQL> insert into t_dept values(280);
SQL> commit;
sql> select current_scn from v$database;
64812593
SQL> insert into t_dept values(290);
SQL> commit;
sql> select current_scn from v$database;
64812602
SQL> insert into t_dept values(300);
SQL> commit;
sql> select current_scn from v$database;
64812617
SQL> col a for 9999
SQL> select VERSIONS_STARTSCN,versions_starttime,versions_operation ,a
from t_dept versions between timestamp minvalue and maxvalue
order by VERSIONS_STARTSCN desc;
1672658637 15-12 月-10 05.34.12 下
午 I 300
1672658557 15-12 月-10 05.31.03 下
午 I 290
1672658487 15-12 月-10 05.28.20 下
午 I 280
SQL> alter table t_dept enable row movement;
SQL> flashback table t_dept to scn 1672658557;
SQL> select * from t_dept;
280
290
从最后的结果来看 也是先删除了表的3 行数据,在flashback 会280,290 2 行数据
实验结果表明 答案应该是CE
44. Your database is running on the automatic Program Global Area (PG
A) memory management and Shared Memory Management mode. You want to i
ncrease the memory available for the SQL work areas. What would you d
o?
A. modify the HASH_AREA_SIZE initialization parameter
B. modify the PGA_AGGREGATE_TARGET initialization parameter
C. modify the WORK_AREASIZE_POLICY initialization parameter
D. increase the value of the SGA_TARGET initialization parameter
E. increase the value of the SGA_MAX_SIZE initialization parameter
F. increase the value of the SORT_AREA_SIZE initialization parameter
Answer: B
With PGA_AGGREGATE_TARGET, sizing of work areas for all dedicated
sessions is automatic and all *_AREA_SIZE parameters are ignored for these
sessions.
自动管理共享内存功能要求将STATISTICS_LEVEL 设置为 TYPICAL 或 ALL。
PGA_AGGREGATE_TARGET
在自动 PGA 内存管理模式下运行时,所有会话的工作区大小的调整都是自动
的,在该模式下运行的所有会话都会忽略*_AREA_SIZE 参数(例如
SORT_AREA_SIZE)。在任何给定时间,可用于实例中各活动工作区的 PGA 内存
总量自动从PGA_AGGREGATE_TARGET 初始化参数派生。此内存量设置为
PGA_AGGREGATE_TARGET 值减去系统其它组件分配的 PGA 内存量(例如,会话
分配的PGA 内存)。由此得到的PGA 内存随后按照各活动工作区的特定内存需
求分配给相应的工作区
45. On Tuesday, a junior DBA dropped an important application user ac
count, whose schema has important tables. You are asked to recover al
l the objects in the schema. On investigation, you find that the user
account was dropped at 11:00 a.m. and Sunday's backup is the most re
cent backup. Which flashback feature would you use?
A. Flashback Drop
B. Flashback Table
C. Flashback Database
D. Flashback Version Query
E. Flashback Transaction Query
Answer: C
Flashback Database 类似rman 的不完全恢复,它可以把数据库回退到过去某
个时间点的状态.
Flashback Drop 只是恢复单个table
46. A redo log file is corrupted while the database is open; as a con
sequence, database operations are stopped because archiving cannot co
ntinue. What would you do to solve the problem?
A. clear the redo log group
B. perform redo log file import
C. perform an incomplete recovery
D. perform a redo log recovery using Recovery Manager (RMAN)
E. shut down the database and open the database in the NOARCHIVELOG m
ode
Answer: A
数据库在打开的状态下日志坏掉,然后数据库自动关了,那个坏掉的日志没
有归档。只需要使用命令clear redo log group 就行了,同时由于缺少了一部
分archive log 需要整个数据库重新备份一下
47. You are working on an Oracle Database 10g database. Because of da
ta loss, you decided to perform a Flashback Database operation using
the following command:
SQL> FLASHBACK DATABASE TO TIMESTAMP(SYSDATE ?5/24);
Which two statements are true? (Choose two.)
A. SYSDATE should not be used with TIMESTAMP.
B. The database must have multiplexed redo log files.
C. The database must be in the MOUNT state to execute the command.
D. The database must be opened with the RESETLOGS option after the fl
ashback operation.
E. The entire database needs to be restored from the most recent back
up before the flashback operation.
Answer: C, D
The database must be mounted in exclusive mode to issue the FLASHB
ACK DATABASE command and must be opened with the RESETLOGS option whe
n finished.
48. You work as a database administrator at Certkiller .com. In your
test database, you find that a user's session is executing a lot of S
QL statements, resulting in the generation of a large number of trace
files. While investigating the reason, you find that SQL trace has b
een enabled at the instance level. You want to disable SQL trace, rem
otely, only for that user session to reduce the volume of trace data
being generated. How do you achieve this objective?
A. by setting the SQL_TRACE parameter to FALSE in the parameter file
B. by using DBMS_MONITOR.SESSION_TRACE_DISABLE to disable the tracing
for the user session
C. by setting the SQL_TRACE parameter to FALSE by using the ALTER SYS
TEM command in the user session
D. by setting the SQL_TRACE parameter to FALSE by using the ALTER SES
SION command in the user session
Answer: B
模块级别跟踪:
SQL> exec dbms_monitor.serv_mod_act_trace_enable(service_name =>
'EDGAR', module_name =>
用户级别跟踪:
SQL> exec dbms_monitor.client_id_trace_enable(client_id => 'DEMO');
Client_id 就是数据库中的用户名。
会话级别跟踪:SQL> exec dbms_monitor.session_trace_enable(138);138 就
是会话ID.
DBMS_MONITOR 是在Oracle 10g 中引入的内置的程序包,通过该程序包可以
跟踪从客户机到中间层、再到后端数据库的任何用户的会话,从而可以较为容易
地标识创建大量工作量的特定用户。
SQL_TRACE 是Oracle 提供的用于进行SQL 跟踪的手段,是强有力的辅助诊断
工具.在日常的数据库问题诊断和解决中,SQL_TRACE 是非常常用的方法。
大多数时候我们使用sql_trace 跟踪当前进程.通过跟踪当前进程可以发现当前
操作的后台数据库递归活动(这在研究数据库新特性时尤其有效),
研究SQL 执行,发现后台错误等.
在session 级启用和停止sql_trace 方式如下:
启用当前session 的跟踪:
SQL> alter session set sql_trace=true;
此时的SQL 操作将被跟踪:
SQL> select count(*) from dba_users;
结束跟踪:
SQL> alter session set sql_trace=false;
49. You execute the following command to enable a session in resumabl
e mode:
SQL> ALTER SESSION ENABLE RESUMABLE TIMEOUT 60;
What is the impact of a timeout on the statements being suspended?
A. The statements remain suspended for at least 60 seconds.
B. The statements are suspended for 60 seconds and then they are exec
uted.
C. The suspended statements error out if the problem is not rectified
within 60 seconds.
D. The statements are automatically suspended 60 seconds after an err
or is received, and then attempt to execute normally again.
Answer: C
Oracle 提供了一种 方法,当对数据库执行操作时,出现分配存储空间失败的错
误时,Oracle 不是简单的返回错误信息,并回滚整个事务,而是将执行的语句
置于悬挂状态,等待一段时间,在等待时间内,如果问题得到解决,则语句会继
续执行下去,如果问题一直无法解决,则会报错并回滚。产生SUSPEND 的前提是
当前的session 处于ENABLE RESUMABLE 状态。而且发出的语句遇到下面三种错
误:空闲空间不足、达到最大的MAXEXTENTS 和达到用户的空间QUOTA 限制。
C 选项,如果在60s 内没有解决问题,挂起状态将报错。按理说A 选项也应该是
对的,就是说挂起状态会保留至少60s,不知道是不是至少出的错.
50. You are managing an Oracle Database 10g database that uses Oracle
Managed Files (OMF). You enabled the block change tracking feature f
or the database. Which statement regarding the change tracking file i
s true?
A. One block change tracking file is created for each data file. By d
efault, the file is created in DB_CREATE_FILE_DEST.
B. One block change tracking file is created for each data file. By d
efault, the file is created in BACKGROUND_DUMP_DEST.
C. One block change tracking file is created for the database. By def
ault, the file is created in DB_CREATE_FILE_DEST.
D. One block change tracking file is created for the database. By def
ault, the file is created in BACKGROUND_DUMP_DEST.
Answer: C
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
由于没有指定存放路径,那么会按照Oracle Managed Files (OMF)参数
DB_CREATE_FILE_DEST 指定的路径
Oracle managed file (OMF)
A file that is created automatically by the Oracle database server when
it is needed and automatically deleted when it is no longer needed.
如何判断你的数据库是否为支持OMF
SQL> show parameter db_create_file_dest;
如果Value 为空则不支持,有值则支持。
51. You want to use the SQL Tuning Advisor to generate recommendation
s for badly written SQL statements in your development environment. W
hich three sources can you select for the advisor to analyze? (Choose
three.)
A. Top SQL
B. snapshots
C. SQL Tuning sets
D. index access path
E. optimizer statistics
F. materialized view logs
Answer: A,B,C
SQL 优化指导(SQL Tuning Advisor):提供优化SQL 语句的建议
可以使用top sql、snapshots(AWR)、SQL Tuning sets 可供SQL Tuning
Advisor 来分析
结果依据:Copyright &copy; 2004, Oracle10g Administration Workshop II 教
程 351 页(共604 页)
Using the SQL Tuning Advisor
• Use the SQL Tuning Advisor to analyze SQL statements and obtain
performance recommendations.
• Sources for SQL Tuning Advisor to analyze:
– Top SQL: Analyzes the top SQL statements currently active
– SQL Tuning Sets: Analyzes a set of SQL statements you provide
– Snapshots: Analyzes a snapshot
– Baselines: Analyzes a baseline
52. The loss of which two types of files may require a recovery with
the RESETLOGS option?(Choose two.)
A. control files
B. password file
C. archived log files
D. system-critical data files for which all the redo entries are
present
E. non-system-critical data files for which all the redo entries
are present
Answer: A, C
几点总结:(eygle:)
1:只要拥有当前日志文件,就可以执行完全恢复,是否需要resetlogs 方式打开,
取决是否使用备份的控制文件。
2:如果日志文件没有损失,可以通过重建控制文件的方法来完成完全恢复,这种
情况下,不再需要通过resetlogs 方式打开数据库。
3:如果恢复执行到某一个日志文件停止,数据库要以读写方式打开,则必须执行
resetlgos 打开。
(warehous:)
select file#,checkpoint_change# from v$datafile;(来自控制文件)
select file#,checkpoint_change# from v$datafile_header;(来自数据文件)
当两个结果不相等,需open resetlogs,即截断多余的scn
53. There was media failure and you need to check the data files for
any block corruption. Which option would you use to create a report o
n any corruptions found within the database?
A. the DBNEWID utility
B. the DBVERIFY utility
C. the ANALYZE command
D. the RMAN REPORT command
E. the RMAN CROSSCHECK command
F. the CHECK_OBJECT procedure of the DBMS_REPAIR package
Answer: B
DBVERIFY:是一种外部命令行实用程序,可以对脱机或联机的数据库执行
物理数据结构完整性检查。可以对备份文件与联机文件(或文件片段)运行此实
用程序。只能检查数据文件;不能检查重做日志文件
ANALYZE:使用 ANALYZE 命令可以验证表或表分区的结构,以及索引或索引
分区的结构。要分析的对象必须位于本地计算机,并且必须是在您自己的方案中,
或者必须拥有ANALYZE ANY 系统权限。CASCADE 选项可以验证对象,包括该对象
的所有相关对象。不将块标记为软损坏;只报告软损坏情况
RMAN CROSSCHECK:当手工删除了归档日志以后,Rman 备份会检测到日志缺
失,从而无法进一步继续执行。所以此时需要手工执行crosscheck 过程,之后
Rman 备份可以恢复正常。
54. You find that the execution time of reports in your datawarehouse
application is significantly high. You suspect the lack of indexes to
be the reason for the degradation in performance. Which advisory comp
onent would you refer to, in order to determine the appropriate index
es?
A. Memory Advisor
B. Segment Advisor
C. SQL Access Advisor
D. Automatic Workload Repository (AWR)
E. Automatic Database Diagnostic Monitor (ADDM)
Answer: C
你发现你的数据仓库中的执行报告时间非常慢,你怀疑是缺少相应的索引,
可以使用SQL Access Advisor(SQL 访问指导)
SQL 访问指导:处理方案问题并确定最佳数据访问路径(如索引和实体化视
图) 。实体化视图=物化试图
物化视图是包括一个查询结果的数据库对像,它是远程数据的的本地副本,
或者用来生成基于数据表求和的汇总表。物化视图存储基于远程表的数据,也可
以称为快照。
55. You have created a resource plan, PROD_DB_PLAN, with the followin
g consumer groups with the respective plan directives:
Consumer group SALES with CPU_P1as 60 and DEGREE_OF_PARALLELISM as 4.
Consumer group MARKET with CPU_P1 as 20.
Consumer group DEV with CPU_P1 as 20.
Consumer group OTHERS with CPU_P1as 0 and CPU_P2 as 100.
Which two statements are correct in this scenario? (Choose two.)
A.The maximum degree of parallelism for the members of the consumer g
roups is 4.
B.The CPU allocation will always be equal for the consumer groups MAR
KET and DEV.
C.The OTHERS consumer group would get 100% of the CPU if there are un
used level 1 CPU resources.
D.The SALES and MARKET consumer groups would get 100% of the CPU if t
here are unused level 2 CPU resources.
E.The maximum degree of parallelism for the members of the consumer g
roup SALES is 4 with no restriction for the remaining groups.
Answer: C,E
parallelism :平行 restriction :约束
对于b 选项:说明他们最多都占20%资源,但实际应用中不可能占用相等的资源
alway 就错了
56. A user executes a query on the EMP table, which contains thousand
s of rows, to get details about employees in one of the
departments. The user receives the following error:
SQL> SELECT ename FROM emp WHERE deptno=10 ORDER BY sal;
SELECT ename FROM emp WHERE deptno=10 ORDER BY sal
ERROR at line 1:
ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
ORA-01110: data file 201: '/u01/app/oracle/oradata/orcl/temp01.dbf'
What is a possible reason?
A. The tempfile belonging to the default temporary tablespace is miss
ing.
B. The database is opened in restricted mode, so queries are not allo
wed
C. The default temporary tablespace required to execute the query is
offline.
D. The default temporary tablespace required to execute the query is
dropped.
E. The default temporary tablespace required to execute the query is
read-only.
Answer: A
Default tempporay tablespace 不能设置为read-only,offline 和drop
57. You executed the following command in Recovery Manager (RMAN):
RMAN> RESTORE CONTROLFILE;
Which operation must you perform before this command is executed?
A. back up the control file to trace
B. bring database to the MOUNT state
C. open a connection to the RMAN recovery catalog, which contains the
RMAN metadata for the target database
D. set the database ID (DBID), but only if the DB_NAME parameter asso
ciated with the target database is unique in the recovery catalog
Answer: C
另: 1.使用增量备份只能用rman 在catalog 情况下,从nomount 就可以恢复
2.如果不看备份脚本,目前从备份文件或是catalog 信息无法判断是差异增
量还是累计增量的
3. rman>create script sc1{
delete noprompt backup;
backup as compressed backupset full database;
backup archivelog all;}
只有catalog 下情况用rman>list script names;
1 个catalog 可以对多库(至于库名 DB_NAME 是否唯一需实验)
rman>run{execute sript sc1}; 可以写成批处理里面
rman>delet copy;
58. Exhibit
Using Database Control, you have scheduled a job to shrink the TRANS
table residing on the TT tablespace. The job would run at 5:00 p.m. e
very Friday. When you examine the space usage of the table after the
completion of the job, you find that the table has not been shrunk. W
hat could have been the reason for this?
A. The tablespace that contains the TRANS table is online.
B. The tablespace that contains the TRANS table is permanent.
C. The tablespace that contains the TRANS table is locally managed.
D. The segment space management of the tablespace that contains the T
RANS table is manual in nature.
Answer: D
Shrink 优点:
1: shrink 命令让表缩小,cascade 命令会让相关的索引也同时缩小。
2: 执行shrink 命令的时候就不需要rebuild index。而执行move 命令之后无
法使用index,所以无法利用index 查找。要解决这个问题让index 恢复可以使
用的状态,必须对index 进行rebuild。
3:即使对象所在表空间几乎没有空闲空间,shrink 命令也能执行。
SQL> alter table emp shrink space;
Table altered.
SQL> alter table emp move;
AUTOSEG_TST 表空间没有足够的空闲空间。
Shrink 缺点:
1.无法解除行迁移
2.必须是local 管理的自动段管理
3.不可以是下面的段:
-集群(cluster)、集群化表
-包含long 列的物件
-LOB 段
-包含函数索引(function index)的表
另外move 命令的执行时间很短,根据情况选择
59. The warning and critical threshold values have been set to 85% an
d 97%, respectively, for one of the tablespaces. The current tablespa
ce space usage is 54%. You modify the warning threshold to be 50 % an
d critical threshold to be 53% in Database Control. Which statement i
s true?
A. The new setting would be applied but no alerts would be raised imm
ediately.
B. The new setting would be applied and an alert would be raised imme
diately.
C. The new setting would be ignored because the tablespace space usag
e is more than the specified threshold value.
D. The new setting would cause an error because the tablespace space
usage is more than the specified threshold value.
Answer: A
当你更改了警告和严重的门限后(往小改,已经达到了门限),该更改会立
即生效,但是数据库不会立即产生告警。
60. You defined the Recovery Manager (RMAN) retention policy to recov
ery window of 7 days by executing the following command:
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
When a backup is performed, what would be the status of this backup a
fter seven days?
A. The backup would be marked as invalid.
B. The backup would be marked as obsolete.
C. The backup would be removed from the media.
D. The backup would be removed from the RMAN repository.
Answer: B
RECOVERY WINDOW 7 设置为7 天,同时使用命令report obsolete
会列出备份集或者映像副本超出两天时间过期了

ocp 1Z0-043 1-60题解析的更多相关文章

  1. 【12c OCP】CUUG OCP认证071考试原题解析(36)

    36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...

  2. 【Oracle 12c】CUUG OCP认证071考试原题解析(35)

    35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evalu ...

  3. 【12c OCP】CUUG OCP认证071考试原题解析(34)

    34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...

  4. 【12c OCP】CUUG OCP认证071考试原题解析(33)

    33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Exami ...

  5. 【Oracle 12c】CUUG OCP认证071考试原题解析(32)

    32.choose the best answer View the Exhibit and examine the data in EMP and DEPT tables. In the DEPT ...

  6. 【Oracle 12c】CUUG OCP认证071考试原题解析(31)

    31.choose the best answer Which statement is true regarding the USING clause in table joins? A) It c ...

  7. 【Oracle 12c】CUUG OCP认证071考试原题解析(30)

    30.choose the best answer Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS: ...

  8. 【Oracle 12c】CUUG OCP认证071考试原题解析(29)

    29.choose the best answer Evaluate the following query: SQL> SELECT promo_name || q'{'s start dat ...

  9. 啤酒和饮料&vert;2014年蓝桥杯B组题解析第一题-fishers

    啤酒和饮料|2014年第五届蓝桥杯B组题解析第一题-fishers 啤酒和饮料 啤酒每罐2.3元,饮料每罐1.9元.小明买了若干啤酒和饮料,一共花了82.3元. 我们还知道他买的啤酒比饮料的数量少,请 ...

  10. 牛客网刷题&lpar;纯java题型 31~60题&rpar;

    牛客网刷题(纯java题型 31~60题) 重写Override应该满足"三同一大一小"三同:方法名相同,参数列表相同,返回值相同或者子类的返回值是父类的子类(这一点是经过验证的) ...

随机推荐

  1. durex-word

    "(半夜没睡着) “你是不是饿了,哎呀我也饿了.”" "(聊到合拍处) “我和你有一万句me too想要说.”" "(异地恋) “我辞职,去你那儿吧! ...

  2. cpu主频信息

    yangkunvanpersie ( yangkunvanpersie@163.com ) 通过"有道云笔记"邀请您查看以下笔记 修改CPU频率.note   打开笔记 kerne ...

  3. Spring boot centos7 后台服务安装部署

    Spring boot 应用服务安装部署(maven工程) 1.首先在maven工程的pom文件中引入以下标签并保存 <build> <plugins> <plugin& ...

  4. 【Spring】Spring框架之Struts2和Spring的优点

    Java Web开发使用Structs2和Spring框架的好处 今年我一直在思考web开发里的前后端分离的问题,到了现在也颇有点心得了,随着这个问题的深入,再加以现在公司很多web项目的控制层的技术 ...

  5. netty概念

    Netty的ChannelFuture在Netty中的所有的I/O操作都是异步执行的,这就意味着任何一个I/O操作会立刻返回,不保证在调用结束的时候操作会执行完成.因此,会返回一个ChannelFut ...

  6. http 报文

    HTTP报文详解 HTTP有两种报文:请求报文和响应报文,具体介绍如下 一.HTTP请求报文 先上个图,细细分析 HTTP请求报文主要包括请求行.请求头部以及请求的数据(实体)三部分 请求行(HTTP ...

  7. Python 中的 is 和 id

    (ob1 is ob2) 等价于 (id(ob1) == id(ob2)) 首先id函数可以获得对象的内存地址,如果两个对象的内存地址是一样的,那么这两个对象肯定是一个对象.和is是等价的.Pytho ...

  8. php实例-正则获取网站音频地址的实例&lpar;Listen to this 1&rpar;

    主要用到了:file_get_contents();preg_match_all(); 这2个函数 查看地址:http://git.oschina.net/xiaoz6/phpExample

  9. OpenCC的编译与多语言使用

    OpenCC全称Open Chinese Convert,是一个Github上面的开源项目,主要用于简繁体汉字的转换,支持语义级别的翻译.本文就来简单介绍一下该库的编译以及python.C++和JAV ...

  10. win10 adb(Android Debug Bridge)导出日志

    百度了一下 各种设置环境变量.放到system32文件夹(64位系♂统放到C:\Windows\SysWOW64)等 公司电脑win10系统 方便多了 把环境变量设置啥的全删了 adb下载地址:htt ...