ocp 1Z0-043 61-130题解析

61. You are working in an online transaction processing (OLTP) enviro
nment. You realize that the salary for an employee, John, has been ac
cidentally modified in the EMPLOYEES table. Two days ago, the data wa
s in the correct state. Flashback logs generated during last two days
are available in the flash recovery area. Which option would you cho
ose to bring the data to the correct state while ensuring that no oth
er data in the same table is affected?
A. perform point-in-time recovery
B. perform a Flashback Table operation to restore the table to the st
ate it was in two days ago
C. perform a Flashback Database operation to restore the database to
the state it was in two days ago
D. perform Flashback Versions Query and Flashback Transaction Query t
o determine all the necessary undo SQL statements, and then use them
for recovery
Answer: D
Flashback Query 只能看到某一点的对象状态,Flashback Version Query 可以
看到过去某个时间段内,记录的演变历史。
(快速定位,因为是错误的修改表记录,只能闪回查询)
62. When performing a backup using Recovery Manager (RMAN), which fou
r types of files can be backed up with the RMAN BACKUPcommand? (Choos
e four.)
A. data file
B. password file
C. archivelog file
D. temporary file
E. online redo log file
F. the current control file
G. the tnsnames.ora file
H. current server parameter file
Answer: A, C, F, H
Online redo log file are not supported.
63. You were recently hired by Certkiller .com as a database administ
rator. You are asked to find out whether the currently functional lis
tener process, named L1, has been password protected or not. You are
not familiar with the file system of the new organization. How would
you accomplish the task?
A. by using the STATUS command of the Listener control utility
B. by using the STATUS L1 command of the Listener control utility
C. by using the SHOW RULES command of the Listener control utility
D. by using the SET PASSWORD command of the Listener control utility
E. by searching for the PASSWORD_LISTENER entry in the listener.ora f
ile
Answer: B
lsnrctl status l1 查看l1 的监听状态和是否设置密码保护
64. These are the details about V$FLASHBACK_DATABASE_STAT:
SQL> DESC v$FLASHBACK_DATABASE_STAT
Name Null Type
BEGIN_TIME DATE
END_TIME DATE
FLASHBACK_DATA NUMBER
DB_DATA NUMBER
REDO_DATA NUMBER
ESTIMATED_FLASHBACK_SIZE NUMBER
Which two statements regarding the V$FLASHBACK_DATABASE_STAT view ar
true? (Choose two.)
A. BEGIN_TIME is the time at which Flashback logging is enabled.
B. END_TIME is the time at which the query is executed on the view.
C. REDO_DATA is the number of bytes of redo data written during the i
nterval.
D. This view contains information about flashback data pertaining to
the last 24 hours.
E. FLASHBACK_DATA is the amount of flashback data generated since the
database was opened.
Answer: C, D
V$FLASHBACK_DATABASE_STAT 记录的是过去24 小时的flashback 区读写统计
-- 每小时采样一次,并记录在该视图相应的数据字典中,BEGIN_TIME DATE,
END_TIME DATE 这两个参数是采样开始和结束时间。
V$flashback_database_stat 这个视图用来对Flashback log 空间情况进
行更细粒度的记录和估计。 这个视图以小时为单位记录单位时间内数据库的活
动量,Flashback_Data 代表Flashback log 产生数量,DB_Date 代表数据改变
数量,Redo_Date 代表日志数量,通过这3 个数量可以反映出数据的活动特点,
更准确的预计Flash Recovery Area 的空间需求
65. You lost a temporary file that belongs to the default temporary t
ablespace in your database. From the options provided, which approac
would you take to solve the problem?
A. flash back the database
B. import the temporary tablespace from the last export
C. restore all the data files and temporary files from the last full
database backup and perform a recovery
D.not perform a recovery, but create a new temporary tablespace, make
it the default temporary tablespace and then drop the old tablespace
Answer: D
你的临时数据文件丢失了(属于临时表空间),这时不用去闪回或者回复,直
接删除原来的旧有临时表空间,新建一个新的就行了。
66. Which two statements are correct regarding the Oracle Flashback D
rop feature? (Choose two.)
A. Recycle bin exists for the tables only in non-SYSTEM, locally mana
ged tablespaces.
B. You can flash back a dropped table provided row movement has been
enabled on the table.
C. If you drop an index before dropping its associated table, then th
e recovery of the index is not supported when you flash back the drop
ped table.
D. When you execute the DROP TABLESPACE? INCLUDING CONTENTS command,
the objects in the tablespace are places in the recycle bin.
E. When a dropped table is moved to the recycle bin, only the table i
s renamed to a system-generated name; its associated objects and cons
traints are not renamed.
F. If you drop a table that is protected by the recycle bin, then ass
ociated bitmap-joined indexes and materialized view logs are also sto
red in the recycle bin.
Answer: A, C
基于Recycle Bin 的表恢复
(1)Flashback Drop 不能恢复参照完整性,这很容易理解,毕竟在该表删除之
后,被参照表是否有修改,它已经无法控制了,因此如果该表有主外键约束的话,
恢复之后,该约束是DISABLE 状态,需要DBA 手工处理。
(2)所操作的表必须是存在于本地管理表空间中。Flashback Drop 不能恢复字
典管理表空间中被删除的表。
(3)被恢复的表的关联对象,如其索引、约束的名称不会自动恢复成删除前的
名称,而是系统自动生成的名称,如果你对表的索引、约束有相应命名规范,那
在恢复表之后,需要DBA 手工将索引、约束等改名。另外位图索引不能被恢复,
因为删除表时位图索引信息并不会被放入Recycle Bin 中。(但我试验的结果是
位图索引也可以恢复)
(4)当删除表时,依赖于该表的物化视图也会同时删除,但是由于物化视图并
不会被放入Recycle Bin,因此当你执行FLASHBACK TABLE TO BEFORE DROP
时,也不能恢复依赖其的物化视图,需要DBA 手工介入重新创建。
(5)相对于被删除的表而言,当数据文件空间不足时,Oracle 会首先清理被删
除表的索引,因此假如你执行FLASHBACK TABLE TO BEFORE DROP 后发现恢复出
来的数据缺少索引可能是正常的,说明你显然错过了最佳的恢复时机。
(6)Flashback Drop 支持同时操作多个表,表名中间以逗号分隔,如果你执行
一条Flashback Table 命令时同时指定了多个表,要记住单个Flashback Table
是在同一个事务中,因此这些表的恢复操作要么都成功,要么都失败。
(7)Flashback Drop 只能恢复DROP 命令删除的表,如果你通过TRUNCATE 命令
清空表中数据,然后又希望恢复,对于这种情况不管是Flashback Table 还是
Flashback Query 都无能为力,唯一能恢复TRUNCATE 操作的Flashback 特性是
Flashback Database,不过代价也比较大。
Flashback table table_name to scn(恢复被删除的记录)才需要启动row
movement;故B 错,另F 我经过试验正确的(质疑)
步骤如下:
SQL> create table dd(a number,b char(20)) tablespace users;
SQL> create bitmap index bit_dd on dd(b);
SQL> drop table dd;
SQL> select * from recyclebin;可以看到有索引的
SQL> flashback table dd to before drop;
SQL> alter index "BIN$u227AMY7QvaRI5aa8bpIqw==$0" rename to bim_dd;
可以恢复位图索引的啊
SHOW RECYCLEBIN 命令只列出基表,这些被删除的表关联的对象则不会显示
SELECT *FROM RECYCLEBIN; 可查看所有
67. You want to create a consumer group, GROUP1, and you execute the
following command in the command-line interface:
SQL> EXEC DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (CONSUMER_GROUP
=>‘group1‘, COMMENT => ‘New Group‘);
This command errorsout displaying the following message:
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_RMIN", line 115
ORA-06512: at SYS.DBMS_RESOURCE_MANAGER", line 108
ORA-06512: at line 1
What action would you take to overcome this error?
A. grant SYSDBA to the user
B. grant SYSOPER to the user
C. grant the RESOURCE role to the user
D. use the GRANT command to grant the ADMINISTER_RESOURCE_MANAGER pri
vilege to the use
E. grant the ADMINISTER_RESOURCE_MANAGER privilege to the user by usi
ng the DBMS_RESOURCE_MANAGER_PRIVS package
Answer: E
作为ADMIN 管理员,可能需要将管理员的权限授予其他的用户或角色。那么管
理员还要具有DBMS_RESOURCE_MANAGER_PRIVS 程序包的执行权。
DBMS_RESOURCE_MANAGER_PRIVS 程序包中包含将资源使用者组分配至用户的过
程。授予用户切换权限后,用户可以切换到其它使用者组,下表是该包的过程说
明,给dd 用户授权系统权限:
SQL> EXEC
DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SYSTEM_PRIVILEGE(GRANTEE_NAME=>‘dd‘
,privilege_name=>‘administer_resource_manager‘,admin_option=>false);
68. You noticed that the index tablespace in your database requires a
recovery. However, instead of performing a media recovery, you decide
d to re-create the indexes in a new tablespace. Which two options wou
ld you use to reduce the time it takes to re-create the indexes? (Cho
ose two.)
A. ONLINE
B. REVERSE
C. PARALLEL
D. COMPRESS
E. NOLOGGING
F. COMPUTE STATISTICS
Answer: C, E
你注意到你的数据库中的index 表空间需要恢复,你重建了索引,可以同过
PARALLEL 和nologging(不写日志文件,不安全)来提高恢复速度,部分ddl 语
句是可以不写日志的
执行ALTER INDEX 语句中的REBUILD 选项,可以使用已有索引而不是整个表快速
重建索引:alter index cust_idx1 rebuild parallel
tablespace cust_tblspc1 storage (pctincrease 0);
我们可以同时修改STORAGE 子句,并且可以使用parallel 选项
ALTER INDEX INDEX_NAME REBUILD parallel 8;
并行度 要看看参数吧 好像是 parallel_threads_per_cpu 还有
paralle_max_server 看你硬件能否支持吧(这么还没试验)
69. In the parameter file of your production database, the FAST_START
_MTTR_TARGET parameter is set to 300 to optimize instance recovery.
While observing the performance of the database during instance recov
ery, you find that the redo log files are not sized properly to suppo
rt this activity. Which two sources could you use to determine the op
timal size of the redo log files?
(Choose two.)
A. the V$LOG view
B. the V$DBFILE view
C. the V$LOGFILE view
D. the V$INSTANCE_RECOVERY view
E. Oracle Enterprise Manager Database Control
Answer: D, E
FAST_START_MTTR_TARGET:实例恢复的时间限制,oracle将这个时间换算成
redo blocks数量,当log buffer中未写入log file的redo block数量超过这个
值,就会触发增量检查点。
v$instance_recovery 视图的optimal_logfile_size 列通过显示MTTR 尺寸的
最佳重做日志尺寸,帮助你确定恰当的重做日志尺寸。Oracle 建议所有联机重
做日志至少与optimal_logfile_size 列值所指定的相同。
checkpoint 主要2 个作用:
1、保证数据库的一致性,这是指将脏数据写出到硬盘,保证内存和硬盘上的数
据是一样的;
2、缩短实例恢复的时间,实例恢复要把实例异常关闭前没有写出到硬盘的脏数
据通过日志进行恢复。如果脏块过多,实例恢复的时间也会很长,检查点的发生
可以减少脏块的数量,从而提高实例恢复的时间。
checkpoint 就像word 的自动保存一样。
checkpoint 详解
http://tianzt.blog.51cto.com/459544/233669
70. Why would you use the following FLASHBACK TABLE command?
FLASHBACK TABLE emp TO TIMESTAMP (‘11:45‘.‘hh12:mi‘);
A. to undo the changes made to the EMP table since the specified time
B.to restore the EMP table that was wrongly dropped from the database
C. to view the transactions that have modified the EMP table since th
e specified time
D. to view the changes made to the EMP table for one or more rows sin
ce the specified time
Answer: A
Flashback Table 是真正的对修改回退.
1.flashback database 必需启用日志
2.flashback drop
不能闪回system tablespace 的表
就是几个数据字典 drop 后 空间根本没变
show parameter recyclebin
alter table t move tablespace system;
drop table t;
flashback table t to before drop;
这时不能闪回的
drop table tt;
select * from dba_recyclebin
creat table tt(....)
flashback table t to before drop rename to t1;
alter table t1 rename to t;
drop table t;
现在闪回是最后删的一个 后进先返回
purge table t; 是先进先purge
purge recyclebin;
purge tablespace users;
purge tablespace test user sys;
索引,触发器 都被删除了,闪回自动闪回,但过程不一样
craete table t(id int) tablespace users;
create index idx_t on t(id);
drop table t;
select * from dba_recyclebin
flashback table t to before drop;
select * from dba_indexes where table_name=‘T‘ and owner=‘SYS‘
发现索引名字还是闪回区里的 ,估计是怕索引重名,影响表的闪回
3.flashback table(delete from table_name)
可以在线操作
恢复到指定时间点和scn 的任何数据
自动恢复相关属性,如索引触发器等
满足分布式一致性
满足数据一致性,所有相关对象自动一致
insert into t (...)
select current_scn from v$database;
3790016
delete from t;
sqlplus test/test
flashback table sys.t to scn 3790016;
sys 用户下的数据不支持闪回
truncate 不支持闪回
alter tablespace temp add tempfile ‘e:\...dbf‘ size 20m reuse;
select * from dba_tables where owner=‘TEST‘ adn table_name=‘T‘
select id,rowid from t as of scn 3790152;
索引用的是rowid 但是闪回表rowid 要发生变化
alter table t enable row movement;
flashback table t to scn 3790152; 应该是比这个scn 小
select id,rowid from t; rowid 闪回后可能变化,不变是个巧合
4.flashback query(select)
10g 可以 select * from t as of scn 3790016;
grant all on t to test;
查看test 用户有哪些对象权限
select * from dba_tab_privs where grantee=‘TEST‘;
闪回查询 利用的是undo 空间
select versions_starttime,versions_endtime,versions_xid,
versions_operation,username,user_id
from t version between timestamp minvalue and maxvalue;
71. What effect should the loss of an index tablespace have on an Ora
cle instance that is running?
A. instance hangs
B. instance gets aborted
C. instance continues running
D. instance gets restarted automatically
Answer: C
72. By using the transaction identifier provided by ______ for a part
icular row change, you can use the Flashback Transaction Query to see
the operation performed by the transaction.
A. Flashback Table
B. Flashback Database
C. Flashback Version Query
D. The RMAN REPORT command
E. The DBA_PENDING_TRANSACTIONS view
Answer: C
a.flashback versions query
flashback versions query 能够得到某个时间段内,某些数据行的所有不
同版本。这里的版本以事务为单位,事务中的每次数据变化就是一个版本
b.flashback transaction query
flashback transaction query 其实就是查询历史的事务信息,通过查询,
我们可以得到过去某个事务操作信息,包括改变的数据行rowid,事务开始和结
束时间,事务对应的loggon user,以及用来撤销某个数据行改变的undo sql
等。
73. You work as a database administrator at Certkiller .com. Manually
, you set the consumer group of all of the newly created users to MYD
B_GRP. You want the users to be able to change their consumer groups
as per the application requirement. What was the first step that was
needed in the process to achieve this objective?
A. The user must have been granted the DBA role.
B. The user must have been granted the switch privilege as a part of
a role.
C. The user must have been granted the Resource Manager administrator
privilege.
D. The user must have been granted the switch privilege by using the
DBMS_RESOURCE_MANAGER_PRIVS package.
Answer: D
DBMS_RESOURCE_MANAGER_PRIVS 程序包中包含将资源使用者组分配至用户的过程。授予用
户切换权限后,用户可以切换到其它使用者组。
Oracle Resource Manager是Oracle8i开始提供的数据库组件,目的是可以让Oracle定义数
据库资源的利用,通过监控数据库各Users的资源利用情况, 可以合理的调整数据库的使用.
数据库是运行在操作系统之上的一个应用,OS为数据库分配了资源,但OS不能细粒度的控制
数据库怎样去使用这些 资源,ORM可以帮助DBA合理规划这些资源.ORM的使用不会影响数据
库的性能.跟OS的资源管理相比较,ORM(Oracle Resource Manager)可以提供下列特性:
防止资源的过度消耗:ORM可以从session级别控制CPU、Undo等系统资源的过度消耗.通
过定义使用比例的方法防止CPU被某个session独占耗光;合理调度系统资源:单独控制各
session的资源利用率,可以将宝贵的系统资源(比如CPU)按照比例分配给不同的用户组,给
一些重要的应用提供 足够的资源,回收浪费的资源; 控制数据库资源:通过ORM,控制数据库
的有限资源(Undo,CPU等)的分配方式; 兼容操作系统的资源调整:在一个多CPU系统中,ORM
兼容OS调度分配,均衡分配CPU的使用;
ORM 只有ADMINISTER_RESOURCE_MANAGER 系统权限,不支持通过grant,revoke 的管理方式;
必须通过DBMS_RESOURCE_MANAGER_PRIVS 进行GRANT 和REVOKE;
74. While setting up the threshold for tablespace space usage metrics
for one of your tablespaces, you define the critical threshold as 60%
and warning threshold as 75%. What would be the result of this setti
ng?
A. It would result in an error because the warning threshold cannot b
e more than the critical threshold.
B. The warning threshold is ignored and alerts would be generated whe
n space usage exceeds the critical threshold.
C. The critical threshold is ignored and alerts would be generated wh
en space usage exceeds the warning threshold.
D. Both threshold values are used and alerts are generated when space
usage exceeds the respective threshold values.
Answer: A
warning threshold 是不能超过critical threshold 的.
否则如下错误:第 1 行出现错误:
ORA-13912: 严重阈值小于警告阈值。
ORA-06512: 在 "SYS.DBMS_SERVER_ALERT", line 4
在oracle10G 中引入了metric,用来监控数据库表空间,如下实例:
1、确认现有的metric
SQL> conn / as sysdba
已连接。
SQL> select count(1) from dba_thresholds;
2、创建表空间
SQL> select metric_id,metric_name from v$metricname where metric_name
like‘%space%‘;
METRIC_ID METRIC_NAME
---------- -----------------------------------
9001 Tablespace Bytes Space Usage
9000 Tablespace Space Usage
SQL> create tablespace tbs_lw
datafile‘E:\oracle\product\data\tbslw01.dbf‘ size 10m;
3、创建新的metric
SQL> BEGIN dbms_server_alert.set_threshold
(dbms_server_alert.tablespace_pct_full,dbms_server_alert.operator_ge,
80,dbms_server_alert.operator_ge,95, 1, 1, NULL,
dbms_server_alert.object_type_tablespace,‘TBS_LW‘);END;
4、查看新创建的metric
SQL> select count(1) from dba_thresholds;
COUNT(1)
----------
23
SQL> SELECT warning_value, critical_value, status FROM dba_thresholds
WHERE metrics_name = ‘Tablespace Space Usage‘ AND object_name = ‘TBS_LW‘;
WARNING_VALUE CRITICAL_VALUE STATUS
-------------------- -------------------- -------
80 95 VALID
5、模拟一个表数据增长达到threshold
SQL> create table t1 tablespace tbs_lw as select * from user_objects;
表已创建。
SQL> select count(*) from t1;
COUNT(*)
----------
30060
SQL> insert into t1 select * from t1 where rownum<6000;
已创建4000 行。
SQL> insert into t1 select * from t1 where rownum<6000;
已创建4000 行。
SQL> commit;
提交完成。
6、查看是否生效(这一步本人试验就是没看到预警,而且
STATISTICS_LEVEL=TYPICAL,奇怪)
SQL> SELECT reason, message_level,DECODE(message_level, 5, ‘WARNING‘, 1,
‘CRITICAL‘) ALERT_LEVEL FROM dba_outstanding_alerts WHERE object_name =
‘TBS_LW‘;
REASON MESSAGE_LEVEL
ALERT_LE
-------------------------------------------------- -------------
--------
表空间 [TBS_LW] 已占用 [90 Percent] 5
WARNING
7、停用metric
SQL> BEGIN dbms_server_alert.set_threshold
(dbms_server_alert.tablespace_pct_full,dbms_server_alert.operator_do_
not_check, ‘0‘,dbms_server_alert.operator_do_not_check, ‘0‘, 1, 1,
NULL,dbms_server_alert.object_type_tablespace, ‘TBS_LW‘);END;
2 /
PL/SQL 过程已成功完成。
SQL> SELECT warning_value, critical_value, status FROM dba_thresholds
WHERE metrics_name = ‘Tablespace Space Usage‘ AND object_name = ‘TBS_LW‘;
WARNING_VALUE CRITICAL_VALUE STATUS
-------------------- -------------------- -------
0 0 VALID
8、取消metric
BEGIN dbms_server_alert.set_threshold
(dbms_server_alert.tablespace_pct_full,NULL, NULL, NULL, NULL, 1, 1,
NULL, dbms_server_alert.object_type_tablespace, ‘TBS_LW‘);END;
2 /
PL/SQL 过程已成功完成。
SQL> SELECT warning_value, critical_value, status FROM dba_thresholds
WHERE metrics_name = ‘Tablespace Space Usage‘ AND object_name = ‘TBS_LW‘;
未选定行
75. You have created a resource plan, DB_PLAN, using DBMS_RESOURCE_MA
NAGER.CREATE_SIMPLE_PLAN and you want to impose a restriction on util
ization of resources by the database users. Which step must be perfor
med before you can start using the resource plan?
A. assign users to consumer groups
B. set the resource plan for the instance
C. configure a simple resource plan and specify plan directives
D. configure a complex resource plan and specify plan directives
Answer: A
assign user to group:
将用户OE 分配到组oltp 中
dbms_resource_manager_privs.grant_switch_comsumer_group (
grantee_name=>‘OE‘,
consumer_group =>‘OLTP‘,
grant_option=> false
)
set initial group to user:
就是用户登陆后,自动属于那个consumer_group ,如果不指定,则系统自动认
为属于default_consumer_group 。
dbms_resource_manager.set_initial_consumer_group (
user =>‘OE‘,
consumer_group=>‘OLTP‘
)
76. Exhibit
Viewing the Exhibit and examine the Flashback Database architecture.
Identify the missing component (shown with a "?`"= in the Flashback D
atabase architecture.
A. DBWn
B. RVWR
C. ARCH
D. RECO
E. TRWR
Answer: B
RVWR(Recover Writer)后台进程
一旦启用了Flashback database,则rvwr 进程会启动,rvwr 进程会向flash
recovery area 内写入flashback database log,这些日志包括数据块的”前镜
像(before image)”
77. Case 1:
1. Shut down the database and perform a backup.
2. Restore all the data files.
3. Mount the database.
4. Recover the database.
5. Without applying all the redo log files, open the database usi
ng the RESETLOGS option.
6. Back up the database.
Case 2:
1. Shut down the database and perform a backup.
2. Restore only the data files of the tablespace where user error
damaged the data.
3. Mount the database.
4. Recover the database.
5. Open the database with the RESETLOGS option.
6. Back up the database.
Case 3:
1. Shut down the database.
2. Restore the data files.
3. Open the database.
4. Perform recovery to the current point in time.
Which case has the correct steps for an incomplete recovery?
A. Only case 1
B. Only case 2
C. Only case 3
D. Case 1 and 2
E. Case 2 and 3
F. Case 1 and 3
G. All cases, case 1, case 2, case 3
Answer: A
不完全恢复只能针对所有数据文件,不能只对某个单独的文件和表空间
78. You observe that the senior database administrator always uses th
e following command when connecting to Recovery Manager (RMAN), and t
hen starts executing commands to backup the database files: % rman ta
rget / . What would be the effect of this command?
A. RMAN would use the current operating system location to place the
backup.
B. RMAN would use the control file of the target database to maintain
the backup.
C. RMAN would use the recovery catalog of the target database to main
tain the backup.
D. RMAN would use the control file of the target database to maintain
the backup metadata.
E. RMAN would use the recovery catalog of the target database to main
tain the backup metadata.
Answer: D
这种方式是用的控制文件,非catalog 保留的备份元素
选项B 容易迷惑
79. You disabled the Flashback Database feature by using the followin
g command: SQL> ALTER DATABASE FLASHBACK OFF;
What would be the effect of this command on the existing flashback lo
gs?
A. Flashback logs are not deleted.
B. Flashback logs are deleted automatically.
C. Flashback logs are deleted only if you are using Recovery Manager
(RMAN)
D. Flashback logs are deleted only if you are using Oracle Manager Fi
les (OFM)
E. Flashback logs are deleted only if you are using Automatic Storage
Management (ASM)
Answer: B
80. The production database has been functional for the last seven da
ys. Because of application requirements, some of the initialization p
arameters were changed during run time without any comments. You have
asked to find out the value of the parameters when the instance was
started. Which source would you use to locate this information?
A. Fixed views
B. The alert log file
C. The parameter file
D. The server parameter file
E. Dynamic performance views
Answer: B
在alert.log 文件中可以查看数据库启动时的一些相关参数
81. You have a disk group, DGROUP1, with three disk and NORMAL redund
ancy. You execute the following command to create a template for the
disk group: ALTER DISKGROUP dgroup1 ADD TEMPLATE my_temp ATTRIBUTES (
MIRROR FINE);
Which statement is true?
A. When a file is created in DGROUP1 with the template, it would have
three-way mirroring.
B. When a file is created in DGROUP1, the MY_TEMP template becomes th
e default template.
C. When a file is created in DGROUP1 with the template, it would have
two-way mirroring and file striping.
D. When a file is created in DGROUP1 with the template, it would have
three-way mirroring and file striping.
E. When a file is created in DGROUP1 with the template, it would have
two-way mirroring but no file striping.
Answer: C
ASM File Template 就是用来定义文件的条带和镜像配置的模板,是磁盘组固
有的属性,并且以文件的形式保存在ASM 磁盘组中(Template Directory),只是这
些文件对用户不可见。
ASM 有镜像mirror 和条带stripe 功能(粗粒度条带Coarse Striping 和细粒
度条带Fine Striping)
在创建磁盘组冗余选择(Redundancy)
1. High 高度冗余,可以通过 asm 实现3 路镜像,需要3 个failure groups
2. Normal 正常冗余, 通过asm 实现2 路镜像,需要2 个failure groups
3. External 外部冗余,asm 之外的技术实现冗余(磁盘raid10 等,通常选择)
82. You lost the index tablespace in your database. You are not able
to use tablespace point-in-time recovery on the index tablespace. Wha
t could be the reason for this?
A. The index tablespace contains bitmap indexes.
B. The index tablespace contains more than one data file.
C. The index tablespace supports only complete recovery.
D. The index tablespace is not a dictionary-managed tablespace.
E. There is a dependency relationship between a table and its indexes
Answer: E
point_in_time(不完全恢复?)你丢失了数据库中的index 表空间,你不能使用
point_in_time,因为在表和索引之间有关联。
注意:恢复集表空间必须为自包含;
违反自包含表空间集合的常见情况如下:
1> 表空间集合包含有SYS 方案对象
2> 表空间集合包含了索引所在的表空间,但没有包含索引基表所在的表空间
3> 表空间集合没有包含分区表的所有分区
4> 表空间集合包含了表所在的表空间,但没有包含其LOB 列所在的表空间
检查自包含方式:
SQL> connect sys/[email protected] as sysdba
SQL> execute dbms_tts.transport_set_check(‘user01‘,true);
SQL> Select * From transport_set_violations;
83. For the V$SESSION_LONGOPS view, you find that some of the databas
e users have long-running queries that consume a lot of CPU time. Thi
s causes performance problems for other users in the database, who ha
ve much shorter queries. You would like to make sure that the users w
ith large queries do not use all the CPU time, but you still do not w
ant to terminate them with an error message. Which method would you f
ollow to achieve this?
A. Set the CPU time per call in the users profile.
B. Set the CPU time per session in the users profile.
C. Set the CPU levels for the user‘s group using Resource Manager.
D. Set the TIMED_STATISTICS parameter to TRUE in the parameter file.
Answer: C
84. Exhibit:
View the Exhibit and examine the characteristic of the USERS tablespa
ce. You observe that a large volume of inserts and deletes are happen
ing on the TRANS table in the USERS tablespace and you suspect that t
he TRANS table is fragmented. Which advisory component would you refe
r to, in order to find information about table fragmentation?
A. Memory Advisor
B. Segment Advisor
C. SLQ Tuning Advisor
D. SLQ Access Advisor
E. Automatic Database Diagnostic Monitor (ADDM)
Answer: B
你怀疑你的一个表中有碎片(fragmented),你可以使用段指导(Segment
Advisor)来获取信息段指导:监视对象空间问题并分析增长趋势。
85. A data file become corrupted in your database due to bad sectors
on the disk. Because of corruption, you lost all the important tables
in that data file. Which method would you use for recovery?
A. Flash back all the tables in the data file, one by one.
B. Restore the data file to a new location and perform a media recove
ry.
C.Flash back the database, there is no need to restore the data file
D. Restore the data file from the most recent backup and flash the da
tabase.
Answer: B
因为磁盘坏道,数据文件损坏,导致许多重要的表丢失,你可以先restore
数据文件到一个新的磁盘位置,然后再recovery
Flashback Database 不能解决Media Failure,这种错误RMAN 恢复仍是唯一选择
86. For which two SQL statements can you use the Flashback Table feat
ure to revert a table to its previous state? (Choose two)
A. UPDATE TABLE
B. CREATE CLUSTER
C. TRUNCATE TABLE
D. ALTER TABLE MOVE
E. INSERT INTO...VALUES
F. ALTER TABLE...DROP COLUMN
G. ALTER TABLE...DROP PARTITION
Answer: A, E
哪两种sql 语句可以使用闪回表
a、update
b、insert
这应该证明drop 表或者truncate 表是无法使用闪回的,同时改变表的结构
也是不行的
87. What purpose would you achieve by enabling the block change track
ing feature?
A. Eliminate the necessity for backups.
B. Perform optimized image copy backups.
C. Perform optimized incremental backups.
D. Enable checkpoint (CKPT) to perform checkpointing at every block c
hange.
E. Enable database writer (DBWn) to write changed blocks to data file
s faster.
Answer: C
RMAN 将使用更改跟踪数据来确定增量备份过程中需要备份的数据块列表,而不必对所
有数据块进行遍历,从而提高了增量备份的效率。
在9i 及之前的版本中,不管是否是增量备份,RMAN 在执行备份时都需要先将所有数据
块全部读入内存,检查每一个数据块头的SCN 信息,并与增量备份的父备份集相比较来确定
块是否被修改过。如果发现块被修改过,则该块所在的数据文件都要重新备份(是的,检查
是在块一级,但备份是数据文件级)。由此可知,除非你的系统修改非常频繁(修改太过频
繁的系统是否还有必要创建增量备份,这也是个问题),或者I/O 设备效率惊人(我是说,
惊人的慢),不然增量备份只是节省了存储空间,既不能减少备份时间,也不能达到提高备
份效率的目的,甚至还有可能导致备份时间更长(因为多了数据块检查的操作)。
在10g中Oracle提供了一个新的特性:块修改跟踪(Block Change Tracking)。启用块
修改跟踪后,RMAN不用再去扫描数据文件中的每一个块了,直接通过块修改跟踪文件就可以
获取哪些块发生了修改的信息。提示:可通过下列语句启用块修改跟踪:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE‘/LOACTION/TRK_FILEN
AME‘;如果使用了OMF特性(Oracle-Managed Files),Oracle会自动创建块修改跟踪文件。
可通过下列语句禁用块修改跟踪:
SQL> ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
可以通过下列语句查询是否启用块修改跟踪:
SQL> SELECT STATUS FROM V$BLOCK_CHANGE_TRACKING;
需要提醒一句,务必要认识到,虽然备份时间可能减短,并且备份集大小可能减小,但
是进行恢复操作时,所需花费的时间有可能会增加,因为数据库恢复时不得不读取多个备份
集才能完成恢复操作。
备份与恢复本身就是相对的,有个成语叫此消彼涨用来形容它俩的关系再合适不过。
88. You execute the following RMAN command in the order shown below:
BACKUP VALIDATE DATABASE;
BLOCKRECOVER CORRUPTION LIST;
What will these commands do?
A. Create a backup of the database and recover all corrupted blocks f
ound in the backup.
B. Run a backup validation and list all the logically corrupt blocks
as well as physically corrupt blocks in the database.
C. Run a backup validation to populate V$COPY_CORRUPTION view, and th
en list any corrupt blocks recorded in the view.
D. Run a backup validation to populate V$DATABASE_BLOCK_CORRUPTION vi
ew, and then repair any corrupt blocks recorded in the view.
E. Run a backup validation, repair any corrupt blocks found during th
e validation process, and then update V$DATABASE_BLOCK_CORRUPTION vie
w to indicate which corrupt blocks have been repaired.
Answer: D
backup validate database;
--检查所有数据文件是否存在坏块,并不执行实际备份, 这个时候,访问
v$database_block_corruption 可以看到详细的坏块的信息.
执行BLOCKRECOVER CORRUPTION LIST,会自动按V$DATABASE_BLOCK_CORRUPTION 进行修
复。V$DATABASE_BLOCK_CORRUPTION 视图显示当前损坏的数据库块的列表。
通过使用 CORRUPTION LIST 子句,可以恢复 V$DATABASE_BLOCK_CORRUPTION 中列出的
块。
BACKUP VALIDATE DATABASE
BLOCKRECOVER CORRUPTION LIST RESTORE UNTIL TIME ‘sysdate – 10‘;
因为损坏块数量超过可接受的数量,所以要使用BACKUP VALIDATE DATABASE 这个命令
备份,在备份的同时会在备份操作期间填写V$DATABASE_BLOCK_CORRUPTION,然后再使用
CORRUPTION LIST 子句,可以恢复 V$DATABASE_BLOCK_CORRUPTION 中列出的块。
89. In Recovery Manager (RMAN), you have set control file autobackup
to ON by using the following command:
CONFIGURE CONTROLFILE AUTOBACKUP ON; Which two events would cause the
control file to be backed up automatically? (Choose two)
A. A tablespace is taken offline.
B. The database instance is restarted.
C. A new data file is added to an existing tablespace.
D. A successful backup is recorded in the RMAN repository.
E. The RMAN connection is disconnected from the target database.
Answer: C, D
The control file should be backed up whenever the structure of the
database changes. Structural changes can include adding, dropping, or
altering datafiles or tablespaces and adding or dropping online redo logs
自己试验证明A 选项也会自动备份控制文件的
90. You are working on an Oracle Database 10g database. For which pur
poses would you use the Flashback Transaction Query feature? (Choose
all that apply)
A. To recover a dropped table.
B. To recover a dropped schema.
C. To recover data from a truncated table.
D. To view changes made by all the transactions during a given period
of time.
E. To view changes made by a single transaction during a given period
of time.
Answer: D, E
查看视图,每个事务都对应相同的XID.
Sql>select xid,operation,commit_scn,undo_sql
From flashback_transaction_query
Where xid in(select version_xid from tmp1 where versions between scn
minvalue and maxvalue);
91. Consider the following command to add a new disk group called "td
groupA" with two failover groups:
CREATE DISKGROUP tdgroupA NORMAL REDUNDANCY
FAILOVERGROUP control01 DISK
‘/devices/A1‘,
‘/devices/A2‘,
‘/devices/A3‘
FAILOVERGROUP control02 DISK
‘/devices/B1‘,
‘/devices/B2‘,
‘/devices/B3‘m
The disk "/devices/A1" is currently a member disk of a disk group by
the name "tdgroup1".
Which task would be accomplished by the command?
A. This command would result in an error because a disk group can
have only one failover group.
B. This command would result in an error because the /devices/A1
disk is a member of another disk group tdgroup1.
C. A new disk group called tdgroupA will be added with two failov
er groups and the /devices/A1 disk will get reattached to the new dis
k group without being detached from the existing one.
D. A new disk group called tdgroupA will be added with two failov
er groups and the /devices/A1 disk will be ignored for the new disk g
roup because it is a member of an existing disk group tdgroup1.
E. A new disk group called tdgroupA will be added with two failov
er groups and the /devices/A1 disk gets detached from the existing di
sk group tdgroup1 and attached to the new disk group tdgroupA.
Answer: B
一个磁盘已经加入到ASM 组里,你又把他加一遍就会报错,这里使用的是明细
命令
92. Your business has departmental reports that are generated every d
ay. Each department must use the same set of queries, but access a di
fferent subset of data in the tables, depending on which department g
enerates the report. The format of the reports is being developed; cu
rrently, the format changes daily. How would you configure the databa
se to ensure that each department generates its report (based on its
target data) using the most recent report format every day?
A. By having each user run the report generation procedure at the sch
eduled time, supplying the necessary input variables.
B. By creating a program using DBMS_JOB that accepts one or more vari
ables, and creating a job that calls this program using DBMS_JOB.
C. By having each user schedule a job using DBMS_JOB that accepts one
or more input variables and calls a procedure that generates the repo
rt.
D. By having each user create a job using DBMS_SCHEDULER that include
s all the information and commands necessary to generate the report.
E. By creating a program using DBMS_SCHEDULER that accepts one or mor
e variables, and creating a job that calls this program using DBMS_SC
HEDULER.
Answer: E
一个企业,每天每个部门要产生一个report,这些report 只是调用的表不一样,其
它都一样。这样我们可以使用DBMS_SCHEDULER 建立一个program 接受多个变量,同时建立
一个job 调用该program 。
A program is a collection of metadata about a particular executable, script,
or procedure. An automated job executes some task. Using a program enables you to
modify the job task, or the “what,” without modifying the job itself. You can define
arguments for a program, enabling users to modify the run-time behavior of the task.
93. You execute the following command to create two consumer groups,
FIN_GROUP1 and PAY_GROUP1 for a plan, PROD_PLAN:
BEGIN
DBMS_RESOURCE_MANAGER.CREATE_SIMPLE_PLAN (SIMPLE_PLAN => ‘prod_plan‘,
CONSUMER_GROUP1 => ‘fin_group1‘,
GROUP1_CPU => 80,
CONSUMER_GROUP2 => ‘pay_group1‘,
GROUP2_CPU => 20);
END;
Which three statements are true? (Choose three)
A. SYS_GROUP gets 100% CPU resources at level 1.
B. FIN_GROUP1 gets 80% CPU resources at level 1.
C. FIN_GROUP1 gets 80% CPU resources at level 2.
D. PAY_GROUP1 gets 20% CPU resources at level 1.
E. PAY_GROUP1 gets 20% CPU resources at level 2.
F. OTHER_GROUP gets 100% CPU resources at level 1.
G. OTHER_GROUP gets 100% CPU resources at level 2.
Answer: A, C, E
质疑:题目中并没有对OTHER_GROUP,SYS_GROUP 进行说明(难道是默认值),
而答题中却有.并且C 也不对嘛
(Administration Workshop 2 中找到答案)
• SYS_GROUP: The initial consumer group for the SYS and SYSTEM users
• OTHER_GROUPS: Used for all sessions that belong to consumer groups that
are not part of the active resource plan. There must be a plan directive
for OTHER_GROUPS in any active plan.
The initial consumer group of a user is the consumer group to which
any session created by that user initially belongs. If you have not set
the initial consumer group for a user, the user’s initial consumer group
will automatically be DEFAULT_CONSUMER_GROUP.
94. Which statement is true regarding the creation of nested plans us
ing Resource Manager?
A. Only one nested subplan is allowed.
B. The plans can be nested up to four levels.
C. Resource Manager does not support nested plans.
D.Nested plans control only the degree of parallelism but not the CPU
E. Each nested plan gets a proportion
of the CPU resources assigned to its parent group.
proportion:比例
Answer: E
95. You want your listener to be password protected to prevent it fro
m being shut down. You want to accomplish this task while the listene
r is functional. Which method could you use to achieve this objective
?
A. Use the CHANGE_PASSWORD command of the Listener control utility.
B. Use the SET PASSWORD and SAVE_CONFIG commands of the Listener cont
rol utility.
C. Use the CHANGE_PASSWORD and SAVE_CONFIG commands of the Listener c
ontrol utility.
D. Manually modify the listener.ora file to include the password for
the listener and restart the listener.
Answer: C
要设置监听器密码只能使用CHANGE_PASSWORD ,而SET PASSWORD 的作用是
密码验证用的,如你设置好了密码后,如果要停止监听,则需要先用SET PASSWORD
输入正确的密码。
如果为listener 设置了口令,那么在lsnrctl 中执行stop,save_config,
change_password 命令操作不论是local 还是remote listener 时都需要通过set
password 来输入口令,只有口令正确才能执行上述命令。
我的疑问是设置了密码,stop 照样不需要密码!
96. You need to check the EMP_EAST partition in the EMPLOYEES table f
or physical corruptions. You also need to verify that the rows belong
to the correct partition. Which option could you use?
A. LogMiner
B. The DBNEWID utility
C. The DBVERIFY utility
D. The ANALYZE command
E. The RMAN REPORT command
F. The RMAN CROSSCHECK command.
G. The RMAN BLOCKRECOVER command.
Answer: D
DBVERIFY:是一种外部命令行实用程序,可以对脱机或联机的数据库执行物理数据结构
完整性检查。可以对备份文件与联机文件(或文件片段)运行此实用程序。只能检查数据文
件;不能检查重做日志文件
ANALYZE:使用 ANALYZE 命令可以验证表或表分区的结构,以及索引或索引分区的结构。
要分析的对象必须位于本地计算机,并且必须是在您自己的方案中,或者必须拥有ANALYZE
ANY 系统权限。CASCADE 选项可以验证对象,包括该对象的所有相关对象。不将块标记为软
损坏;只报告软损坏情况
RMAN CROSSCHECK:当手工删除了归档日志以后,Rman 备份会检测到日志缺失,从而无
法进一步继续执行。所以此时需要手工执行crosscheck 过程,之后Rman 备份可以恢复正常。
根据题意验证分区表的block,验证行是否属于正确的分区,所以要选ANALYZE
97. Users in your production database complain that they are getting
the following error message while trying to insert rows into the ORDE
RS table:
ERROR at line 1:
ORA-01654: unable to extend index USERS.ORDERS_IND by 8 in tablespace
INDEXES
While investigating, you find that the INDEXES tablespace has run out
of space and there is no more free space on the disk where the data
files are available. Which two actions could you perform to overcome
this error without affecting the queries that are currently being exe
cuted? (Choose two)
A. Drop and re-create the inbox.
B. Coalesce the ORDERS_IND index.
C. Coalesce the INDEXES tablespace.
D. Drop and re-create the ORDERS table.
E. Rebuild the index online and move it to another tablespace.
Answer: B, E
Coalesce the ORDERS_IND index.----------合并索引碎片
是针对具体索引,不是其所在表空间
98. Consider the following scenario: You have a directory, data, unde
r the disk group tdgroupA.You want to create an alias for one of the
data files and you execute the following command:
ALTER DISKGROUP tdgroupA ADD ALIAS ‘+tdgroupA/data/datafile.dbf‘
FOR ‘+tdgroupA.231.45678‘;
Which task would be accomplished by the command?
A. The command drops the file +tdgroupA.231.45678.
B. The command physically relocated the file to +tdgroupA/data and re
names the file to datafile.dbf.
C. The command creates a copy of the +tdgroupA.231.45678 file and pla
ces it in +tdgroupA/data after renaming the file to datafile.dbf.
D. The command creates an alias, datafile.dbf, and places it in +tdgr
oupA/data and does not remove the tdgroupA 231.45678 file.
E. The command creates a file, datafile.dbf, in +tdgroupA/data and re
moved the references for +tdgroupA.231.45678 from the data dictionary
views.
Answer: D
ALTER DISKGROUP tdgroupA ADD ALIAS ‘+tdgroupA/data/datafile.dbf‘
FOR ‘+tdgroupA.231.45678‘
该命令创建了一个同义词datafile.dbf 并放在+tdgroupA/data/目录下,
但不影响原来的的+tdgroupA.231.45678 文件
99. You lost a data file that belongs to an index tablespace in your
database, which operates in ARCHIVELOG mode. Loss of the data file re
sulted in increased response time on your queries.
Which two options would you use to solve this problem? (Choose two)
A. Restore the lost data file from the backup, and then flash back th
e database.
B. Restore the data file pertaining to index tablespace, and then rec
over the tablespace.
C. Restore all the data files, and then perform an incomplete recover
y to get the tablespace back.
D. Restore all the data files, and then perform an incomplete recover
y using the backup control file.
E. Drop and re-create the index tablespace, and then re-create all of
the indexes in that tablespace.
Answer: B, E
在你索引表空间中的数据文件丢失,会造成你的数据库提问的响应时间,这
时你可以drop 掉这个索引表空间,然后重建表空间,重建索引。或者restore 该
数据文件,然后再recover 该表空间(需试验,难道可以针对单个文件恢复?)。
(warehouse)不完全恢复只能针对整个数据库,不能针对某个表空间或某个数
据文件
100. You database operates in ARCHIVELOG mode and user-managed consis
tent backups are performed every Sunday
night. On Tuesday, at 9:00 a.m. the current log sequence number was
369. Also, on Tuesday you lost the data file belonging to the SYSTEM
tablespace and an achivelog file (sequence number 356) that contained
redo entries between 8:00 a.m. and 8.30 a.m.
With reference to this scenario, what would you do to recover the dat
abase?
A. Restore all the data files from last Sunday‘s backup, and then per
form a time-based recovery.
B. Restore all the data files from last Sunday‘s backup, and then per
form a cancel-based recovery.
C. Restore all the data files from last Sunday‘s backup, and then per
form a change-based recovery.
D. Restore only data files that belong to the SYSTEM tablespace from
last Sunday‘s backup, and then perform a complete recovery.
Answer: B
丢失的归档文件,只能用基于cancel 的恢复
101. You executed the following query in your database:
SELECT oldest_flashback_scn, oldest_flashback_time FROM V$FLASHBACK_D
ATABASE_LOG;
What would you determine from the output?
A. The time when the last flashback operation in your database was pe
rformed.
B. The time when the first flashback operation in your database was p
erformed.
C. A list of flashback operations performed in your database using SC
N and time.
D. The approximate time and the lowest system change number (SCN) to
which you can flash back your database.
Answer: D
SELECT * FROM V$FLASHBACK_DATABASE_LOG 显示出最低的scn 你可以
flashback 到和对应的时间.
102. While designing the database for one of your online transaction
processing (OLTP) applications, you want to achieve the following:
a) high availability of data
b) faster primary key access to the table data
c) compact storage for the table
Which type of tables would you use to achieve these objectives?
A. heap tables
B. object tables
C. partitioned tables
D. index-organized tables (IOTs)
Answer: D
Index-organized tables provide faster access to table rows by the
primary key or any key that is a valid prefix of the primary key.
Because rows are stored in primary key order, a significant amount of
additional storage space savings can be obtained through the use of key
compression.
Use of primary-key based logical rowids, as opposed to physical rowids,
in secondary indexes on index-organized tables allows high availability.
103. You are using Oracle Database 10g. The log LOG_ARCHIVE_FORMAT pa
rameter is set to ‘LOG%t_%_s_%r.dbf‘.
Why is %r used in the file name format?
A. To uniquely identify the archived log files with the restore opera
tion.
B. To uniquely identify the archived log files with the redo log grou
p number.
C. To uniquely identify the archived log files for each incarnation o
f the database.
D. To uniquely identify the archived log files with the number of rec
overy operations performed.
Answer: C
Incarnation(化身)你就当作数据库(死而复生)的次数吧,每一次open
resetlog 就算复生一次。
归档路径无效的话,就转为其他有效路径,优先级如下:
{log_archive_des|log_archive_dest_n}
[log_archive_duplex_dest]
db_recovery_file_dest
%oracle_home%\database[dbs]
log_archive_format 的替换变量:
%s --archvied redo file 的文件序列号 , 指日志序列号
%t --归档线程号 , 指重做线程的编号
%d --dbid,注意不同于rman 中format 的%d,而是同%I
%r --resetlogs ID 号
%A: --活动ID 号
alter system switch logfile;
切换的时候就归档了,如果不在闪回区可以控制格式的
show parameter log_archive
log_archive_format
若修改闪回目录,原来的都有效,闪回区里面内容可以备份,只能备份到磁带
104. Exhibit:
View the Exhibits.
You performed operations on the DEPT4 table as shown in the Exhibit.
When you perform the Flashback Versions Query, you find that the firs
t two updates are not listed.
What could be the reason?
A. The row movement is not enabled on the table.
B. The first two updates were not explicitly committed.
C. The Flashback Versions Query lists only the most recent update.
D. The Flashback Versions Query stops producing rows after it encount
ers a time in the past when the table structure was changed.
Answer: D
在哪种情况下可以使用flashback versions query
a、只能是commited 以后的数据
b、只能是dml 语句,ddl 不行,ddl 以后,前面的dml 也查询不到
c、没必要非要启用row movement
105. Exhibit:
View the Exhibit.
You have more than one table in the recycle bin having the same origi
nal name, DEPT2. You do not have any table with the nameDEPT2 in your
schema. You executed the following command:
PURGE TABLE dept2;
Which statement is correct in this scenario?
A. All the tables having the same original name as DEPT2 will be purg
ed from the recycle bin.
B. The table with dropscn = 1928151 (oldest dropscn) will be purged f
rom the recycle bin.
C. The table with dropscn = 1937123 (most recent dropscn) will be pur
ged from the recycle bin.
D. None of the tables will be purged because there are multiple entri
es with the same original name in the recycle bin.
Answer: B
purge 从recycle 里面删除drop 掉的表
还原表按后进先出 (LIFO) 算法.
清除时,先进先出 (FIFO) 算法自动将回收站对象从回收站中清除.
106. Which type of PL/SQL construct would you use to automatically co
rrect the error resulting from a statement that was suspended due to
a space-related problem?
A. functions
B. package
C. procedure
D. database trigger
E. anonymous PL/SQL block
Answer: D
触发器是存储在数据库中的 PL/SQL 代码对象,它们会在某些事件发生时自
动运行或“触发”。Oracle 数据库允许许多操作充当触发事件,包括插入到表
中、用户登录数据库以及尝试删除表或更改审计设置等操作。
107. In an Oracle 10g database, the in-memory statistics are gathered
at regular intervals and used to perform growth-trend analysis and
capacity planning of the database. Which component stores these stati
stics?
A. Recovery catalog
B. Oracle Enterprise Manager Repository
C. Automatic Workload Repository (AWR)
D. Oracle 10g Enterprise Manager Grid Control
E. Automatic Database Diagnostic Monitor (ADDM)
Answer: C
自动工作量资料档案库 (AWR)
a、AWR 是为 Oracle Database 10g 组件提供服务的基础结构,通过这个基础结
构可收集、维护和利用统计信息,以便检测问题和进行自优化。可将这个基础结
构视为包含数据库统计信息、度量等内容的数据仓库。
b、默认情况下,数据库每隔 60 分钟从SGA 中自动捕获一次统计信息,然后将
其以快照形式存储在 AWR 中
c.awr:auto workload repository 体系的核心
statspack 的进一步改进(不收集操作系统信息,没有db time 等)
awr 属于sys 用户,存在sysaux 表空间上
wri(internal 内部) wrm(metadata) wrh(history)
对这些表重新创建了视图 dba_hist_
select * from dba_hist_wr_control
每1 小时收集一次,在磁盘上保留7 天
可以用包修改exec
dbms_worload_repository.modify_snapshot_settings(retention=>1440,inte
rval=>30);
查看数据库性能报告,可以定位到时间段,10g 前不可能办到
oracle 每1 小时创建了一个快照(跟照片样,定格背景)
exec dbms_worload_repository.create_snapshot;
select * from dba_hist_snapshot order by snap_id desc
select * from dba_hist_undostat
查看awr 报告 选择开始快照 和结束快照 之间数据库不要重启
@e:...\rdbms\admin\awrrpt.sql
db time:所有活动session 的总时间
正常是两个值大致差不多,系统出问题的的时候 db time 比cpu 时间大很多,绝
大多数都在等待(算在db time 里)
108. You have been assigned to manage a set of databases. The previou
s DBA did not leave you notes regarding the structure of each of the
databases. While analyzing an instance, you notice that the system id
entifier (SID) for the instance is set to ‘+ASM‘.
What is the purpose of this instance?
A. This instance is being used to manage the operating system files.
B. This instance is being used to manage the files of other databases
C. This instance is being used to manage the instances of other datab
ases.
D. This instance is being used to manage the background processes of
other instances.
Answer: B
要使用 ASM,在启动数据库实例之前,必须启动一个名为 ASM 实例的特殊实例。ASM 实
例不会装载数据库,而是管理使 ASM 文件可用于普通数据库实例所必需的那些元数据。ASM
实例和数据库实例都能访问一些公共的磁盘集,这些公共磁盘集称为磁盘组。数据库实例直
接访问 ASM 文件的内容,它们与ASM 实例通信的目的只是为了获取这些文件的布局信息。
ASM 指的是一个在物理卷(或者磁盘分区)上特别为Oracle 数据文件而创建的"专用"文件
系统。该文件系统由Oracle 内核保存并维护,Oracle 知道数据所处的位置,并自动管理这
些位置,进而获得适用于数据库的最高性能和最大可用性
109. In one of your online transaction processing (OLTP) applications
, most users frequently modify the values, including the key values,
of the application tables. Some users generate application reports by
using multiple application tables. What is the best table structure
that you can use to gain optimal performance?
A. Heap table
B. Object table
C. External table
D. Clustered table
E. Global temporary table
F. Index-organized table (IOT)
Answer: A
heap table 就是普通表
在OLTP 系统中,许多用户频繁修改数据,包括主键值,一些用户还需要关
联几个表产生数据,那么首先IOT 无法使用,因为主键值也频繁修改。其次簇表
也无法使用,因为频繁修改。
Type Description
Ordinary
(heaporganized)
table
Data is stored as an unordered
collection
Partitioned table
(heap)
Data is divided into smaller,
more manageable pieces.
Index-organized
table(IOT)
Data (including non-key
values) is sorted
and stored in a B-tree index
structure.
Clustered table
Related data from more than
one table are
stored together.
Index-organized tables provide faster access to table rows by the
primary key or any key that is a valid prefix of the primary key.
Because rows are stored in primary key order, a significant amount of
additional storage space savings can be obtained through the use of key
compression.
110. Your database is functioning in NOARCHIVELOG mode. Your database
contains 15 tablespaces. You want to use Recovery Manager (RMAN) to
perform backups. Which two backups would you be able to perform when
the database is being accessed by users? (Choose two)
A. Backup of offline tablespaces.
B. Backup of read-only tablespaces.
C. Backup of system-critical tablespaces.
D. Backup of online, locally managed tablespaces.
E. Backup of read/write dictionary-managed tablespaces.
Answer: A, B
如果目标数据库处于 NOARCHIVELOG 模式,则仅能执行“干净”表空间和数
据文件备份(即“正常脱机”或“只读”表空间的备份)。
111. You are working in an online transaction processing (OLTP) envir
onment. You used the FLASHBACK TABLE command to flash back the CUSTOM
ERS table. Before executing the FLASHBACK TABLE command, the System C
hange Number (SCN) was 663571. After flashing back the CUSTOMERS tabl
e, you realize that the table is not in the correct state and the res
ultant changes are not what you had desired. So, you need to reverse
the effects of the FLASHBACK TABLE command while ensuring that:
a) No other user data in the database is affected.
b) The operation takes the minimum possible time
Which option would you choose?
A. Use ROLLBACK command with SCN 663571.
B. Perform Flashback Transaction Query with SCN 663571.
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 CUSTOMER
S table as it was at SCN 663571.
Answer: D
Flashback table 后发现数据不对,提出要求一是不影响其它数据二是要快,
那么再闪回一次就行了
112. Because of hardware failure, you decided to drop a redo log memb
er from the database.
Which condition should be met to drop a redo log file?
A. The redo log file should belong to an active group.
B. The redo log file should belong to an inactive group.
C. The redo log file should belong to the current group.
D. The redo log file can be dropped only if all the transactions are
stopped.
E. Before a redo log file is dropped, it should be deleted from the o
perating system (OS).
Answer: B
日志最常见的状态有以下几种:CURRENT , ACTIVE , INACTIVE ,UNUSED
1.CURRENT 指当前的日志文件,该日志文件是活动的,当前正在被使用的,在进
行崩溃恢复时Current 的日志文件是必须的。
2. ACTIVE 日志是活动的非当前日志,该日志可能已经完成归档也可能没有归档,
活动的日志文件在Crash 恢复时会被用到。Active 状态意味着,检查点尚未完
成,如果日志文件循环使用再次到达该文件,数据库将处于等待的停顿状态,
当这种问题出现时,可以从数据库内部通过v$session_wait 来观察,该视图会
显示数据库当前哪些Sesssion 正处于这种等待。Checkpoint not complete 在
数据库中体现为等待事件log file switch(checkpoint incomplete):select
sid,event,state from v$session_wait;同时要注意DBWR 进程正在执行db file
parallel write,日志文件必须等待DBWR 完成检查点触发的写操作之后才能被
覆盖。如果设置了参数log_checkpoints_to_alter 为True 的话,还可以在alert
文件中清晰地看到检查点的增进和完成情况.
可以对这个问题做一下简单的分析,Checkpoint incomplete 有多种可能原因:
·日志文件过小,切换过于频繁;
·日志组太少,不能满足正常事务量的需要;
·日志文件所在磁盘I/O 存在瓶颈,导致写出缓慢,阻塞数据库正常运行;
·由于数据文件磁盘I/O 瓶颈,DBWR 写出过于缓慢;
·由于事务量巨大,DBWR 负荷过高,不堪重负。
针对不同的原因,又可以从不同角度着手解决问题:
·适当增加日志文件大小;
·适当增加日志组数;
·使用更快速磁盘存储日志文件(如:采用更高转速磁盘;使用RAID10 而不是
RAID5 等方式);
·改善磁盘I/O 性能;
·使用多个DBWR 进程或使用异步I/O 等。
3.INACTIVE 是非活动日志,该日志在实例恢复时不再需要,但是在介质恢复时
可能会用到。INACTIVE 状态的日志也可能没有被归档。如果数据库启动在归档
模式,在未完成归档之前,日志文件也不允许被覆盖,这时活动进程处于log file
switch(archiving needed)等待之中。日志是否完成归档,可以根据
V$LOG.ARCHIVED 字段进行判断,ARCHIVED 状态为NO,也就是尚未归档:所有DML
事务都将挂起,用户处于log file switch(archiving needed)等待,通常是由
数据库异常引起的,可能是因为I/O 缓慢,也可能是因为事务量过大,在特殊情
况下,有可能是因为日志损坏。
4.UNUSED 表示该日志从未被写入,这类日志可能是刚被添加到数据库或者在
RESETLOGS 之后被重置。被使用之后,该状态会被改变。
113. In your production database, you have multiple resource plan dir
ectives that refer to the customer group DB_GRP. Which two statements
are correct? (Choose two)
A. The parallel degree limit for DB_GRP will be the minimum of all th
e incoming values.
B. The parallel degree limit for DB_GRP will be the maximum of all th
e incoming values.
C. The maximum estimated execution time for DB_GRP would be the most
nonrestrictive of all incoming values.
D. If a session switched from the DB_GRP consumer group to another co
nsumer group because it exceeded the prescribed switch time, then tha
t session would not execute if the active session pool for the new co
nsumer group was full.
E. Is a session switched from the DB_GRP consumer group to another co
nsumer group because it exceeded the prescribed switch time, then tha
t session would execute even if the active session pool for the new c
onsumer group was full.
Answer: A,E
PARALLEL_DEGREE_LIMIT_MTH 限制任何操作的最大并行度。只能为资源使用者组,而
不能为子计划指定此方法。ABSOLUTE 方法是可能值,该方法指定可以为一个操作分配的进
程数量。如果有多个计划指令引用了相同的子计划或使用者组,则使用所有可能值中的最小
值作为该子计划或使用者组的并行度限制。
Using the active session pool feature, you can control the maximum number of
concurrently,active sessions per resource consumer group. With this functionality, a DBA can
indirectly control the amount of resources that any resource consumer group uses because
resource consumption is proportional to the number of active sessions. Using an active session
pool can help to reduce the number of servers taking resources in the system, thus avoiding
inefficient paging, swapping, and other resource depletion (such as memory) resulting from
attempting to run too many jobs simultaneously. After the active session pool is filled with active
sessions, the Resource Manager queues all subsequent sessions attempting to become active until
other active sessions complete or become inactive. An active session is one currently involved in a
transaction, query, or parallel operation. Individual parallel slaves are not counted as sessions; the
entire parallel operation counts as one active session.There is only one queue per resource
consumer group and the queuing method is first in, first out (FIFO) with a timeout. The queue is
implemented as a memory structure and cannot be queried directly.
质疑,我的疑问是E, 每一个Group 都有自己的queue,而当一个queue 满的
时候,根据FIFO,后加入的应该等待才对啊?可是为什么会是E 呢?
114. By mistake, you ran the batch job (for updating the BILL_DETAILS
table) twice. You are not sure which rows in the BILL_DETAILS table
were affected. You need to identify:
a) A list of changes made along with the transaction identifier of ea
ch change.
b) The necessary SQL statements to undo the erroneous changes.
Which option would you choose?
A. RMAN only.
B. Flashback Table only.
C. Flashback Version Query only.
D. Flashback Database and Flashback Transaction Query.
E. Flashback Version Query and Flashback Transaction Query.
Answer: E
115. You used the following command in Recovery Manager (RMAN) as par
t of the recovery process: RESTORE CONTROLFILE FROM AUTOBACKUP;
How does RMAN find the control file autobackup? (Choose all the apply
)
A. By using the trace file.
B. By using the alert log file.
C. By using the database ID.
D. By using the server parameter file.
E. By using the V$CONTROLFILE view.
F. By using the autobackup format configuration setting.
Answer: C, F
当RESTORE CONTROLFILE FROM AUTOBACKUP 后oracle 怎样找到正确的备份
a、通过oracle database ID
b、通过自动备份格式
116. In one of your online transaction processing (OLTP) applications
, users are manipulating and querying a database table simultaneously
. From the Segment Advisor, you find that one of the tables is highly
fragmented and you want to shrink the table immediately without affe
cting the currently active queries. Which option would you use with t
he ALTER TABLE command to achieve this objective?
A. REBUILD
B. CASCADE
C. TRUNCATE
D. ROW MOVEMENT
E. SHRINK SPACE COMPACT
F. SHRINK SPACE CASCADE
Answer: E
The segment shrink functionality both compacts the space used in a
segment and then deallocates it from the segment.
1,alter table shrink space compact cascade;对大表或大索引操作会产生大
量日志
2,alter table shrink space;
--加上compac(简洁的)选项仅重新整理segment 空间,并压缩表的记录在以
后进行release 空间.但数据库并不调整hwm 及释放空间.为了释放空间.你必须
再发布alter table shrink space
--compact 用于把一个长操作分割为两个较短的操作
--须开启行移动
--cascade 会级联对其依赖对象(比如上面的索引)进行压紧操作
alter table table_name shrink space;
後面還有兩個參數:cascade,compact;
compact(紧凑的,简洁的):加此參數是爲了黨系統負載比較大時,做此動作可以
減小性能影響。在負載比較輕時,在作一次alter table table_name shrink
space;就可以了。
cascade:加上此參數會及聯shrink table 上的索引,也相當如rebuild index;
也就相當於你上面在9i 裏處理此問題的第二种方式了!
117. You are working in a dedicated server environment. Your database
is running in the automatic Program Global Area (PGA) memory managem
ent mode. Which two statements are correct in this scenario? (Choose
two)
A. The WORK_AREASIZE_POLICY initialization parameter cannot be set to
AUTO.
B. The Oracle database automatically controls the amount of PGA memor
y allotted to SQL work areas.
C. Setting the value of the SGA_TARGET initialization parameter to 0
will disable the automatic PGA memory management.
D. The SORT_AREA_SIZE parameter is ignored by all the sessions runnin
g in the automatic PGA memory management mode.
Answer: B, D
oracle 已经不建议使用SORT_AREA_SIZE 参数了,oracle 建议通过设置
PGA_AGGREGATE_TARGET 来激活自动工作区管理, 一旦设置了
pga_aggregate_target 以后,所有的*_area_size 就将被忽略.
启用PGA 自动管理是很容易的,只要设置两个初始化参数即可。首先,设置
workarea_size_policy 参数。该参数为auto(也是缺省值)时,表示启用PGA
自动管理;而设置该参数为manual 时,则表示禁用PGA 自动管理,仍然沿用9i
之前的方式,即使用*_area_size 对PGA 进行管理。
1: SORT_AREA_SIZE:在信息换出到磁盘之前,用于对信息排序的RAM 总量。
SORT_AREA_RETAINED_SIZE:排序完成后用于保存已排序数据的内存总量。也就
是说,如果SORT_AREA_SIZE是512 KB,SORT_AREA_RETAINED_SIZE是256 KB,那
么服务器进程最初处理查询时会用512 KB的内存对数据排序。等到排序完成时,
排序区会“收缩”为256 KB,这256 KB 内存中放不下的已排序数据会写出到临
时表空间中
2: 当work_areasize_policy 为auto 的时候,系统只会使用
pga_aggregate_target 参数对应的值来分配相应的排序空间,这个参数是可以
在session 中动态修改的。
118. Users are performing a large volume of inserts and deletes on th
e application tables in the APPS tablespace. You observe that there a
re several warning alerts being generated for the APPS tablespace spa
ce usage metrics. Currently, the warning threshold for the tablespace
usage metrics is set to 70%. To make the generated alerts more usefu
l as a problem identification tool, you want to reduce the frequency
of alert generation for the tablespace usage metrics for the APPS tab
lespace. What should you do?
A. Disable SQL tracing for the APPS tablespace.
B. Disable logging attributes for the APPS tablespace.
C. Modify the tablespace to be a dictionary-managed tablespace.
D. Increase the critical threshold value for the tablespace space usa
ge metrics for the APPS tablespace.
E. Increase the warning threshold value for the tablespace space usag
e metric for the APPS tablespace.
Answer: E
默认情况下,表空间空间占用率(达到 70% warning 时发出警告,达到
90%critical 时发出严重警告), warning threshold 是不能超过critical
threshold 的.
119. Using Oracle Scheduler you have scheduled two jobs, JOB_A and JO
B_B, to run at 9:00 p.m. every Friday. You want both the jobs to use
a single resource plan, WEEKEND_PLAN. Which task must have already be
en performed to enable you to achieve this objective?
A. A window must have been created with the WEEKEND_PLAN resource pla
n.
B. A program must have been created with the WEEKEND_PLAN resource pl
an.
C. A job class must have been created with the WEEKEND_PLAN resource
plan.
D. A windows group must have been created with the WEEKEND_PLAN resou
rce plan.
Answer: C
Oracle 10g Scheduler 特性
http://blog.csdn.net/tianlesoftware/archive/2009/10/23/4715218.as
px
•窗口”由定义好起始时间和结束时间的时间间隔表示,用于在不同时间激活不
同的资源计划。这将允许您在某一时段(如每日时间或销售年度时间)内更改资
源分配。
作业类”定义作业的类别,这些作业共享公用资源使用要求及其他特性
高级调度程序概念,可以对调度的各个方面进行更高级别的控制,例如区分作业
的优先级。
考虑能不能建立某种作业直接针对job,因为这些job 都很相识,而不通过他的
用户来产生,于是作业类就产生了
现在可以把作业类跟资源消耗者组关联,跨过了用户,不管哪个用户登录了
em 创建作业类
select * from dba_scheduler_job_classes
里面可以查看到刚才建的作业类和资源消耗者组关联了
120. What are the two advantages of RMAN Block Media Recovery (BMR) o
ver file-level recovery? (Choose two)
A. BMR lowers the mean time to recover (MTTR).
B. BMR supports point-in-time recovery of individual data blocks.
C. BMR enables you to use incremental backups for block recovery.
D. BMR enables recovery even when the database is not mounted or open
E. BMR enables you to use proxy backups to perform block media recove
ry.
F. BMR enables increased availability of data during recovery because
the data file requires a recovery can remain online.
Answer: A, F
Block 是oracle 数据库最小恢复单位。鉴于此,BMR 可以大大缩短恢复的时
间,另外,在进行BMR 时不需要停掉数据库,可以直接在数据库open 状态对数
据文件进行恢复,只是需要恢复的块被锁定无法访问,可以说对应用的影响非常

使用RMAN Block Media Recovery (BMR)的好处
a、减少MTTR 的时间
b、由于正在恢复的数据文件继续保持联机状态,所以可以提高数据在介质恢复
期间的可用性。
对于选项c 的结论:
You must have a full backup of the file containing the corrupt blocks:
block media recovery cannot use incremental backups.
Level 0,或者在无Level 0 可用的备份下做的Level 1 的增量备份都是一个完整的包含
了损坏的块的备份,所以应该也是可以用来执行Block Media Recovery 的.只是说当使用过
Level 0,或者在无Level 0 可用的备份下做的Level 1 的增量备份后不会使用更高Level
的增量备份进行恢复,而只会采用应用Archived log files 的方式进行恢复.
121. While creating a scheduler window using the DBMS_SCHEDULER packa
ge, a user logged in as DBMGR gets the error message insufficient pri
vileges? Which two commands would you use to resolve this error? (Cho
ose two)
A. GRANT dba TO dbmgr;
B. GRANT connect TO dbmgr;
C. GRANT resource TO dbmgr;
D. GRANT hs_admin_role TO dmbgr;
E. GRANT manage scheduler TO dbmgr;
Answer: A, E
如何管理计划任务的权限
GRANT SCHEDULER_ADMIN TO username
GRANT CREATE JOB TO scott
GRANT ALTER myjob1 TO scott
GRANT MANAGE SCHEDULER TO adam;
122. You have set the value of the NLS_TIMESTAMP_TZ_FORMAT parameter
in the parameter file to YYYY-MM-DD. The default format of which two
data types would be affected by this setting? (Choose two)
A. DATE
B. TIMESTAMP
C. INTERVAL YEAR TO MONTH
D. INTERVAL DAY TO SECOND
E. TIMESTAMP WITH LOCAL TIME ZONE
Answer: B, E
NLS_TIMESTAMP_TZ_FORMAT :Defines the default date format for the
TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE data types used with
the TO_CHAR and TO_TIMESTAMP_TZ functions. Must have NLS_LANG set.
The value must be surrounded by quotation marks as follows:
NLS_TIMESTAMP_TZ_FORMAT = ‘YYYY-MM-DD HH:MI:SS.FF TZH:TZM‘
123. For an incomplete recovery, which four backup types can be used
by Recovery Manager (RMAN) to restore data files? (Choose four)
A. RMAN image copies.
B. RMAN database backups.
C. RMAN tablespace backups.
D. User-managed backups placed in the flash recovery area.
E. User-managed backups that have been cataloged with RMAN.
F. User-managed data file backups for which the pull path name is spe
cified.
Answer: A, B, C, E
用rman 备份的非用户管理备份才能用于不完全恢复。
ABC 应该是没有争议吧,选择E 是因为可以将用户管理的备份文件(数据文件,
控制文件、归档日志文件)记录到catalog,具体的语法是:
catalog datafilecopy(/controlfilecopy/archivelog) ‘<filename>‘ ;
另:可以由操作系统改备份文件名字,假如为a.bkp
rman>change backuppiece ‘e:\....bkp‘ uncatalog 但没有成功
于是直接删除备份集
rman>delete backupset 1;(删除控制文件对应内容和实际物理的文件)
rman>crosscheck backupset 1;
rman>list backupset 1;
变为无效的
rman>delete backupset 1;
再把a.bkp 加入到备份集来
rman>catalog backuppiece ‘e:\...a.bkp‘;
124. You are using Oracle Database 10g. You performed an incomplete r
ecovery of your database and opened the database with the RESETLOGS o
ption. What is the effect of opening the database with the RESETLOGS
option? (Choose two)
A. This operation resets the SCN for the database.
B. This operation creates a new incarnation of the database.
C.This operation moves all the redo log files to a different location
D. This operation deletes the old redo log files and creates new redo
log files.
E. This operation updates all current datafiles and online redo logs
and all subsequent archived redo logs with a new RESETLOGS SCN and ti
me stamp.
Answer: B, E
select file#,checkpoint_change# from v$datafile;
select file#,checkpoint_change# from v$datafile_header;
只要以上两个不一致,就需要resetlog 打开
alter database open resetlogs; 即截断多余的scn , resetscn 更好
a.截断scn (有疑问) (warehous)
b.把当前日志归档
c.序列号从1 开始了 重建日志了
125. Which statement is true while creating subplans using Resource M
anager?
A. The subplan must belong to the consumer group, SYS_GROUP.
B. The total CPU usage at any given level must be less than 100%.
C. The subplans can be used to restrict the degree of parallelism for
a user.
D. You can use a resource plan instead of a consumer group to impleme
nt a priority ranking within the plan.
Answer: D
不懂
对应D 的解释
It is very simple to use the Database Resource Manager in an environment
Where each application user logs on to the database using a different
database username. It is also not very difficult to implement it where
applications use generic database login. Since Database Resource Manager
actually controls resource utilization at the session level, it is
possible to prioritize one session over another, even if both the
sessions belong to the same database user. Therefore, it is possible to
switch a session to the desired consumer group because of the user’s
application role, using the DBMS_SESSION.SWITCH_CURRENT_CONSUMER_GROUP
procedure
126. Your database is functioning in ARCHIVELOG mode. In which two si
tuations would you perform a cancel-based recovery? (Choose two)
A. You find that one of the redo log members in each redo log gro
up is lost.
B. You find that a data file that belongs to the USERS tablespace
is damaged.
C. You find that a data file that belongs to the SYSTEM tablespac
e is damaged.
D. You find that the current redo log group is damaged and is not
available for recovery.
E. You realized while performing a recovery that an archived redo
log file needed for recovery is lost.
Answer: D, E
127. In your test database, you have created the ORDERS table as an i
ndex-organized table (IOT). To facilitate faster querying, you have c
reated a mapping table and a bitmap index on the ORDER_FILLED column.
You observe that the query performance degrees when users perform a
large volume of transactions. While investigating the reason, you fin
d that the mapping table segment is fragmented, leading to poor perfo
rmance. Which option would you use to defragment the mapping table wi
thout affecting the original table data?
A. Export and import the mapping table.
B. Drop and re-create the mapping table.
C. Truncate the mapping table and reinsert the values.
D. Use the ALTER TABLE .. REBUILD command to defragment the mappi
ng table.
Answer: B
SG 13-38 重建mapping table 一定要dropped and re-create
128. A media failure has occurred. This has resulted in all the membe
rs of the next hop log group being rendered inaccessible to the log w
riter process (LGWR) at a log switch. How does this failure affect th
e operational database?
A. The database re-created the missing redo log files automatically.
B.The database continues to function normally with the existing files
C. The database allows only queries, no other statements are allowed.
D.The database returns and error and the database instance shuts down
E. The user sessions that generate redo logs are terminated automatic
ally.
Answer: D
如果LGWR 正在访问的日志组坏掉,那么数据库会报错,instance 会关掉
129. Consider the following command to create a tablespace in your pr
oduction database (which is using an Automatic Storage Management [AS
M] instance to manage the database files):
CREATE TABLESPACE user_tbsp DATAFILE ‘+dgroup3 (usder_temp) /user_fil
es/user_tbsp‘ SIZE 200M;
What would be the result of this command?
A. It would result in an error because the template cannot be used al
ong with the disk group.
B. It would result in an error because the path cannot be specified w
hile creating a tablespace in a disk group.
C. It would create a tablespace with a data file that has an alias, a
nd its attributes are set by the user-defined template.
D. It would create a tablespace with a data file that does not have a
n alias, and its attributes are set by the user-defined template.
Answer: C
该命令将创建一个表空间包括一个数据文件有同义词,而且他的特性由用户自
己定义。(条带和镜像配置模板)
130. You enabled the flashback logging feature, but you have not spec
ified the location of the flash recovery area.
Which location would be used as the default location for the flash re
covery area?
A. The location used for control files.
B. The location used for redo log files.
C. The location set by using $ORACLE_BASE.
D. The location set by using $ORACLE_HOME.
E. The location set by using CORE_DUMP_DEST.
F. The location set by using BACKGROUND_DUMP_DEST.
Answer: C
ORACLE_BASE下是admin和product,ORACLE_HOME下则是ORACLE的命令、连接库、安装助
手、listener等等一系列的东东。这只是ORACLE自己的定义习惯。ORACLE_HOME比ORACLE_BASE
目录要更深一些。也就是说:ORACLE_HOME=$ORACLE_BASE/product/version
ORACLE_BASE是oracle的根目录,ORACLE_HOME是oracle产品的目录。
简单说,你如果装了2 个版本的oracle,那么ORACLE_BASE可以是一个,但ORACLE_HOME是2

为了保存管理和备份恢复相关的文件,oracle10g 提供了一个叫做闪回恢复区
(Flashback recovery area),这个区域默认创建在oracle_base 目录下。 可以将所有恢复
相关的文件,比如flashback log,archive log,backup set 等,放到这个区域集中管理。
db_recovery_file_dest:指定闪回恢复区的位置
db_recovery_file_dest_size:指定闪回恢复区的可用空间大小
db_flashback_retention_target:指定数据库可以回退的时间,单位为分钟
默认1440 分钟,也就是一天。当然,实际上可回退的时间还决定于闪回恢复区
的大小,因为里面保存了回退所需要的flash log。所以这个参数要和db_reco
very_file_dest_size 配合修改。
1: 默认情况数据库的flashback database 是关闭
2: archive log list; --数据库必须已经处于归档模式
Sql> alter database flashback on;
3: 将db_recovery_file_dest 参数设置为空,可以停用闪回恢复区。如果已经启用
flashback database,则不能取消闪回恢复区。
4: DB_RECOVERY_FILE_DEST_SIZE 只有在 DB_RECOVERY_FILE_DEST 清空之后才可以清空
5: 初始化参数 db_recovery_file_dest_size 的设定有一点点需要注意的地方:文件的第
0 块和操作系统数据块头的空间大小不包含在内,该参数并不代表实际占用的空间大小。如
果空间被压缩、镜像、RAID 的话,该参数的值意义是不一样的

时间: 2024-10-17 19:30:06

ocp 1Z0-043 61-130题解析的相关文章

【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 table, DEPTNO is the PRIMARY KEY. In the EMP table, EMPNO is the PRIMARY KEY and DEPTNO is the FOREIGN KEY referencing the DEPTNO column in the DEPT t

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

34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES tables. You have a requirement from the supplies department to give a list containing PRODUCT_ID, SUPPLIER_ID, and QUANTITY_ON_HAND for all the produc

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

33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Examine the following SQL statement: SELECT order_id, product_id, unit_price FROM order_items WHERE unit_price = (SELECT MAX(unit_price) FROM order items G

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

35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evaluate the following SQL statement: SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date,6),1) "Review" FROM employees; The query was writt

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

36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables. You issue the following query: SQL>SELECT p.prod_id,prod_name,prod_list_price, quantity_sold,cust_last_name FROM products p NATURAL J

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

30.choose the best answer Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS: SQL> CREATE TABLE DEPARTMENT_DETAILS (DEPARTMENT_ID NUMBER PRIMARY KEY, DEPARTMENT_NAME VARCHAR2(50) , HOD VARCHAR2(50)); SQL> CREATE TABLE COURSE_D

乾颐堂安德华为数通HCNA真题解析版(第2部分)

HCNA真题解析视频即将上线,敬请关注本博客以及乾颐堂官网书接上文:16 Interface GigabitEthernet0/0/1 Port link‐type trunk Port trunk allow‐pass vlan 2 to 4094 根据如上所示的命令输出,下列描述中正确的是()(多选)A GigabitEthernet0/0/1 不允许 VLAN1 通过B GigabitEthernet0/0/1 允许 VLAN1 通过C 如果要把 GigabitEthernet0/0/1

《PHP程序员面试笔试真题解析》——新书上线

你好,是我--琉忆.很高兴可以跟你分享我的新书. 很高兴,在出版了PHP程序员面试笔试宝典后迎来了我的第二本书出版--<PHP程序员面试笔试真题解析>. 如果你是一个热爱PHP的程序员,刚踏入PHP职场,你值得拥有这本书来自学一番,再去尝试找PHP相关的工作,对你帮助绝对不是一般的大!! PS:宝典和真题解析其实是一套的~ 以下简单的对我的新书做个介绍~ 前言 本书的适用群体:刚接触PHP,自学一段时间PHP后打算去找PHP相关的PHP面试工作的群体.这部分群体可以尝试着去练习这部分企业中经常

2015 初赛TG 错题解析

2015 初赛TG 错题解析 得分:==81.5== 过失性失分:T6(1.5) 未掌握的知识点失分:T3(1.5) T12(1.5) T19(1.5) 未把已知活学活用T11(1.5) 没看懂程序 T26(8) T28-1(3) T3 1948 年,( )将热力学中的熵引入信息通信领域,标志着信息论研究的开端. A. 冯·诺伊曼(John von Neumann) B. 图灵(Alan Turing) C. 欧拉(Leonhard Euler) D. 克劳德·香农(Claude Shannon

《数据库系统概论(第5版)》课后习答案 王珊、萨师煊编著版 课后题解析 高等教育出版社出版 答

<数据库系统概论(第5版)>课后习答案 王珊.萨师煊编著版 课后题解析 高等教育出版社出版 答案与解析 <数据库系统概论(第5版)> 王珊.萨师煊编著版 第二篇 第1章 课后答案与解析 完整答案在页面最下方 前言第一篇 基 础 篇 课后习题答案与解析第1章 绪论 课后习题答案与解析1.1 数据库系统概述1.2 数据模型1.3 数据库系统的结构1.4 数据库系统的组成1.5 小结习题本章参考文献第2章 关系数据库 课后习题答案与解析2.1 关系数据结构及形式化定义2.2 关系操作2.