131. Which three methods can you use to run an Automatic Database Dia
gnostic Monitor (ADDM) analysis over a specific time period? (Choose
three.)
A. Enterprise Manager GUI
B. DBMS_TRACE package APIs
C. DBMS_ADVISOR package APIs
D. DBMS_MONITOR package APIs
E. $ORACLE_HOME/rdbms/admin/addmrpt.sql script
Answer: A, C, E
DBMS_MONITOR 是在Oracle 10g 中引入的内置的程序包,通过该程序包可以跟踪从客户
机到中间层、再到后端数据库的任何用户的会话,从而可以较为容易地标识创建大量工作量
的特定用户。
Oracle 提供了DBMS_ADVISOR 包来优化SQL,可以通过定义任务,属性,负载等来明确
定义SQL 优化的目标。
To make use of ADDM, a PL/SQL interface called DBMS_ADVISOR has been implem
ented. This PL/SQL interface may be called through the supplied $ORACLE_HOME/rd
bms/admin/addmrpt.sql script, called directly, or used in combination with the
Oracle Enterprise Manager application. Besides this PL/SQL package a number of
views (with names starting with the DBA_ADVISOR_prefix) allow retrieval of the
results of any actions performed with the DBMS_ADVISOR API. The preferred way o
f accessing ADDM is through the Enterprise Manager interface, as it shows a com
plete performance overview including recommendations on how to solve bottleneck
s on a single screen. When accessing ADDM manually, you should consider using t
he ADDMRPT.SQL script provided with your Oracle release, as it hides the comple
xities involved in accessing the DBMS_ADVISOR package.
132. Which background process does Automatic Shared Memory Management
use to coordinate the sizing of memory components?
A. PMON
B. SMON
C. MMNL
D. MMAN
E. MMON
Answer: D
The Automatic Shared Memory Management feature uses a new background proces
s named Memory Manager (MMAN). MMAN serves as the SGA Memory Broker and coordi
nates the sizing of the memory components. The SGA Memory Broker keeps track of
the sizes of the components and pending resize operations
MMAN is used for internal database tasks.
PMON:进程监控进程
进程负责在反常中断的连接之后的清理工作。例如,如果因某些原因专用服务“故障”
或被kill 掉,PMON 就是负责处理(恢复或回滚工作)和释放你的资源。PMON 将发出未提交
工作的回滚,释放锁,和释放分配给故障进程的SGA 资源。
SMON:系统监控
SMON 是负责做所有系统级的工作。相对于PMON 对单个进程感兴趣,SMON 是一个系统级
别的观点,是一种用于库的“垃圾收集者”。
(eygle)在Oracle10g 中,有两个后台进程是新增的,这里我想说的是MMON 和MMNL。
在Oracle 不同的文档中,对这两个进程的解释存在歧义。
MMON 应该是 Memory Monitor 的缩写,但是在有的文档中被记录为Manageability
Monitor ,这应当是10g 早期版本中的称呼,只不过后来发生了变更。
这个进程的主要作用如下:
The memory monitor (MMON) process was introduced in 10g and is associated with
the Automatic Workload Repository new features used for automatic problem
detection and self-tuning. MMON writes out the required statistics for AWR on
a scheduled basis.
MMNL ,是 Memory Monitor Light (MMNL) 的缩写,在部分文档中记录为 Manageability
Monitor Light .这个进程的作用如下:
The Memory Monitor Light (MMNL) process is a new process in 10g which works with
the Automatic Workload Repository new features (AWR) to write out full statistics
buffers to disk as needed
133. Which six files are maintained in the Flash Recovery Area? (Choo
se six.)
A. control file
B. RMAN files
C. password file
D. parameter file
E. flashback logs
F. data file copies
G. core dump files
H. archived log files
I. RMAN recovery scripts
J. control file autobackpus
Answer: A, B, E, F, H, J
可以查看select * from v$flash_recovery_area_usage
Following is a list of recovery-related files in flash recovery area:
1. Current control file
2. Online logs
3. Archived logs
4. Flashback logs
5. Control file autobackups
6. Control file copies
7. Datafile copies
8. Backup pieces
另:Flashback Database uses the flashback logs to perform flashback.
Flashback Drop uses therecycle bin. All other techniques use undo data
注意参数文件不放在闪回区里
134. Consider the following scenario: You have a directory, data, und
er the disk group tdgroup A. You want to create an alias for one of t
he 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 relocates 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 remaining the file to datafile.dbf.
D. The command creates a synonym, datafile.dbf, and places it in +tdg
roupA/data and does not remove the +tdgroupA.231.45678 file.
E. The command creates a file, datafile.dbf, in +tdgroupA/ data and r
emoves the references for +tdgroupA.231.45678 from the data dictionar
y views.
Answer: D
Alias names (or just "aliases") are intended to provide a more us
er-friendly means of referring to ASM files, rather than using the sy
stem-generated filenames. You can create an alias for a file when you
create it in the database, or you can add an alias to an existing fi
le using the ADD ALIAS clause of the ALTER DISKGROUP statement. You c
an create an alias in any system-generated or user-created ASM direct
ory. You cannot create an alias at the root level (+), however. The f
ollowing statement adds a new alias name for a system-generated file
name:
ALTER DISKGROUP dgroup1 ADD ALIAS '+dgroup1/mydir/second.dbf' FOR '+d
group1/sample/datafile/mytable.342.3';
135. Exhibit
One the evening of April 22, you are working on a database created us
ing Oracle Database 10g. This database operates in the ARCHIVELOG mod
e. You discover that you need crucial data that was dropped from the
database at 8:00 a.m. No full backup has been taken after April 15. W
hat would you do?
A. recover the database until April 10
B. recover the database until April 15
C. recover the database until 22 7:59 a.m.
D. recovery is not possible; manually re-create the object
Answer: C
RMAN simplifies recovery operations using backups taken from earl
ier database incarnation so that it is easy as recovering a backup fr
om the same incarnation. The simplified recovery through RESETLOGS fe
ature is an enhancement to recovery operations so that previous incar
nation backups can be used for recovery of the current database incar
nation. You use this feature when you have performed an incomplete re
covery (or a recovery using a backup control file) and opened the dat
abase with the RESETLOGS option.
To perform incomplete recovery, use the SET UNTIL command to spec
ify the time, SCN, restore point, or log sequence number at which rec
overy terminates. Alternatively, specify the UNTIL clause on the REST
ORE and RECOVER commands.
10g 支持穿越resetlog 用当前数据库的控制文件(resetlog 后的控制文件)
加上resetlog 之前数据文件的备份,其实只要scn 连续就行
136. You are unable to move the Unified Job Scheduler occupant from t
he SYSAUX tablespace to the USERS tablespace. What could be the reaso
n?
A. None of the SYSAUX occupants can be relocated.
B. The USERS tablespace is a bigfile tablespace (BFT).
C. The united Job Scheduler occupant cannot be relocated.
D.The SYSAUX occupants can be relocated to the SYSTEM tablespace only
Answer: C
A - Not true. Same off the occupants can be move
B - Not true. The USERS occupant , isn't , by default a BFT tablespac
e, and even tought, you should be able to move anything to a BFT tabl
espace. The point it's about to move, SYSAUX occupant.
C - True answer, as you can check , by the following query :
SELECT occupant_name, move_procedure FROM v$sysaux_occupants;
D - Not true. Can move SYSAUX occupants, whem is possible, to any tab
lespace that you want.
SYAAUX 表空间具有如下限制:
1. 不能删除
2. 不能重命名
3. 不能置为read only 可以offline
如果希望转移这些系统对象的表空间,可以使用相应得系统包实现:
SELECT occupant_name, schema_name, move_procedure,space_usage_kbytes
FROM v$sysaux_occupants ORDER BY 1
可以看到Job Scheduler 是不能转移的
137. You enabled block change tracking for faster incremental backups
in your database. Which background process writes to the change trac
king file?
A. RBAL
B. CKPT
C. SMON
D. PMON
E. MMON
F. CTWR
G. DBWR
Answer: F
CTWR-执行增量备份的目的是为了只备份自上一次备份以来更改过的数据
块。每个增量备份过程中都会读取整个数据文件,即使自上次增量备份以来该文
件只有很小一部分进行了更改。块更改跟踪功能使用更改跟踪写进程 (CTWR) 这
一后台进程将所有数据库更改的实际位置记录到名为“更改跟踪文件”的新类型
的文件中。启用更改跟踪后,第一个级别为 0 的增量备份仍须扫描整个数据文
件,因为更改跟踪文件尚未反映块的状态。对于后续增量备份,RMAN 将使用更
改跟踪数据来确定增量备份过程中要读取的块,无需读取整个数据文件,从而提
高了性能。 Change Tracking Writer (CTWR)
138. You want to enforce a company's business policy on several objec
ts by using a single policy function. Which two types of policies can
be assigned to the policy_type argument in the dbms_rls.add_policy pr
ocedure to achieve the above objective? (Choose two.)
A. DBMS_RLS.STATIC
B. DBMS_RLS.DYNAMIC
C. DBMS_RLS.SHARED_STATIC
D. DBMS_RLS.CONTEXT_SENSITIVE
E. DBMS_RLS.SHARED_CONTEXT_SENSITIVE
Answer: C, E
DBMS_RLS.SHARED_STATIC The policy function executes once, Once, t
hen the predicate is cached in the SGA, and it's Shared Across Multip
le Objects, like Hosting environments, such as data warehouses wheret
he same predicate must be applied to multiple database objects DBMS_R
LS. SHARED_CONTEXT_SENSITIVE The policy function executes f irst time
and the object is reference in a database session Predicates are cac
hed in the private session memory UGA so policy functions can be shar
ed among objects.
10g 中可用的类型有:
1)动态(默认) 2)静态 3)共享-静态 4)上下文敏感 5)共享-上下文敏感
静态策略类型 :对于静态策略类型,我们可以将参数POLICY_TYPE 的值指定为
DBMS_RLS.STATIC。在静态的策略类型中,谓词在不同运行环境下都是相同的。
静态策略函数运行一次,并且被缓存到SGA,这样静态策略函数就非常快。访问
相同对象的语句不需要重复运行策略函数,当然根据SYS_CONTEXT 和SYSDATE
这样的属性不同,每次运行也可以产生不同的结果。
共享-静态策略类型 :当一个函数用于多个策略中的时候,我们称之为共享策略。
共享策略可以在多个对象的业务处理策略相同的时候,不必为每个对象都创建一
个策略函数。我们应该将POLICY_TYPE 设置为DBMS_RLS.SHARED_STATIC。它的
处理方式与STATIC 相同。
上下文敏感策略 :我们需要将参数POLICY_TYPE 的值指定为
DBMS_RLS.CONTEXT_SENSITIVE。如果数据库发现自上次使用以后,运行的上下文
环境发生了变化,那么就会对上下文敏感策略函数重新求值。
共享-上下文敏感策略类型 :与上下文敏感策略类似,只不过函数是可以共享的。
我们需要将POLICY_TYPE 指定为DBMS_RLS.SHARED_CONTEXT_SENSTIVE。
139. The database is currently running in the NOARCHIVELOG mode. What
would be the first step to configure Flashback Database?
A. Enable flashback logging.
B. Start the database in the ARCHIVELOG mode.
C. Issue the ALTER DATABASE FLASHBACK ON; command.
D. Set the FAST_START_MTTR_TARGET initialization parameter.
Answer: A
质疑
Here is the problem... the question ask "for the first step"...Bu
t the database MUST be in archivelog mode and de flash recovey area M
UST be enable, thus I belive the answer correct would be A and B.
Flashback Database uses its own logging mechanism, creating flash
back logs which are stored in the flash recovery area. You can only u
se Flashback Database if flashback logs are available. Therefore, you
must set up your database in advance to create flashback logs if you
want to take advantage of this feature.
The requirements for enabling Flashback Database are:
* Your database must be running in ARCHIVELOG mode, because archived
logs are used in the Flashback Database operation.
* You must have a flash recovery area enabled, because flashback logs
can only be stored in the flash recovery area.
140. You have configured Automatic Shared Memory Management. Which fo
ur memory structures would be automatically tuned? (Choose four)
A. log buffer
B. Java pool
C. Large pool
D. Fixed SGA
E. Shared pool
F. Streams pool
G. Keep buffer cache
H. Database buffer cache
Answer: B, C, E, H
SQL> select instance_name,version from v$instance ;
INSTANCE_NAME VERSION
---------------- -----------------
mydb 10.2.0.1.0
Elapsed: 00:00:00.00
sys@mydb(10.168.0.202) SQL> host ;
[oracle@mailserver ~]$ strings /u01/app/oracle/dbs/spfilemydb.ora | grep __
mydb.__db_cache_size=3120562176
mydb.__java_pool_size=16777216
mydb.__large_pool_size=83886080
mydb.__shared_pool_size=805306368
mydb.__streams_pool_size=33554432
实际上Streams Pool 在Oracle 10g R2 中纳入ASMM(auto segment space management)的
调整范围了,题目问的是4 个参数,估计还是立足于Oracle 10g R1 这个版本咯。
当管理员设置了 SGA_TARGET 的值后,Oracle 10g 会自动地设定各个 SGA 内存组件,包括:
1.共享池(shared pool)(供 SQL and PL/SQL 执行使用)
2.Java 池(Java pool)(供 Java 执行使用)
3.大型池(large pool)(供大块的内存分配使用,例如 RMAN 备份时所需
缓冲区)
4.数据缓存区(buffer cache) 即Database buffer cache
5.数据流池(streams pool)
管理员无需为这些内存组件显式地设置容量。默认情况下这些内存组件的参
数值将显示为零。当某个内存组件需要更多的内存时,可以通过 Oracle 内
部的自动调整机制从其他组件获取。这些工作对用户而言是透明的,无需人
工干预。
Select * from v$sga_dynamic_components
SGA 所有的组件:
• Database buffer cache: Caches blocks of data retrieved from disk
• Redo log buffer: Caches redo information until it can be written to disk
• Shared pool: Caches various constructs that can be shared among users
• Large pool: Optional area used for buffering large I/O requests in support of
parallel query,shared server, Oracle XA, and certain types of backup operations
• Java pool: Holds session-specific Java code and data within the Java Virtual
Machine(JVM)
• Streams pool: Used by Oracle Streams
• Keep buffer cache: Holds data that is kept in the buffer cache as long as possible
• Recycle buffer cache: Holds data that is quickly aged out of the buffer cache
• nK block size buffer caches: Caches data blocks that are of a different size than
the default database block size; used to support transportable tablespaces
注意:log buffer 不能自动管理
141. The DB_BLOCK_CHECKING initialization parameter is set to FALSE.
What level of block checking would be performed?
A. The Oracle database will not perform block checking for any of the
data blocks.
B. The Oracle database will perform block checking for the default pe
rmanent tablespace only.
C. The Oracle database will perform block checking for the data block
s in all user tablespaces.
D. The Oracle database will perform block checking for the data block
s in the SYSTEM tablespace only.
E. The Oracle database will perform block checking for the data block
s in the SYSTEM and SYSAUX tablespaces.
Answer: D
实时验证块完整性:DB_BLOCK_CHECKING
DB_BLOCK_CHECKING 设置为 TRUE 时,Oracle 数据库将对所有数据块执行块检查。
Oracle 数据库通过读取块中的数据来检查块,以确保此数据块的自我一致性。块检查常常
可以防止内存和数据损坏。块检查通常会产生 1% 到 10% 的开销,具体比例取决于工作量。
正在执行的更新或插入操作越多,执行块检查的开销就会越高。DB_BLOCK_CHECKING 有以下
四个可能的值:
•OFF:在除 SYSTEM 之外的任何表空间中都不执行块检查。
•LOW:在内存中块的内容发生更改之后(例如,在 UPDATE 或 INSERT 语句之后以及在磁盘
上读取时),执行基本的块头检查。
•MEDIUM:执行所有 LOW 检查,并对所有不是按索引组织的表块执行块检查。
•FULL:执行所有 LOW 和 MEDIUM 检查,以及对索引块的检查。
如果性能开销可以接受,则应将 DB_BLOCK_CHECKING 设置为 FULL。默认值为 FALSE,
此值等同于以前版本中的 OFF。即使关闭了此选项,也始终对 SYSTEM 表空间执行块检查。
142. View the Exhibit and examine the characteristics of the USERS ta
blespace. You observe that a large volume of inserts and deletes are
happening on the TRANS table in the USERS tablespace and you suspect
that the TRANS table is fragmented.
Which advisory component would you refer to, in order to find informa
tion about table fragmentation? Exhibit:
A. Segment Advisor
B. SQL Access Advisor
C. SQL Tuning Advisor
D. Memory Advisor
E. Automatic Database Diagnostic Monitor (ADDM)
Answer: A
SQL Tuning Advisor: Provides tuning advice for SQL statements
SQL Access Advisor: Deals with schema issues and determines optimal data
access paths,such as indexes and materialized views
Segment Advisor: Monitors object space issues and analyzes growth trends
143. What are the prerequisites for enabling Flashback Database? (Cho
ose all that apply.)
A. The database must be started in the MOUNT EXCLUSIVE state.
B. The database must have multiplexed control files.
C. The database must be opened by using a text-based parameter file i
nstead of a server parameter file (SPFILE).
D. The database must be in ARCHIVELOG mode.
E. The database must be in the NOMOUNT state.
F. The database must be opened in RESTRICTED mode.
Answer: A,D
可以按以下步骤配置闪回数据库:
1. 配置快速恢复区。
2. 使用初始化参数 DB_FLASHBACK_RETENTION_TARGET 设置保留目标。可以指定一个上限
值(以分钟表示),指明希望能够将数据库闪回到多长时间以前。本示例使用了 2880 分钟,
相当于两天。该参数只是一个目标,并不提供任何保证。闪回时间间隔取决于快速恢复区中
保留的闪回数据量的大小。
3. 通过以下命令启用闪回数据库:
ALTER DATABASE FLASHBACK ON;
必须先配置数据库以进行归档,且必须在 MOUNT EXCLUSIVE 模式下启动数据库后,才
能发出此命令来启用闪回数据库。
可以通过以下查询来确定是否启用了闪回数据库:
SELECT flashback_on FROM v$database;
可以使用 ALTER DATABASE FLASHBACK OFF 命令禁用闪回数据库。这样,便会自动删除所有
现有闪回数据库日志。
注:仅当在独占模式下装载(而不是打开)数据库时才能启用闪回数据库。
独占和共享启动 :独占启动的选项是exclusive,表示只允许一个例程使用该数据库;共享
启动的参数是shared,表示允许多个例程并行使用该数据库,即将数据库装入多个现场。
需要注意的是,flashback database 命令要求以独占模式安装数据库,这将会影响它在
任何RAC 集群中的分区。
步骤:
shutdown immediate;
startup mount exclusive;
alter database archivelog;
alter database flashback on;
alter database open;
144. Last night, a media failure caused the loss of a temporary file
that belongs to your database. Which two things may happen this morni
ng when you try to open your database? (Choose two.)
A. The database writer writes to a trace file, indicating that the te
mporary file is not found.
B. The database prompts for a database recovery.
C. The database opens normally.
D. The database gets mounted and throws an error indicating that the
temporary file requires recovery.
Answer: A,C
丢失临时文件后,数据库可以正常启动,并会在alert 指出无法找到temp
file,我们所要做的是重建一个就可以
145. You configured the flash recovery area in the database. Which tw
o files would you expect to find in the flash recovery area? (Choose
two.)
A. backup pieces
B. copies of all the parameter files
C. trace file generated using BACKUP CONTROLFILE TO TRACE
D. control file autobackups
Answer: A,D
db_recovery_file_dest 参数启用redo、control、rman backups、archived
logs、flashback logs 文件的omf 管理
题目的意思是期望在闪回区里还能找到那些文件
146. The database is running in ARCHIVELOG mode and the FORMAT option
is not configured in RMAN for disk backups. You configured the flash
recovery area location and size by using the DB_RECOVERY_FILE_DEST a
nd DB_RECOVERY_FILE_DEST_SIZE initialization parameters. Which statem
ent is correct in this scenario?
A. If the FORMAT option to the RMAN BACKUP command is specified, then
RMAN creates backup pieces and image copies in the flash recovery ar
ea with names in the Oracle Managed Files (OMF) format.
B. If any local destinations for LOG_ARCHIVE_DEST_n are set, then arc
hived redo logs are stored in these destinations as well as in the fl
ash recovery area.
C. If the flash recovery area location is configured using the DB_REC
OVERY_FILE_DEST initialization parameter, then the RMAN backup of Ora
cle managed datafiles (OMF) only will go to the flash recovery area b
y default.
D. If no other destination is configured for recovery files, then RMA
N places the control file autobackups in the flash recovery area by d
efault.
Answer: D
db_recovery_file_dest 如果指定目录,就启用闪回功能,存放归档日志 备份等
缺省的归档存放位置 db_recovery_file_dest_size 大小
show parameter log_archive;
select group#,status,archived,sequence# from v$log;
alter system switch logfile; 切换的时候就归档了
如果归档不在闪回区可以通过log_archive_format 控制归档格式的
修改闪回目录,原来的都有效,闪回区里面内容可以备份,只能备份到磁带
当你设置了DB_RECOVERY_FILE_DEST 后,如果没有指明其它的恢复目录,你的备份文件
都会放到该参数指定的地方,好像如果你没有设置LOG_ARCHIVE_DEST_n 的目录,同样也会
把归档日志放在该目录下.
db_recovery_file_dest 参数启用redo、control、rman backups、archived logs、flashback
logs 文件的omf 管理
db_create_online_log_dest_n 参数启用redo、control 的omf 管理
位置优先级:control_files 初始化参数
> db_create_online_log_dest_n >db_recovery_file_dest >= db_create_file_dest
先看Oracle 官方解释
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 为空则不支持,有值则支持。
如何设置DB 支持?
修改初始化参数文件
more initOCM.ora
*.user_dump_dest='/disk/oracle/admin/OCM/udump'
db_create_file_dest = '/disk/oracle/oradata'
使用 ALTER SYSTEM 命令动态设置
SQL> alter system set db_create_file_dest='/disk/oracle/oradata ;
OMF 有哪些作用呢?
1: 创建Tablespace 是不需要写数据文件名称和大小 (default 100M,自动增长,
Autoextend 为unlimited)
2: 向Tablespace 添加文件是只适用add datafile 就可以了,参数如1.
3: 可动态修改数据库创建文件的位置。
4: 删除Tablespace 时,后面对应的Datafile 在OS 一并删除。
Oracle OMF 使用如下的命名转换惯例。默认的文件大小为100M,并按如下格式命名:
%u is a unique 8 digit code
%g is the log file group number
%t is the tablespace name
Controlfiles ora_%u.ctl
Redo Log Files ora_%g_%u.log
Datafiles ora_%t_%u.dbf
Temporary Datafilesora_%t_%u.tmp
log_archive_dest 与log_archive_dest_n
1.log_archive_dest.
使用log_archive_dest 参数最多可设置2 个归档路径,通过log_archive_dest 设置一个主
归档路径,通过LOG_ARCHIVE_DUPLEX_DEST 参数设置一个从归档路径。所有的路径必须是
本地的,该参数的设置格式如下:
LOG_ARCHIVE_DEST = '/disk1/archive'
LOG_ARCHIVE_DUPLEX_DEST = '/disk2/archive'
2.LOG_ARCHIVE_DEST_n
LOG_ARCHIVE_DEST_n 参数可以设置最多10 个不同的归档路径,通过设置关键词location
或service,该参数指向的路径可以是本地或远程的。
LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'
LOG_ARCHIVE_DEST_2 = 'LOCATION = /disk2/archive'
LOG_ARCHIVE_DEST_3 = 'LOCATION = /disk3/archive'
如果要归档到远程的standby 数据库,可以设置service:
LOG_ARCHIVE_DEST_4 = 'SERVICE = standby1'
可见,这两个参数都可以设置归档路径,不同的是后者可以设置远程归档到standby 端,而
前者只能归档到本地,且最多同时归档到2 个路径下。
1. log_archive_dest 与log_archive_duplex_dest 同时设置是为了指定两个归档目录,这
种属性将来会被oracle 淘汰,建议不要使用。
2. log_archive_dest_1~10 意思是同时最多可以指定10 个归档目录,其中还可以包括一
个远程目录,但是如果你用这个方案指定的话需要至少指定一个本地目录。如果不指定,
oracle10g 默认的归档目录在
\oracle\product\10.2.0\flash_recovery_area\$ORACLE_SID\ARCHIVELOG。
以上两种方案不能同时使用。
147. You have created a resource plan, PROD_DB_PLAN, that uses the RA
TIO policy. The following consumer groups and their respective plan d
irectives have been assigned to this resource plan:
Consumer group HIGH_CG with CPU_P1 as 10.
Consumer group MEDIUM_CG with CPU_P1 as 5.
Consumer group LOW_CG with CPU_P1 as 2.
Consumer group OTHER_GROUPS with CPU_P1 as 1.
Which statement is correct in this scenario?
A. The CPU allocation would be equal between the HIGH_CG and MEDIUM_C
G consumer groups if there are no sessions existing for the LOW_CG an
d OTHER_GROUPS consumer groups.
B. The members of the HIGH_CG consumer group would get 10% of the CPU
C. The plan PROD_DB_PLAN can have subplans.
D. The CPU allocation for the consumer groups would be based on the r
atio defined for the CPU_P1.
Answer: D
今天查了手册,终于明白了, RATIO,指的是在某一level 上,按比例分配
cup 资源,例如有4 个消耗组,g1,g2,g3,OTHER_GROUPS,分配的比例是10:5:2:3,
那么g1 使用10/(10+5+2+3)=50%的cpu,同理,g2 使用5/20=25%的cup,另外,
如果运行的session 只有g1 和g2,那么分配的比例为:g1=10/(10+5),
g2=5/(10+5),因此给出的答案d 是不严谨的,而c 肯定是正确的. 质疑
参考:D17079GC20-Oracle Database 10g: New Features for
Administrators-Volume II-Student Guide 第126,127 页。
148. You want an ASM instance to manage the files of your database. T
o achieve this objective, you specify the following parameters in the
parameter file of the database:
INSTANCE_TYPE = RDBMS
DB_NAME = PROD
LARGE_POOL_SIZE = 8MB
DB_BLOCK_SIZE = 4K
LOG_ARCHIVE_DEST = +dgroupA
LOG_ARCHIVE_FORMAT = "$ORACLE_SID_%s_%t.%t"
DB_CREATE_FILE_DEST = +dgroupA
COMPATIBLE = 10.1.0.2.0
CONTROL_FILES = +dgroupA
Which parameter would be ignored while starting up the instance for t
he database PROD?
A. LARGE_POOL_SIZE
B. DB_CREATE_FILE_DEST
C. LOG_ARCHIVE_DEST
D. CONTROL_FILES
E. LOG_ARCHIVE_FORMAT
F. DB_BLOCK_SIZE
Answer: E
总结:归档位置是:log_archive_dest + log_archive_format。
如果 LOG_ARCHIVE_DEST 设置为不完整的 ASM 文件名(例如+dGroupA),则
将忽略LOG_ARCHIVE_FORMAT。
如果 LOG_ARCHIVE_DEST 设置为 ASM 目录(例如+dGroupA/myarchlogdir/),
则将使用 LOG_ARCHIVE_FORMAT,并且文件是非OMF 文件。Oracle 数据库会自
动为归档日志创建唯一的文件名。
149. You lost the index tablespace in your database. You decided to r
e-create the index tablespace and the indexes in the tablespace. What
methods can you use to re-create the indexes? (Choose all that apply
.)
A. SQL scripts
B. Recovery Manager (RMAN) script
C. Data Pump
D. SQL*Loader
E. Flashback database
Answer: A,C
datapump 导入索引,关键是用参数INCLUDE=TABLE, INDEX.
Eg:impdp tests/tests directory=dump_dir logfile=logfile.log
network_link=crm_test REMAP_TABLESPACE=CRMREPORT:USERS
SQLFILE=sqlfile.sql include=INDEX
150. From the V$SESSION_LONGOPS view, you find that some of the datab
ase users have long-running queries that consume a lot of CPU time. T
his causes performance problems for other users in the database, who
have much shorter queries. You would like to make sure that the users
with large queries do not use all the CPU time, but you still do not
want to terminate them with an error message. Which method would you
follow to achieve this?
A. set the CPU time per call in the users profile
B. set the CPU time per session in the users profiles
C. set the TIMED_STATISTICS parameter to TRUE in the parameter fi
le
D. set the CPU levels for the users' group using Resource Manager
Answer: D
151. You noticed that large memory allocations for the Oracle backup
and restore operations are causing a performance overhead on the shar
ed pool. Which memory structure would you configure to avoid this per
formance overhead?
A. recycle buffer cache
B. large pool
C. streams pool
D. keep buffer cache
E. redo log buffer
Answer: B
152. In your Automatic Storage Management (ASM) instance, one of the
nonempty disk groups, DGROUP1, is no longer required and you want thi
s disk group to be removed. You execute the following command to achi
eve this objective:
DROP DISKGROUP dgroup1 EXCLUDING CONTENTS;
What would be the result of this command?
A. This command would result in an error because the disk group is no
t empty.
B.The command would distribute the contents of the specified disk gro
up among all other disk groups and then drop the specified disk group
C. The command would result in the contents being moved to the parent
disk group and dropping of the disk group.
D. The command would result in the disk group being marked as INVALID
because it cannot be dropped.
E. The command would drop the disk group, ignoring the EXCLUDING CONT
ENTS option.
Answer: A
Dropping Disk Groups
DROP DISKGROUP 语句可以删除一个ASM 磁盘组,可选择的,也包括其中的文件。可以指
定INCLUDING CONTENTS 删除磁盘组中的文件。默认值是EXCLUDING CONTENTS,which
provides syntactic consistency 同时阻止删除含有文件的磁盘组。
ASM 实例必须已经启动,磁盘组已经安装,并且没有打开的文件,这样DROP DISKGROUP
才能成功。在删除掉磁盘组之前,语句不会返回。
当删除一个磁盘组时,ASM 卸载磁盘组,如果使用SPFILE,则会从ASM_DISKGROUPS 中移
走磁盘组的名字。如果使用的是PFILE,并且该磁盘组也列在ASM_DISKGROUPS 参数中,必
须记住在下次关闭并重启ASM 实例前,手工从这个参数中移除该磁盘组。
删除磁盘组dgroup1
DROP DISKGROUP dgroup1;
在确认磁盘组dgroup1 中已经没有打开的文件后,ASM 重写磁盘组中的每个磁盘的头部
区域,以删除ASM 格式信息。这个语句没有指定INCLUDING CONTENTS,因此如果磁盘组中
有文件,那么操作会失败。
153. View the Exhibit and examine the properties of the USERS tablesp
ace. You execute the following statement to shrink the TRANS table ex
isting on the USERS tablespace:
SQL> ALTER TABLE trans SHRINK SPACE CASCADE;
Which objects would be affected by this command? (Choose all that app
ly.) Exhibit:
A. the materialized views based on the TRANS table
B. the materialized views log of the TRANS table
C. the TRANS table
D. the B*Tree indexes on the TRANS table
E. the large object (LOB) segments of the TRANS table
Answer: C,D
使用shrink space 时,索引会自动维护。如果在业务繁忙时做压缩,可以先shrink space
compact,来压缩数据而不移动HWM,等到不繁忙的时候再shrink space 来移动HWM。
Move 会移动高水位,但不会释放申请的空间,是在高水位以下(below HWM)的操作。而
shrink space 同样会移动高水位,但也会释放申请的空间,是在高水位上下(below and
above HWM)都有的操作。
shrink 有两个前提条件:
1、表必须启用row movement(rowid 要发生变化)
2、表段所在表空间的段空间管理(segment space management)必须为auto
另关于ASSM 说明:
9i 以前,表的剩余空间的管理与分配都是由链接列表freelist 来完成的,因为freelist
存在串行的问题因此容易引起往往容易引起段头的争用与空间的浪费(其实这一点并不明
显),最主要的还是因为需要DBA 花费大量的精力去管理这些争用并监控表的空间利用
ASSM,它首次出现在Oracle 920 里。有了ASSM,链接列表freelist 被位图所取代,它
是一个二进制的数组,能够迅速有效地管理存储扩展和剩余区块(free block),因此能够
改善分段存储本质.
create tablespace demo datafile '/ora01/oem/demo01.dbf ' size 5m
EXTENT MANAGEMENT LOCAL --定是本地管理
SEGMENT SPACE MANAGEMENT AUTO -- ASSM 管理的标志;
带有ASSM 的本地管理tablespace 会略掉任何为PCTUSED、NEXT 和FREELISTS 所指定的值,
INITIAL 参数仍然是需要的,因为Oracle 不可能提前知道初始表格加载的大小。对于ASSM
而言,INITIAL 最小的值是三个块。
新的管理机制用位图来跟踪或管理每个分配到对象的块,每个块有多少剩余空间根据位
图的状态来确定,如>75%,50%-75%,25%-50%和<25%,也就是说位图其实采用了四个状态位来
代替以前的pctused,什么时候该利用该数据块则由设定的pctfree 来确定。
使用ASSM 的一个巨大优势是,位图freelist 肯定能够减轻缓冲区忙等待(buffer busy
wait)的负担,这个问题在Oracle9i 以前的版本里曾是一个严重的问题 。
有了ASSM 之后,Oracle 宣称显著地提高了DML 并发操作的性能,因为(同一个)位图
的不同部分可以被同时使用,这样就消除了寻找剩余空间的串行化。根据Oracle 的测试结
果,使用位图freelist 会消除所有分段头部(对资源)的争夺,还能获得超快的并发插入
操作.
Oracle9i 的位图分段管理还是有一些局限性的:
1. 一旦DBA 被分配之后,它就无法控制tablespace 内部的独立表格和索引的存储行为。
2. 大型对象不能够使用ASSM,而且必须为包含有LOB 数据类型的表格创建分离的
tablespace。
3.你不能够使用ASSM 创建临时的tablespace。这是由排序时临时分段的短暂特性所决定的。
4. 只有本地管理的tablespace 才能够使用位图分段管理。
5 使用超高容量的DML(例如INSERT、UPDATE 和DELETE 等)的时候可能会出现性能上的问

154. Your database operates in ARCHIVELOG mode and all the tablespace
s are online. Due to a user error, you decided to perform an incomple
te recovery. Which two tasks would you be required to perform in the
recovery process? (Choose two.)
A. open the database with the RESTRICTED option
B. open the database with the RESETLOGS option
C. recover to the required SCN only that data file in which the error
occurred
D. recover all the data files to the same system change number (SCN)
Answer: B,D
语句recover database using backup controlfile 是一个完全恢复,oracle
需要用到当前联机日志的!现在已经恢复到26 号了,27 号没有了,加上cancel
就行了,当成一个不完全恢复recover database using backup controlfile
until cancel;如果有当前日志实际上是一个完全恢复,现在可以alter
database open resetlog 了,即使是完全恢复,oracle 的scn 还是有损失了,只
要有损失,就必需resetlog 打开
alter database open resetlogs; 即截断多余的scn , 用resetscn 更好
a.截断scn
b.把当前日志归档
c.序列号从1 开始了 重建日志了
不完全恢复只能针对整个数据库,不能针对某个表空间或某个数据文件
155. Which two statements regarding compressed backups in Recovery Ma
nager (RMAN) are true? (Choose two.)
A. Backup compression is disabled by default.
B. Backup compression can be used with both backup sets and image cop
ies.
C. Backup compression cannot be enabled using the CONFIGURE command.
D. Backup compression works only if the COMPATIBILITY parameter is se
t to 9.0.0.0 or higher.
E. Backup compression applies to only backup sets.
F. Backup compression applies to only image copies.
Answer: A,E
rman 备份压缩只能针对备份集使用,同时默认也是disable(不可执行)的
(主要是看题目要仔细,判断是非一刹那,A 容易漏掉)
156. You lost the PRODSTD tablespace, which was read-only. The tables
pace was read-only when the last backup was taken. How would you reco
ver the tablespace?
A. restore the tablespace from the backup, and then perform an incomp
lete recovery
B. restore the tablespace from the backup, and then apply all the red
o information
C. restore all the data files in the database, and then perform an in
complete recovery
D. restore the tablespace from the backup
Answer: D
你的表空间在read-only 状况下丢失,你最后一次备份也在read-only,那么
直接copy 过去就行,因为scn 没有变化
注意跟18 题目对比
157. The loss of the control file forced you to re-create the control
file. After re-creating it and opening the database, you find that s
ome of the data files are named as MISSING nnnnn, where nnnnn is a fi
ve-digit number starting with 0. What could be the possible reason?
A. These are the data files that are corrupted.
B. There is no SYSAUX tablespace in your database
C. There is a read-only tablespace in your database.
D. These are the data files that cannot be recovered.
Answer: C
Read-only files should not be listed in the CREATE CONTROLFILE
statement so that recovery can skip these files.
No recovery is required for read-only datafiles unless you restored
backups of these files from a time when the datafiles were read/write.
After you create a new control file and attempt to mount and open the
database, the database performs a data dictionary check against the files
listed in the control file. For each file that is not listed in the CREATE
CONTROLFILE statement but is present in the data dictionary, an entry is
created for them in the control file. These files are named as MISSINGnnnnn,
where nnnnn is a five digit number starting with 0.After the database is
open, rename the read-only files to their correct filenames by executing
the ALTER DATABASE RENAME FILE statement for all the files whose name
is prefixed with MISSING.
All the restrictions related to read-only files in CREATE CONTROLFILE
statements also apply to offline normal tablespaces, except that you need
to bring the tablespace online after the database is open. You should leave
out tempfiles from the CREATE
CONTROLFILE statement and add them after database open.
只读文件是不记录在Create ControlFile 这个“救命”语句里面的,原因
是没有必要对这些文件进行恢复操作,但是,数据字典里面是有这些read-only
表空间的记录的,当用一个新的 control file 打开数据库的时候,Oracle 会
检查新 control file 中的文件列表和数据字典里面的文件列表对比,结果在新
control file 中找不到,于是就会将这些文件命名为 MISSINGnnnnn (n 是数字,
以0 为开头)。
158. Every Sunday, consistent backups are performed on your database.
Because of a user error, you performed an incomplete recovery on Tue
sday and opened the database with the RESETLOGS option. A user error
occurs again on Thursday, which necessitates an incomplete recovery.
Sunday's backup is the most recent backup available. What would you d
o in this scenario?
A. recovery cannot be performed because a backup was not performed af
ter the last incomplete recovery
B. restore all the files from Sunday's backup, and then recover up to
the point in time when the RESETLOGS operation was performed on Tues
day
C. restore all the files from Sunday's backup, and open the database
to reset the database to the point in time when the backup was perfor
med on Sunday
D. restore all the files from Sunday's backup, and then perform an in
complete recovery up to the point in time when the user error occurre
d on Thursday
Answer: D
10g RESETLOGS 打开后可以再次应用其之前的日志
10g 支持穿越resetlog 用当前数据库的控制文件(resetlog 后的控制文件)
加上resetlog 之前数据文件的备份,其实只要scn 连续就行
159. You executed the following FLASHBACK TABLE command:
FLASHBACK TABLE emp TO TIMESTAMP ('11:45','hh12:mi');
Which two statements are correct? (Choose two.)
A. The FLASHBACK TABLE statement will not be written to the alert
log file.
B. The EMP table that was dropped by mistake from the database wi
ll be restored.
C. The changes made to the EMP table since the specified time wil
l be undone.
D. The FLASHBACK TABLE statement will not maintain the existing i
ndexes on the EMP table.
E. The FLASHBACK TABLE statement will be executed within a single
transaction.
F. The list of transactions that have modified the EMP table sinc
e the specified time will be displayed.
Answer: C,E
a、Flashback table 肯定会被写到alert 中
b、使用scn 闪回,肯定是使用的undo 里面的数据,
c、如果一个表被删除后是否还是可以使用闪回表呢(不能)
flashback table test5 to before drop;
d、在一个transaction 中,闪回将被执行
e、闪回表后,同时会恢复在其上的索引
160. Which two statements are correct regarding the Flashback Version
s Query feature? (Choose two.)
A. You can use this feature to identify the committed versions of the
rows, but not the uncommitted versions.
B. You can use this feature to identify the versions of V$ views.
C. You can use this feature to identify the inserts, deletes, and upd
ates performed on a particular row but not the data definition langua
ge (DDL) operations performed on the table.
D. You can use this feature for a table only if row movement is enabl
ed for the table.
E. You can use this feature to identify the versions of external and
fixed tables.
Answer: A,C
在哪种情况下可以使用flashback versions query
a、只能是commited 以后的数据
b、只能是dml 语句,ddl 不行,ddl 以后,前面的dml 也查询不到
c、没必要非要启用row movement,只有flashback table to scn 才需要
161. The database has the data block size set to 8 KB. You need to im
port a tablespace with a 4 KB block size into the database. Which add
itional memory parameter(s) should be configured to perform a transpo
rtable tablespace import?
A. DB_4K_CACHE_SIZE only
B. DB_8K_CACHE_SIZE only
C. DB_BLOCK_SIZE and DB_4K_CACHE_SIZE
D. DB_BLOCK_SIZE and DB_8K_CACHE_SIZE
E. SGA_TARGET and DB_4K_CACHE_SIZE
F. DB_CACHE_SIZE only
Answer: A
不同的block size 用于在不同block size 的数据库之间转移或传输数据;
为了提高性能可在不同存储位置用不同的block size。
如果使用了非标准块,如4KB,则必须指定相应的cache 大小,这里即
DB_4K_CACHE_SIZE。DB_nK_CACHE_SIZE 的值默认为0。但其中的标准块大小对应
的这个参数的值不要指定,由DB_CACHE_SIZE 指定
162. You have created a job class, CUST_JOB_1, with two jobs, CUST_JO
B_1_A and CUST_JOB_1_B. Which two statements are true? (Choose two.)
A. The member jobs would get dropped when the job class is dropped.
B. Both the jobs would be executed concurrently.
C. The member jobs would get disabled when the job class is dropped.
D. The attributes defined at the class level would be applied to both
the jobs.
E. Jobs in the job class must have been assigned the same priority.
Answer: C,D
Concurrently:同时 priority:优先
你创建了一个job class 里面有两个job,当你drop 了该job class,里面
的两个job 会自动被disable 掉,一些在job class 等级定义的attribute 会被
自动应用到这两个job 上(类似user 和user group)
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.
There are two levels at which jobs can be prioritized: at the class
level and at the job level.(B,E错)
• The first prioritization is at the class level, using resource plans.
Prioritization among jobs of different classes is done purely on a class
resource allocation basis.
• The second prioritization is within the class, using the job priority
attribute of the job.
Prioritization levels are relevant only when two jobs within the same
class are supposed to start at the same time. The job with the higher
priority starts first.
考虑能不能建立某种作业直接针对job,因为这些job都很相识,而不通过他的用户来产生,
于是作业类就产生了,现在可以把作业类跟资源消耗者组关联,跨过了用户,不管哪个用户登
录了
163. You are managing a database for which incremental backups can be
very time consuming. In order to perform optimized incremental backu
ps you enable the block change tracking feature. How would you instru
ct RMAN to use the block change tracking feature when performing incr
emental backups?
A. You need to mention it with every BACKUP command.
B. The block change tracking feature is used automatically by RMAN.
C. You need to configure it using the CONFIGURE command.
D. You need to set the necessary initialization parameters to direct
RMAN to use the feature.
Answer: B
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE
'/mydir/rman_change_track.f' REUSE;
打开了更改跟踪数据,这是oracle 会把数据更改自动写入规定的文件。
Rman 也会自动应用
CTWR :Oracle 引入了一个新的后台进程,CTWR,其全称为Change Tracking
Writer,用于记录变化的块并将变化写入相应的日志文件中。
另RVWR: 在启动Flashback Database 之后,它定期将已发生变化的块写入
闪回日志的日志文件中。这些日志不是由传统的Log Writer (LGWR) 过程写入,
而是由一种称作Recovery Writer (RVWR)的新过程写入
$ps –ef |grep rvwr|grep –v grep
164. You configured the large pool for Oracle backup and restore oper
ations. As a result, which component would require less memory?
A. streams pool
B. shared pool
C. log buffer
D. keep buffer cache
E. recycle buffer cache
Answer: B
由于从大型池为 Oracle 共享服务器分配会话内存,因此共享池中由于频繁
分配和取消分配大对象而产生的碎片也就很少。
将大对象从共享池中分离出来,可增加共享池内存的使用效率,这意味着,
它可以将更多内存用于处理新的请求,
以及在需要时用于保留现有数据。
大型池必须显式配置。大型池的内存不是来自共享池,而是直接来自 SGA,
这就增大了Oracle 服务器在实例启动时需要的共享内存量。
大型池
用于在内存中为以下各项存储数据:
–UGA
–备份和还原操作
–并行查询消息传送
165. You have only two redo log groups and these groups get overwritt
en several times in a day. Your database operates in NOARCHIVELOG mod
e and user-managed consistent backups are performed every Sunday nigh
t. On Thursday morning, you find that an important table has been dro
pped and purged. With reference to this scenario, up to what point in
time can the data be recovered?
A. until Thursday morning
B. until that point in time when the database is opened
C. until that point in time when the recovery is performed
D. until last Sunday's backup
E. until that point in time when the table is dropped and purged
F. until Wednesday evening
Answer: D
日志组有限,数据库处于非归档模式,数据库一旦出现问题,那么只能恢复
到最后一次完整备份。如果没有做备份,那你就惨了!
166. You are working on a database, where you have three redo log gro
ups. When the database is down for a backup, an operating system (OS)
user deletes all the redo log files in a group. What will happen whe
n you open your database?
A. The instance starts, the database is mounted, but efforts to open
the database fail, and an error about the missing redo log group is d
isplayed.
B. Before the instance starts, you receive an error about the missing
redo log files of a group.
C. The instance starts and the database opens with an error message w
ritten to the alert log file.
D. The instance starts and the database opens because two redo log gr
oups still exist.
E. The instance starts and the database opens, but every attempt to w
rite to redo log files fails with an error.
Answer: A
在关机状态下丢失redo log group 数据库是无法启动的,只能到mount 状
态,在control file 里有日志文件位置的信息
167. In your database, all the tablespaces are locally managed. You s
tarted Recovery Manager (RMAN) using recovery catalog. The following
commands are used in the process of recovering the database by using
the backup control file:
1.RESTORE CONTROLFILE;
2.RESTORE DATABASE;
3.ALTER DATABASE MOUNT;
4.SQL ALTER TABLESPACE temp ADD TEMPFILE
5.ALTER DATABASE OPEN RESETLOGS;
6.RECOVER DATABASE;
7.STARTUP NOMOUNT;
In what sequence would you use this process to perform the recovery?
A. 2, 7, 3, 5, 1, 6, 4
B. 2, 1, 7, 6, 3, 5, 4
C. 7, 1, 3, 2, 6, 5, 4
D. 7, 2, 3, 1, 4, 6, 5
Answer: C
恢复数据库后临时文件是最后添加的
168. You are working on an Oracle Database 10g database that operates
in the ARCHIVELOG mode. At 06:00 p.m., you discovered that a table i
n the SYSTEM tablespace that does not belong to the data dictionary w
as dropped at 03:00 p.m. What would you do to recover the table?
A. use the Flashback Transaction Query feature to identify the releva
nt SQL statement and use it to undrop the table
B.restore the entire database from the most recent backup and open it
C. recover the table by using the Flashback Table feature
D. perform point-in-time recovery to recover the table
Answer: D
对应C 选项,只能在非系统表空间下使用 Flashback Table(利用回收站)
sys 用户下的数据不支持闪回查询
truncate 不支持闪回查询
闪回查询,利用的是undo 空间
169. The EMPLOYEES table is stored in the USERS tablespace. You need
to check if the EMPLOYEES table is affected by the block corruption f
ound in the USERS tablespace. Which option would you use?
A. the RMAN LIST command
B. the DBNEWID utility
C. the RMAN REPORT command
D. the RMAN BLOCKRECOVER command
E. the RMAN CROSSCHECK command
F. the ANALYZE command
Answer: F
1:SQL> analyze table t1 validate structure;
analyze table t1 validate structure
ORA-01498: block check failure 在Analyze 产生的trace 文件中,可以知道坏块中包含3
条记录的数据(nrows = 3),
2:c:\dbv file='e:\..dbf' 如果数据文件大很慢
没有rman 的话,如果检查有坏块,只能copy 回备份恢复,即使这个文件有100g.
select * from v$database_block_corruption
3:rman>backup validate database; 检测数据库坏块,不是备份
错误记录到 v$database_block_corruption
rman>blockrecover datafile 5 block 275;可以做基于块的恢复
当手工删除了归档日志以后,Rman 备份会检测到日志缺失,从而无法进一步继续执行。
所以此时需要手工执行crosscheck 过程,之后Rman 备份可以恢复正常。
通过操作系统更改备份文件名字为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';
170. A media failure has occurred. This has resulted in all the membe
rs of the next log group being rendered inaccessible to the log write
r process (LGWR) at a log switch. How does this failure affect the op
erational database?
A. The database allows only queries; no other statements are allowed.
B. The database re-creates the missing redo log files automatically.
C.The database continues to function normally with the existing files
D. The database returns an error and the database instance shuts down
E. The user sessions that generate redo logs are terminated automatic
ally.
Answer: D
171. Very soon you will be performing maintenance operations. You wou
ld have several jobs to run as soon as the maintenance period starts.
Which method would you use to create jobs without specifying the tim
e period when the job should be run?
A. use DBMS_IJOB package
B. use Oracle Scheduler
C. use DBMS_JOB package
D. use Oracle Data Pump Export and Import
Answer: B
172. You enabled Automatic Shared Memory Management. The initializati
on 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 total of 14 GB memory will be allocated to the automatically tun
ed memory components.
B. 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.
C. The value for SGA_TARGET can be increased up to a maximum of 14 GB
D. A maximum of 3 GB can be allocated to shared pool.
E. Increasing the value for SGA_TARGET to 12 GB will automatically in
crease the memory allocated to autotuned parameters.
F. Increasing the value for SGA_TARGET will automatically increase th
e memory allocated for STREAMS_POOL_SIZE.
Answer: C,E
SGA_TARGET 表明sga 初始化的大小10G,SGA_MAX_SIZE 表明当SGA 的各个组件不够用
时,SGA 最多能扩展到14G,下面两个说明这两个组件会被分配就这么大,剩下的6G 空间将
被分配到其它组件。但是,如果如果SGA 不够用 扩展到14G SHARED_POOL_SIZE 和
STREAMS_POOL_SIZE 会增加吗?按照题意,是不能够增加的,怀疑
流池:由 Oracle Streams 使用
A. A maximum of 3 GB can be allocated to shared pool.
----共享池至少分配3G,而不是最多分配3G
B. The value for SGA_TARGET can be increased up to a maximum of 14 GB.
----SGA_TARGET 最大可以到SGA_MAX_SIZE 但不会超过
C. A total of 14 GB memory will be allocated to the automatically tuned memory
components.
----所有自动调整的组件可以分配的内存是在10G 到14G 之间,如果内存需要超过了10G,
那就出现OVER ALLOCATE,也就说明SGA_TARGET 设置的过小,需要适当加大SGA_TARGET 才

D. Increasing the value for SGA_TARGET will automatically increase the memory
allocated for STREAMS_POOL_SIZE.
-----增加SGA_TARGET 应该会自动调整相关组件的大小,可能会出现增大
STREAMS_POOL_SIZE,如果一开始STREAMS_POOL_SIZE 就已经满足了要求呢,就不会再增加
了吧
E. Increasing the value for SGA_TARGET to 12 GB will automatically increase the
memory allocated to autotuned parameters.
---加大SGA_TARGET 应该会自动加大相关组件的大小,如果组件原来的值不能完全满足需求
的话
F. Reducing the value for SGA_TARGET to 9 GB will automatically decrease the memory
allocated to shared pool from 3 GB to 2 GB.
---SHARED_POOL_SIZE 设置了这个值,就限制了最小分配给共享池的大小 ,不能低于这个
值。所以应该不会出现这个情况
173. You need to create a schedule that will run a job on the second
Friday of each month. What should the repeat interval of the schedule
be set to?
A. FREQ = MONTHLY; BYDAY = 2FRI;
B. FREQ = MONTHLY; BYDAY = FRI(2);
C. FREQ = MONTHLY; BYDAY = FRI2;
D. FREQ = MONTHLY; BYDAY = -2FRI;
Answer: A
关于interval 的scheduler calender 语法(或者是日历语法)的总结
这里的总结是来自后面的附录。
a) 关键格式
part1 FREQ=[SECONDLY| MINUTELY| HOURLY| DAYLY| WEEKLY| MONTHLY|
YEARLY]
part2 [INTERVAL=n] n 必须大于0 的整数。
part3 [EXCULUDE|INCLUDE] ,通常更一个已经创建好的
schedule
part4 [BYDAY| BYMONTHDAY| BYMONTH| BYDATE| BYHOUR| BYMINUTE
|BYSECOND]=?
part5 [BYSETPOS=n] ,n 可以是负数也可以是整数。
part6 PERIODS=N ;BYPERIOD=[N|1,2,3,N];
FREQ 是必须的,interval 是可选的,如果不输入,就是按照后面byXXX 的处理。
PART4 也是必须的。part5 部分也是可选的。
b)part4 中值的格式,以及各个特异点。
BYSECOND=[N|N1,N2,N3..,|-N] ,就是说可以是单独的值,也可以是用逗号隔开
的值列表。
例如可以是 bysecond=1 表示在第一秒。bysecond=-1 表示最后一秒.
bysecond=1,11,21,31,41,51 .表示在第1 秒,第11 秒...发生。
BYDAY= [N|N1,N2,N3..|XN|-XN] ,但是N 必须是MON,TUE,WED,TUE,FRI,SAT,SUN
X 必须是自然数,例如FREQ=MONTHLY,BYDAY=2FRI,表示第二个星期五。
FREQ=YEARLY,BYDAY=-1FRI ,表示每年的最后一个星期五.
BYMONTHDAY= [N|N1,N2,N3..| -N] ,N 必须是1~31 的自然数,前面两种格式同
上面。第三中表示的是倒数 第n 天, 例如bymonthday=-1 表示的是每个月的最
后一天,就这样就可以避开不规则的月份
BYMONTH= [N|N1,N2,N3..] N=JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,N
OV,DEC
BYHOUR ,BYMINUTE 同 BYSECOND,同样支持N 和-N,以及列表
BYDATE =[YYYYMMDD|YYYYMMDD[+|-|^]SPAN:N[D|W]],这是比较复杂的格式.YYYY
可以不要.SPAN 表示延伸,如果是+,则表示后面,-表示之前,^表示前后(包括了
+,-).D 是天,W 是周.但是都要包含自身.BYSETPOS =[N|-N] ,但只有和
FREQ=[MONTHLY|YEARLY]配对.PERIODS 和BYPERIOD ,已经做过测试,但是没有看
到实际的效果.
174. 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 errors out displaying the following message:
ERROR at line 1:
ORA-29371: pending area is not active
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.activate the Pending Area before creating the consumer group
B.create the Pending Area before creating the consumer group
C.increase the size of the database buffer cache to accommodate the P
ending Area
D.increase the size of the shared pool to accommodate the Pending Are
a
E.increase the size of the large pool to accommodate the Pending Area
Answer: B
1.创建一个挂起区域:
SQL> exec dbms_resource_manager.create_pending_area;
2.创建资源规划
SQL> exec dbms_resource_manager.create_plan(plan =>'test_plan',COMMENT=>'this is
testing plan') ;
3.创建用户组
SQL> exec dbms_resource_manager.create_consumer_group( consumer_group => 'demo',
comment => 'yes it is a demo' );
4.指定资源规划指令
SQL> exec dbms_resource_manager.create_plan_directive( plan =>
'test_plan',group_or_subplan => 'demo',comment => 'its a demo',MAX_EST_EXEC_TIME
=> 5 );
SQL> exec dbms_resource_manager.create_plan_directive( plan =>
'test_plan',group_or_subplan => 'OTHER_GROUPS', comment => 'its a demo' );
5.验证变化
SQL> exec dbms_resource_manager.validate_pending_area;
PL/SQL procedure successfully completed.
6.提交
SQL> exec dbms_resource_manager.submit_pending_area;
PL/SQL procedure successfully completed.
7.创建一个用户
SQL> drop user user1 cascade;
SQL> create user user1 identified by abc123;
SQL> grant connect, resource to user1;
8.授予切换权限,其实就一并将资源规则分配给这个用户
SQL> exec dbms_resource_manager_privs.grant_switch_consumer_group ( 'user1',
'demo', TRUE );
SQL> exec dbms_resource_manager.set_initial_consumer_group ( 'user1', 'demo' );
PL/SQL procedure successfully completed.
9.启动数据库资源管理器
SQL> alter system set resource_manager_plan = test_plan scope = memory;
System altered.
10.用户登录检验设置
SQL> conn user1/abc123;
SQL> create table t as select * from all_objects;
SQL> analyze table t compute statistics;
SQL> select count(*) from t;
COUNT(*)
----------
40138
SQL> select count(*) from t,t;
select count(*) from t,t
ERROR at line 1:
ORA-07455: estimated execution time (59781 secs), exceeds limit (5 secs)
可以看到,已经被限制了.
175. You have a read-only tablespace on read-only media. You want to
perform a media recovery on the existing data files, but using a back
up control file. The backup control file indicates that the status of
the read-only tablespace was read/write when the control file was bac
ked up. What should you consider?
A.take data files from the read-only tablespace offline before perfor
ming a recovery
B.recovery using backup control file is not possible, so restore all
the files from the last full database backup, and then open the datab
ase
C.drop the read-only tablespace and re-create the tablespace after re
covery
D.perform a recovery; status of the tablespace in control file will b
e changed automatically
Answer: A
只读表空间位于只读媒体上,你想要执行数据库恢复,使用原来备份的控制
文件,这个控制文件记录的只读表空间还是可读写的,你需要在nomount 状态下,
恢复控制文件,接着在mount 状态下将只读表空间offline 然后再恢复数据库
(需试验)
176. Your production database is running in the ARCHIVELOG mode and t
he ARCn process is functional. You have two online redo log groups. W
hich three background processes would be involved when a log switch h
appens? (Choose three.)
A. log writer
B. archival
C. process monitor
D. system monitor
E. change tracking writer
F. database writer
Answer: A,B,F
Block change tracking 进程记录自从上一次备份以来数据块的变化,并把
这些信息记录在跟踪文件中。RMAN 使用这个文件判断增量备份中需要备份的变
更数据。这极大的促进了备份性能,RMAN 可以不再扫描整个文件以查找变更数
据。为此Oracle 引入了一个新的后台进程,CTWR,其全称为Change Tracking
Writer,用于记录变化的块并将变化写入相应的日志文件中。
177. On Monday, you dropped the DEPT table from your schema and then
you re-created the DEPT table in your schema. On Wednesday, you have
a requirement to restore the DEPT table from the recycle bin. Which s
tatement is correct?
A. You cannot restore the DEPT table by using the Oracle Flashback Dr
op feature because a table with the name DEPT already exists in your
schema.
B. You can restore the DEPT table by using the Oracle Flashback Drop
feature, provided you use the RENAME TO clause.
C. You cannot restore the DEPT table by using the Oracle Flashback Dr
op feature because the contents of the recycle bin are purged every 1
2 hours by default.
D. You can restore the DEPT table by using the Oracle Flashback Drop
feature and a system-generated name will be assigned to the restored
table.
Answer: B
Flashback table 语句同时提供了一个rename to 的子句,如果要恢复的表
在当前的schema 中已经,存在同名的表,建议你在恢复时通过rename to 子句为
待恢复的表指定一个新的表名,不然数据库会报ORA-38312
Flashback table DEPT2 to before drop rename to dept
178. You have an Automatic Storage Management (ASM) instance managing
the database files of your production database. The database contains
ASM files and non-ASM files. Using Recovery Manager (RMAN), you migr
ate the complete production database to use the ASM instance. Which s
tatement is true?
A. RMAN would relocate all the data files to an ASM disk group and ot
her files to an operating system location, defined using Oracle Manag
ed Files (OMF).
B. RMAN would relocate the ASM files to an ASM disk group and the non
-ASM files to an operating system location, defined using OMF.
C. RMAN would relocate all the database files to an ASM disk group.
D. RMAN would change the file definitions in the control file to use
the ASM but would not relocate the database files physically.
Answer: C
将数据库移植到 ASM 存储区,由于 ASM 文件无法通过正常的操作系统界面访问,因此
RMAN 是复制 ASM 文件的唯一途径。虽然由于表空间的历史原因,表空间中的文件既可以是
ASM 文件,也可以是非 ASM 文件,但是 RMAN 命令会将非ASM 文件移到 ASM 磁盘组中。
通过以下过程,可以将整个数据库移到ASM 磁盘组中:(假定您使用的是服务器参数文件。)
1 使用V$CONTROLFILE 和V$LOGFILE,获取当前控制文件和联机重做日志的文件名。
2 像平常一样关闭数据库。按如下所述,修改数据库的服务器参数文件:
-将必要的 OMF 目标参数设置为所需的ASM 磁盘组。
-删除 CONTROL_FILES 参数。
3.编辑和运行RMAN 命令文件,这将备份数据库、将当前数据文件移到备份中并重命名联机
重做日志。使用BACKUP AS COPY 命令只能移动表空间或数据文件。
4.删除旧的数据库文件
179. The backup retention policy is configured as RECOVERY WINDOW 2.
You executed the following command in Recovery Manager (RMAN) against
your database:
RMAN> REPORT OBSOLETE;
What would you see in the output?
A. a list of all those files that have been deleted in the last two d
ays
B. a list of all those files that have been recovered within the last
two days
C. a list of all the expired backups and copies
D. a list of backups and copies that are outside the range covered by
the current retention policy
Answer: D
RECOVERY WINDOW 2 设置为2 天,同时使用命令report obsolete,会列出备
份集或者映像副本超出两天时间过期了的
180. You are working on Oracle Database 10g, which is in ARCHIVELOG m
ode. All the archived log files are intact. In which scenario would p
erforming a recovery require the opening of the database with the RES
ETLOGS option?
A. loss of one of the tablespaces
B. loss of a system data file
C. loss of one of the control files
D. loss of a tempfile
E. loss of the only member of an unarchived redo log group
F. loss of a member from each redo log group
Answer: E
丢了部分没有归档的redo log,可以使用基于取消的恢复,打开数据库的时
候必须要使用resetlogs,主要是数据文件头跟控制文件里记录scn 不一致.
select file#,checkpoint_change# from v$datafile;
select file#,checkpoint_change# from v$datafile_header;
181. View the Exhibit. You executed the following command to perform
a backup of the USERS tablespace:
RMAN> BACKUP TABLESPACE USERS;
Which three types of files are backed up? (Choose three.)
Exhibit:
A. all the data files belonging to the USERS tablespace
B. password file
C. online redo log files
D. the current control file
E. archived redo log files
F. the current server parameter file
G. data files belonging to the USERS tablespace and all the defau
lt tablespaces
Answer: A,D,F
Control File and Server Parameter File 自动备份
如果CONFIGURE CONTROLFILE AUTOBACKUP on, 则在以下情况下自动备份:
1) 执行backup or copy
2) 在run 中出现backup or copy
3) 当数据库结构改变。建议CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE
TYPE DISK 改变成非disk type
4) 备份datefile 1 的时候。
恢复:
RESTORE CONTROLFILE FROM AUTOBACKUP
182. In which two conditions are resumable statements suspended? (Cho
ose two.)
A. when a user exceeds the space quota
B. when a user session is terminated
C. when a table that is being accessed by the current transaction is
not found
D. when a user manually suspends the statement
E. when the maximum extents of a segment is reached
Answer: A,E
当出现空间不足等相关的错误时,Oracle 可以不是马上返回错误信息,并回
滚当前的操作,而是将操作挂起直到挂起时间超过RESUMABLE TIMEOUT,或者空
间不足的错误被解决
183. You are connected to Recovery Manager (RMAN) without a recovery
catalog. There is no copy of the control file available. You want to
restore the control file from an autobackup. To retrieve the autoback
up, you need the database ID (DBID). In which two sources would you f
ind the DBID? (Choose two.)
A. the alert log file
B. the server parameter file
C. the formatted name of a control file autobackup
D. an RMAN session log file
E. the trace file
Answer: C,D
怎样查看oracle 的 DBID
a、从rman 会话的日志文件中
b、从自动备份的control file 文件格式中
184. You executed the following command in Recovery Manager (RMAN) to
perform a backup of the DETTBS tablespace:
RMAN> BACKUP TABLESPACE DETTBS;
Under which conditions would this command execute successfully? (Choo
se all that apply.)
A. The database is in NOMOUNT state.
B. The database is in NOARCHIVELOG mode and the tablespace is online.
C. The database is in NOARCHIVELOG mode and the tablespace is offline
D. The database is in ARCHIVELOG mode and the tablespace is offline.
E. The database is in ARCHIVELOG mode and the tablespace is online.
Answer: C,D,E
在NOARCHIVELOG 下,只能备份read only 及offline 的表空间
RMAN> backup tablespace users;
启动 backup 于 17-3 月 -11
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 启动全部数据文件备份集
通道 ORA_DISK_1: 正在指定备份集中的数据文件
RMAN-03009: backup 命令 (ORA_DISK_1 通道上, 在 03/17/2011 14:05:13 上)
失败
ORA-19602: 无法按 NOARCHIVELOG 模式备份或复制活动文件
185.Identify four uses of the Oracle Scheduler.(Choose four.)
A.enables Oracle database to schedule which processes execute on whic
h processors in a multiple CPU environment
B.enables Oracle database to do patches according to a DBA-defined sc
hedule
C.enables you to schedule the execution of jobs based on time
D.enables you to execute jobs in a clustered environment
E.enables you to periodically execute operating systemscript files lo
cated on the same server as the database
F.enables you to create a job that makes use of saved programs and sc
hedules
G.enables you to automate the management of the jobs that are created
using the DBMS_JOB package
Answer: C,D,E,F
http://blog.csdn.net/gyanp/archive/2010/11/01/5980021.aspx
10g 版本中SCHEDULER 将JOB 分成了多个部分,program 负责做什么,
schedule 负责啥时候做,job 就简单了,一个字:做
对应D 不太理解,质疑
对于G 不对的解释: 这个JOB(通过DBMS_SCHEDULER 包来创建Jobs) 与普通
JOB (用dbms_job 创建)不同哟,此时查询USER_JOBS 视图是查不到刚刚创建的
JOB 的信息,因为这个JOB 是SCHEDULER 管理的JOB。要查询SCHEDULER 管理
的JOS,应该通过USER_SCHEDULER_JOBS(当然ALL_SCHEDULER_JOBS 和
DBA_SCHEDULER_JOBS 也可以)
186. You want to configure the Flashback Database feature and retain
flashback logs for three days.
The steps used in this process are:
A.Set the retention target:
SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320.
B.Enable Flashback Database:
SQL> ALTER DATABASE FLASHBACK ON.
C.Mount the database:
SQL> STARTUP MOUNT EXCLUSIVE.
D.Shut down the instance:
SQL> SHUTDOWN IMMEDIATE.
E. Open the database:
SQL> ALTER DATABASE OPEN.
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
ALTER DATABASE FLASHBACK ON;
必须先配置数据库以进行归档,且必须在 MOUNT EXCLUSIVE 模式下启动数据库后,才
能发出此命令来启用闪回数据库。 所以C 选项必须在B 选项前面,可以排除法
187: In your production database, you have observed that the database
server performance degrades ,whenever there is a switch between the log
groups. On further investigation, you find that the database is
running in ARCHIVELOG mode and the archived log files are being written
to the same disk that is used to store the redo log members.
Which two actions would you take to improve the performance of the database
server? (Choose two.)
A.increase the size of the redo log buffer
B.increase the number of redo log groups
C.increase the number of log writer processes
D.increase the number of ARCn processes
E.change the appropriate LOG_ARCHIVE_DEST_n parameter to place the
archived log files in a separate location
Answer: BE
188: In your datawarehousing application, you generate reports frequently.
The data is static in the tables being used to generate reports. You are
currently using joins, resulting in a large performance overhead.
What kind of database structure would you use to reduce the response time
of the query?
A.hash clusters
B.index clusters
C.partitioned tables
D.indexorganized table (IOT)
Answer: B
Oracle 中普通的表称为堆表(heap table),堆表中的数据是无序存放的,
往往在使用一段时间后,数据就变得非常无序。索引中相同的key 对应的数据存
放在不同的block 中,这时,如果要通过索引查询某个key 的数据,就需要访问
很多不同的block,代价非常高。
hash cluster 简单的说就是通过预先分配空间的方式,将相同key 的数据存
放在一起,以提高查询性能的一种手段,所以准确的设置hashkeys 和size 参数
是使用hash cluster 的关键,使用的前提是key 的数量是可以估算的,而且每
个key 的数据是基本平均的。但是,在实际使用的环境中,数据量的变化往往是
不可预知的,这也造成hash cluster 的应用场景非常有限。
Index cluster 和hash cluster 类似,只不过index cluster 是通过索引实
现数据定位,而且index cluster 的空间是动态分配的,但是同样存在正确设置
size 参数的问题,设置过大过小都会产生性能问题。
cluster
性能優點
--DISK I/O 減少﹐表連接的提高存儲時間。
--所有相同行的每個cluster key 只存儲一次。
性能方面的考慮
--全表掃描時﹐cluster table 比無cluster 的表慢。
cluster 類型
--index cluster
--hash cluster
什么時候用何種cluster 比較
criterion index clusters hash clusters
uniform key
distribution
X X
evenly distributed key
values
V X
rarely updated key X X
often joined
master-detail tables
X V
predictable number of
key values
V X
queries using equality
predicate on key
V X
189: You have many users complaining about slow inserts into a large table.
While investigating the reason,you find that the number of indexes on the
table is high. You want to find out which indexes are not being used.
Which method would you follow to achieve this?
A.enable index monitoring and query the DBA_OBJECTS view
B.enable index monitoring and query the DBA_INDEXES view
C.enable index monitoring and query the V$OBJECT_USAGE view
D.enable index monitoring and view the DBA_INDEXTYPE_COMMENTS view
Answer: C
1: $object_usage可以用来监控系统中索引的使用情况
2: 监控索引的使用:SQL> alter index index_test_pk monitoring usage;
3: SQL> select * from v$object_usage;
4: $object_usage只包括当前用户的索引使用记录,如果需要查出所有用户的索
引使用记录,使用下面的sql,这个sql来自DBA日记:
SQL> select u.name owner, io.name index_name, t.name table_name,
decode(bitand(i.flags, 65536), 0, 'NO', 'YES') monitoring,
decode(bitand(ou.flags, 1), 0, 'NO', 'YES') used,ou.start_monitoring
start_monitoring,ou.end_monitoring end_monitoring
from sys.user$ u, sys.obj$ io, sys.obj$ t, sys.ind$ i, sys.object_usage
ou where i.obj# = ou.obj# and io.obj# = ou.obj# and t.obj# = i.bo#
and u.user# = io.owner#;
5: 取消对索引的监控
SQL> alter index index_test_pk nomonitoring usage;
190: You are using an Automatic Storage Management (ASM) instance to
manage the files of your
production database. While studying the parameter file of the ASM instance,
you find the following entry:
ASM_DISKSTRING = /devices/*
What could be the reason for this setting?
A.to enable the ASM instance to identify the alert log file
B.to enable the ASM instance to identify the server parameter file
C.to enable the ASM instance to define the locations for Oracle Managed
Files (OMF)
D.to enable the ASM instance to identify all disks that can be accessed
by it in the /devices directory
Answer: D
191: You are using an Automatic Storage Management (ASM) instance to
manage the database files of your production database. After adding a new
disk group to the ASM instance, you execute the following
command: ALTER DISKGROUP dg3 REBALANCE POWER 0;
What would be the result of this command?
A.The rebalancing of the disk group would be stopped.
B.The rebalancing of the disk group would be completed as fast as possible.
C.The command would result in an error because the value of POWER cannot
be 0.
D.The rebalancing of the disk group would be completed without affecting
the disk group DG3.
E.The command would result in an error because the disk groups cannot be
manually rebalanced.
Answer: A
Oracle通过一个新增的参数:asm_power_limit 来控制速度。
该参数取值范围为1~11,参数值越大平衡速度越快。
如果为0会停止?需试验
192: You want to migrate your existing non-ASM files to ASM files for the
database PROD. Which method or command would you use to accomplish this
task? (Choose all that apply.)
A.the CONVERT command of RMAN
B.Data Pump Export and Import into the same database
C.conventional export and import into the same database
D.the BACKUP DATABASE and RESTORE DATABASE commands of RMAN
E.the BACKUP AS COPY DATABASE and SWITCH DATABASE TO COPY command of RMAN
Answer: AE
1. First need to set below parameter for controlfile,datafile or FRA.
NOTE: I have two disk group here I am using "DGRP2" disk group.
SQL> alter system set control_files='+DGRP2' scope=spfile;
SQL> alter system set db_create_file_dest='+DGRP2' scope=spfile;
SQL> alter system set db_recovery_file_dest='+DGRP2' scope=spfile;
Step: 2 Restart DB server to take above parameter value.
SQL> shutdown immediate;
SQL> startup nomount
Step:3 Connect with RMAN session & restore controlfile on ASM system.
C:\>RMAN target=sys
RMAN> restore controlfile from 'C:\app\m.taj\oradata\test\CONTROL01.ctl';
RMAN> alter database mount;
RMAN> backup as copy database format '+DGRP2';
RMAN> switch database to copy;
Step:5 Again connect to sqlplus session and perform incomplete recovery
C:\>sqlplus sys/oracle as sysdba
SQL> recover database using backup controlfile until cancel;
Step:6 OPEN database with RESETLOGS option.
SQL> alter database open resetlogs;
Step:7 Drop old tempfile and create new tempfile in existing temp tablespace
SQL> alter database tempfile 'c:\app\m.taj\oradata\test\temp01.dbf' 2 drop including
datafiles;
SQL> alter tablespace temp add tempfile size 512m 2 autoextend on next 250m maxsize unlimited;
SQL> select tablespace_name, file_name, bytes from dba_temp_files;
Step:8 Recreate All redolog group on ASM diskgroup
SQL> select a.group#, a.member, b.bytes
from v$logfile a, v$log b where a.group# = b.group#;
SQL> select group#,status from v$log;
SQL> alter system switch logfile;
SQL> alter system switch logfile;
SQL> select group#,status from v$log;
SQL> alter database drop logfile group 1;
alter database drop logfile group 1*ERROR at line 1:ORA-01624: log 1 needed for crash recovery
of instance test (thread 1)ORA-00312: online log 1 thread 1:
'C:\APP\M.TAJ\ORADATA\TEST\REDO01.LOG'
When you get above error message then set checkpoint with below command.
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 1;
SQL> alter database add logfile group 1 size 10m;
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 2;
SQL> alter database add logfile group 2 size 10m;
SQL> alter system checkpoint global;
SQL> alter database drop logfile group 3;
SQL> alter database add logfile group 3 size 10m;
SQL> column member format a30
SQL> select a.group#, a.member, b.bytes
from v$logfile a, v$log b where a.group# = b.group#;
Step:9 Recreate SPFILE on ASM diskgroup
SQL> create pfile='c:\initTEST.ora' from spfile;
SQL> create spfile='+DGRP2/spfileTEST.ora' from pfile='c:\initTEST.ora';
7. Detele all backup copy from RMAN
RMAN> delete noprompt force copy;
193: In your running instance, some of the initialization parameters are
set as shown below:
SGA_MAX_SIZE = 14GB
DB_CACHE_SIZE = 1GB
SHARED_POOL_SIZE = 3GB
STATISTICS_LEVEL = BASIC
PGA_AGGREGATE_TARGET = 0
You plan to enable Automatic Shared Memory Management but you are not able
to set SGA_TARGET to a nonzero value. What could be the reason?
A.The STATISTICS_LEVEL initialization parameter is set to BASIC.
B.The PGA_AGGREGATE_TARGET initialization parameter is set to zero.
C.The SGA_MAX_SIZE initialization parameter is set to less than 20 GB.
D.The DB_CACHE_SIZE initialization parameter is set to less than 5 GB.
E.The SHARED_POOL_SIZE initialization parameter is set to a nonzero
value.
Answer: A
By default, SGA_TARGET is set to 0, which means that Automatic Shared
Memory Management is disabled and you must manually configure the database
memory.如果不为0,则自动管理内存
条件:Automatic Shared Memory Management requires that STATISTICS_LEVEL
be set to TYPICAL or ALL.
194: 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_CACHE_SIZE = 896MB
STREAM_POOL_SIZE = 0
LARGE_POOL_SIZE = 110MB
Which two statements are correct? (Choose two.)
A.You cannot set a value for the DB_8K_CACHE_SIZE parameter.
B.The memory used by Streams will be allocated from the shared pool.
C.If you increase the size of large pool to 120 MB, then the memory
allocated to shared pool will be reduced to 110 MB.
D.If an application attempts to allocate more than 120 MB from the shared
pool, and free space is available in the
Answer: AB
195: Your database is using shared server configuration. Which optional
memory structure would you configure to store the User Global Area (UGA)
information and improve the shared pool performance?
A.large pool
B.streams pool
C.keep buffer cache
D.recycle buffer cache
Answer: A
196: From the V$SESSION_LONGOPS view, you find that some of the database
users have longrunning queries and are consuming a lot of CPU time. This
causes problems for you when you try to log on as the system user and
perform small maintenance tasks. You would like to ensure that users SYS
and SYSTEM get priority over all other users. Which method would you use
to achieve this objective?
A.create a plan directive in the SYS_GROUP
B.create the pending area for the consumer group
C.activate the provided SYSTEM_PLAN in Resource Manager
D.set the TIMED_STATISTICS parameter to TRUE in the parameter file
E.set the execution time limit for all users, except SYS and SYSTEM, in
their profiles
Answer: C
197: You are using Resource Manager to manage system resources. While
creating a new database user, you observe that the user is a member of
DEFAULT_CONSUMER_GROUP by default. What would be the implications of
this?
A.The Resource Manager plan does not affect the user.
B.There must be a plan directive in any of the plans of the group to control
the resources.
C.The members of the group DEFAULT_CONSUMER_GROUP always have resource
restrictions.
D.The members of DEFAULT_CONSUMER_GROUP are restrained from accessing the
system tables.
E.The members of this group can change their group without the database
administrator's intervention.
Answer: B
198: You have two listener processes, named L1 and L2. Both the listener
processes are currently
functional. While viewing the listener.ora file on your database server,
you find the following entry:
PASSWORDS_L1 = (1sanfrjp43)
What would be the impact of this setting?
A.The listener process named L1 will disconnect the unauthorized users.
B.The listener process named L1 will be prevented from being started by
unauthorized users.
C.The listener process named L1 will be prevented from being stopped by
unauthorized users.
D.The listener process named L1 will be prevented from being reloaded by
unauthorized users.
E.The listener process named L1 will be prevented from accepting
connections from unauthorized users.
Answer: C
lsnrctl>stop listener_r (9i可以直接停掉的)
10g做了设置,停不掉了需要在server端 listener.ora加一个参数,去掉操作系
统验证,让口令生效
但如果10g监听设置了密码就需要密码才能停了
199: 117. In Recovery Manager (RMAN), you set the retention policy to NONE
by executing the following
command:
CONFIGURE RETENTION POLICY TO NONE;
What would be the impact of this setting?
A.The retention policy is cleared.
B.RMAN does not consider any backup as obsolete.
C.The retention policy is set to its default setting of redundancy 1.
D.The retention policy is set to its default setting of recovery window
7.
Answer: B
200: You execute the following command to perform a backup by using
Recovery Manager (RMAN):
RMAN> run
{allocate channel c1 type sbt;
backup datafile 1;
}
The command errors out. A part of the error message is as follows:
RMAN-03009:failure of allocate command on c1 channel
ORA-19554:error allocating device, device type: SBT_TAPE, device name:
What could explain why the statement failed?
A.sbt is not a valid device type.
B.Media Management Library was not loaded.
C.The sbt device cannot be used for data file backups.
D.No path was defined in the ALLOCATE CHANNEL command.
E.The channel is currently being used by another RMAN session.
Answer: B
Oracle9i Media Management Layer (MML) API lets third-party vendors build a media
manager, software that works with RMAN and the vendor's hardware to allow backups
to sequential media devices such as tape drives. The media manager handles loading,
unloading and labeling of sequential media such as tapes. You must install media
manager software to use RMAN with sequential media devices.
When backing up or restoring, the RMAN client connects to the target instance
and directs the instance to send requests to its media manager. No direct
communication occurs between the RMAN client and media manager.
Performing Backup and Restore with a Media Manager
Before performing backup or restore to a media manager, you must allocate one
or more channels to handle the communication with the media manager. You can also
configure default channels for use with the media manager, which will be applied
for all backup and recovery tasks that use the media manager where you do not
explicitly allocate channels. For a conceptual overview of channels, see "About RMAN
Channels". Configuring or allocating channels for backups is discussed further in
"Configuring and Allocating Channels for Use in Backups".
For example, this sequence of commands would configure channels for the media
manager and back up the database to the media manager:
RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksvr1)';
RMAN> BACKUP DATABASE;
201: Using the LIST command in Recovery Manager (RMAN), which two pieces
of information from the RMAN repository can be listed? (Choose two.)
A.backups that can be deleted
B.stored scripts in the recovery catalog
C.backup sets and image copies that are obsolete
D.only the most recent backup sets or image copies
E.backups that do not have the AVAILABLE status in RMAN repository
Answer: BE
202: The backup retention policy is configured as RECOVERY WINDOW 2. You
executed the following
command in Recovery Manager (RMAN) against your database:
RMAN> REPORT OBSOLETE;
What would you see in the output?
A.a list of all the expired backups and copies
B.a list of all those files that have been deleted in the last two days
C.a list of all those files that have been recovered within the last two
days
D.a list of backups and copies that are outside the range covered by the
current retention policy
Answer: D
常常混淆RMAN中EXPIRED和OBSOLETE两个状态,其实如果理解了两者是如何产生
的,区别也就出来了。
对于EXPIRED状态的产生,与crosscheck命令是密切相关的,RMAN通过crosscheck命令
检查备份是否存在于备份介质上,如果不存在,则状态由AVAILABLE改为EXPIRED。
可以用delete (noprompt) expired backup of controlfile来删除catalog中expired的备份信息:
对于obsolete状态,是针对MAN备份保留策略来说的,超过了这个保留策略的备份,会
被标记为obsolete,但其状态依旧为AVAILABLE,我们可以使用report obsolete来查看已废弃
的备份。
要真正地删除废弃的备份,可以使用delete noprompt obsolete命令(noprompt是指无需确
认):RMAN> delete noprompt obsolete;
203: In the parameter file of the production database, the
BACKGROUND_DUMP_DEST parameter is set
to $ORACLE_HOME/users. Which two types of files would you find in this
location? (Choose two.)
A.the alert log file
B.the core dump files
C.the change tracking file
D.the user session trace files
E.the database audit trail files
F.the background process trace files
Answer: AF
204: In which case would you use the Flashback Database feature to perform
a recovery?
A.to recover a dropped tablespace
B.to recover data from a truncated table
C.to recover a data file that has been shrunk
D.to recover a database to the state that existed before the RESETLOGS
operation
Answer: B
205: You performed a backup of the flash recovery area by using the
following command for the first time:
RMAN> BACKUP RECOVERY AREA;
Which files in the flash recovery area are backed up? (Choose all that
apply.)
A.flashback logs
B.current control file
C.control file autobackups
D.incremental backup sets
Answer: CD

posted on 2015-02-27 15:05  回家的流浪者  阅读(1779)  评论(0编辑  收藏  举报