Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖
楼主: wangtong
查看: 17027| 回复: 187
139#
发表于 2016-11-9 19:07:00
138:
You executed the following command to create a tablespace called SALES_DATA:

SQL> CREATE TABLESPACE sales_data DATAFILE SIZE 100M SEGMENT SPACE MANAGEMENT AUTO;

Which two statements are true about the SALES_DATA tablespace? (Choose two)

A. The database automatically determines the extent-sizing policy for the tablespace.
B. The segments are automatically shrunk when the contents are removed from them.
C. The allocation of extents within the tablespace is managed through the dictionary tables.
D. The space utilization description of the data blocks in segments is recorded in bitmap blocks.
E. The space utilization description of the data blocks in segments is managed through free lists.

138:
你执行下面的命令去创建一个表空间名为SALES_DATA

SQL> CREATE TABLESPACE sales_data DATAFILE SIZE 100M SEGMENT SPACE MANAGEMENT AUTO;

哪两句关于SALES_DATA表空间的描述是正确的?(选择两个)

A.        数据库的自动管理决定表空间的extent-size策略
B.        段会自动缩小当内容被移除时
C.        表空间分配的区是通过字典表管理的
D.        段中数据块的空间使用率记录在位图块中
E.        段中数据块的空间使用率通过自由链管理

答案:AD
SEGMENT SPACE MANAGEMENT AUTO--说明启用了assm
A:正确,assm
B:错误,这个应该属于表压缩的功能
C:错误,这个说的是数据字典管理的表空间
D:正确,参考145题,这里启用了assm,因此使用的是位图
E:错误

回复 只看该作者 道具 举报

138#
发表于 2016-11-9 19:05:17
137:
Identify the memory component from which memory may be allocated for:
1,Session memory for the shared server
2,Buffers for I/O slaves
3,Oracle Database Recovery Manager (RMAN) backup and restore operations
A. Large Pool
B. Redo Log Buffer
C. Database Buffer Cache
D. Program Global Area (PGA)

137:
识别内存组件的内存可以分配给:
1,        共享服务器的会话内存
2,        I/O总线上的从设备缓冲
3,        RMAN备份和还原操作

A. Large Pool
B. Redo Log Buffer
C. Database Buffer Cache
D. Program Global Area (PGA)

答案:A
Large Pool:主要是提高效率,在大规模的I/O及备份和恢复操作时可能使用该区,可以通过设置large_pool_size来进行设置,是一个动态参数

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/memory.htm#CNCPT1233

回复 只看该作者 道具 举报

137#
发表于 2016-11-9 19:04:57
136:
You notice that the performance of the database has degraded because of frequent checkpoints. Which two actions resolve the issue? (Choose two.)
A. Disable automatic checkpoint tuning
B. Check the size of the redo log file size and increase the size if it is small
C. Set the FAST_START_MTTR_TARGET parameter as per the advice given by the MTTR Advisor
D. Decrease the number of redo log members if there are more than one redo log members available in each redo log group

136:
你注意到数据库性能下降因为频繁的检查点。哪两个动作解决这个问题?(选择两个)
A.        禁用自动检查点调优
B.        检查redo日志文件大小并增加redo日志大小如果它比较小的话
C.        配置FAST_START_MTTR_TARGET参数根据MTTR Advisor给出的建议
D.        减少redo日志成员的数量如果这里有超过一个redo日志成员在每个redo日志组中

答案:BC
如果重做日志文件的size太小,就会频繁切换日志,即会频繁发生检查点,故可以增大重做日志文件的size。
而FAST_START_MTTR_TARGET如果设置的太小,根据要控制数据库对单个实例执行崩溃恢复所花费的时间量,则必须频繁发生检查点,来确保内存中已修改的数据块能够定期写入到磁盘,故可以使用MTTR Advisor来设置推荐的值。

回复 只看该作者 道具 举报

136#
发表于 2016-11-9 19:04:40
135:
View the Exhibit and examine the initialization parameter settings.

Which three initialization parameters are to be set manually as they are not automatically tuned? (Choose three.)

A. LOG_BUFFER
B. SORT_AREA_SIZE
C. JAVA_POOL_SIZE
D. STREAMS_POOL_SIZE
E. DB_16K_CACHE_SIZE
F. DB_KEEP_CACHE_SIZE

135:
查看下图并检查初始化参数设置。哪三个初始化参数设置手动,因为他们不会自动调整?(选择三个)

A. LOG_BUFFER
B. SORT_AREA_SIZE
C. JAVA_POOL_SIZE
D. STREAMS_POOL_SIZE
E. DB_16K_CACHE_SIZE
F. DB_KEEP_CACHE_SIZE

答案:AEF
从下我们可以知道哪些组件是可以自动调整的
SQL> select * from v$sgainfo
  2  ;

NAME                                  BYTES RES
-------------------------------- ---------- ---
Fixed SGA Size                      2232960 No
Redo Buffers                       16326656 No
Buffer Cache Size                1509949440 Yes
Shared Pool Size                  436207616 Yes
Large Pool Size                    16777216 Yes
Java Pool Size                     16777216 Yes
Streams Pool Size                         0 Yes
Shared IO Pool Size                       0 Yes
Granule Size                       16777216 No
Maximum SGA Size                 3340451840 No
Startup overhead in Shared Pool   115126096 No
Free SGA Memory Available        1342177280

1.png (227.12 KB, 下载次数: 268)

1.png

回复 只看该作者 道具 举报

135#
发表于 2016-11-9 19:04:05
134:
You executed the following commands in an RMAN session for your database instance that has failures:

RMAN> LIST FAILURE;

After some time, you executed the following command in the same session:

RMAN> ADVISE FAILURE;

But there are new failures recorded in the Automatic Diagnostic Repository (ADR) after the execution of the last LIST FAILURE command.

Which statement is true for the above ADVISE FAILURE command in this scenario?

A. It produces a warning for new failures before advising for CRITICAL and HIGH failures.
B. It ignores new failures and considers the failures listed in the last LIST FAILURE command only.
C. It produces advice only for new failures and the failures listed in the last LIST FAILURE command are ignored.
D. It produces an error with recommendation to run the LIST FAILURE command before the ADVISE FAILURE command.

134:
你执行下面的命令在RMAN会话中因为你的数据库实例发生了错误:

RMAN> LIST FAILURE;

过了一会,你执行下面的命令在同一个会话:

RMAN> ADVISE FAILURE;

但是有新的故障记录在自动诊断知识库(ADR),在你执行LIST FAILURE命令之后

哪些语句是正确的关于ADVISE FAILURE命令在这个场景中?

A.        它会产生一个新故障的警告在建议CRITICAL和HIGH故障之前
B.        它忽略新的故障,仅认为故障全部列在之前的LIST FAILURE命令下面
C.        它只产生新故障的建议,之前的LIST FAILURE列出的故障被忽略
D.        它产生一个错误,建议运行LIST FAILURE命令在ADVISE FAILURE命令之前

答案:A
参考官方文档:
http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta003.htm#RCMRF166

回复 只看该作者 道具 举报

134#
发表于 2016-11-9 19:03:44
133:
View the Exhibit and examine the setting for a table.

Which statement is true about the PCTFREE setting for the table?
A. It sets the minimum percentage of a data block to be reserved to contain chained rows from other blocks.
B. It sets the minimum percentage of a data block to be reserved as free space before the server prevents inserts into the block.
C. It sets the minimum percentage of a data block to be reserved to contain the bitmap used to maintain the free block information.
D. It sets the minimum percentage of a block that can be used for row data plus overhead before new rows are added to the block.

133:
查看下表并检查表的设置。哪些语句是正确的关于表的PCTFREE设置?
A.        它设置数据块最小的百分比保留从其它数据块包含的行链接
B.        它设置数据块最小的百分比保留为自由空间阻止插入数据块
C.        它设置数据块最小的百分比保留bitmap用来维护空闲块的信息
D.        它设置数据块最小的百分比可以用于行数据加新数据添加到块的开销

答案:B
PCTFREE 指的是为一个块保留的空间百分比,也就是什么情况下可以insert,保留它的目的其实是为了给update保留空间,防止发生行迁移
A:错误,不是为了行链接
B:正确
C:错误,不是为了位图
D:错误
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/logical.htm#CNCPT1053

1.png (183.23 KB, 下载次数: 260)

1.png

回复 只看该作者 道具 举报

133#
发表于 2016-11-9 19:03:12
132:
Which tablespaces are mandatory in an Oracle database for it to be operational? (Choose all thatapply.)

A. Undo tablespace
B. USERS tablespace
C. SYSAUX tablespace
D. SYSTEM tablespace
E. Temporary tablespace

132:
哪些表空间是Oracle数据库强制进行操作的?

A. Undo tablespace
B. USERS tablespace
C. SYSAUX tablespace
D. SYSTEM tablespace
E. Temporary tablespace

答案:CD
• SYSTEM 和SYSAUX 表空间是在创建数据库时创建的 必需存在的表空间。这些表空间必须联机。
• SYSTEM 表空间用于核心功能(例如数据字典表)。
• 辅助的SYSAUX 表空间用于附加的数据库组件 (如Oracle Enterprise Manager Repository)。
• 不建议使用SYSTEM 和SYSAUX 表空间来存储应用 程序的数据。

回复 只看该作者 道具 举报

132#
发表于 2016-11-9 19:02:42
131:
You are managing an Oracle Database 11g database running in ARCHIVELOG mode. The Flash Recovery Area is specified as the destination for the archived redo log files. You notice this warning in the alert log file:
ORA19815: WARNING: db_recovery_file_dest_size of 3221225472 bytes is 100.00% used, and has 0 remaining bytes available.
What would you do to reclaim the used space in the Flash Recovery Area? (Choose two.)
A. Back up the Flash Recovery Area.
B. Decrease the retention time for the database backup and flashback log files.
C. Manually delete all the archived log files from the Flash Recovery Area by using operating system (OS) commands.
D. Manually delete all the expired backup sets from the Flash Recovery Area by using operating system (OS) commands.


131:
你正在管理一个Oracle Database 11g数据库处于ARCHIVELOG模式。Flash Recovery Area被指定为归档日志文件的目的地。你注意到下面的警告在alert日志中:
ORA19815: WARNING: db_recovery_file_dest_size of 3221225472 bytes is 100.00% used, and has 0 remaining bytes available.
你将如何回收Flash Recovery Area的空间?
A.        备份Flash Recovery Area
B.        减少数据库备份和闪回日志的保留时间
C.        从FRA手动删除所有的归档日志通过使用操作系统命令
D.        从FRA手动删除所有失效的备份集通过操作系统命令

答案:AB
fra中的文件时oracle自动管理的,手动删除文件后,oracle并不会识别,因此不会释放空间,所以CD是错误的,如果想手动删除,那么需要在操作系统上执行crosscheck或者将expired的备份删除。

回复 只看该作者 道具 举报

131#
发表于 2016-11-8 16:41:38
130:
Which statement describes the effect on an index, when the indexed column for the rows is updated in the base table?
A. An update in a leaf row takes place.
B. The index becomes invalid after the update.
C. The leaf block containing the row to be updated is marked as invalid.
D. A row in the leaf block of the index for the key value is logically deleted and a new leaf row is inserted.

130:
哪些语句描述索引的影响,当索引列被更新在基础表中?
A.        一个叶子行发生更新
B.        索引变得无效在更新后
C.        叶子块包含行被更新标记为无效
D.        叶子块中的一行的索引键值被逻辑删除且新的叶子行被插入

答案:D
更新列会导致对其上的索引逻辑删除和插入。PCTFREE设置对索引没有影响,但创建时除外。即使索引块的空间少于PCTFREE指定的空间,也可以向索引块添加新条目。

回复 只看该作者 道具 举报

130#
发表于 2016-11-8 16:41:13
129:
The user HR owns the EMP table. The user HR grants privileges to the user SCOTT by using this command:

Which statement is true after HR issues the REVOKE command?

A. The command fails because SCOTT still has privileges.
B. The command succeeds and privileges are revoked from JIM.
C. The command fails because HR cannot revoke the privileges from JIM.
D. The command succeeds and only HR has the privilege to perform the SELECT, INSERT, and UPDATE operations on the EMP table.

129:
用户HR拥有EMP表。用户HR授予权限给用户SCOTT通过这个命令:
哪些语句是正确的在HR执行REVOKE命令之后?

A.        命令执行失败,因为SCOTT仍然有权限
B.        命令执行成功,权限被收回从JIM
C.        命令执行失败,因为HR不能收回权限从JIM
D.        命令执行成功,只有HR用户有权限去执行SELECT,INSERT和UPDATE操作在EMP表上

答案:C
hr将DML操作emp表的权限给scott,并且scott有传递权限,scott将此权限传递给jim,此时hr想将jim的权限收回,出错,因为hr没有授予过权限给jim,此时jim可以DML操作EMP表,当hr将scott的权限收回时,jim不能再查询等操作。
系统权限取消时不级联,对象权限取消时是级联的。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9013.htm#SQLRF01603

1.png (153.61 KB, 下载次数: 262)

1.png

回复 只看该作者 道具 举报

129#
发表于 2016-11-8 16:40:38
128:
View the Exhibit and examine the command used to create the ZONEDATA table. The table contains a million rows for zonewise analysis in the DSS system. DML operations are performed very rarely on the table. You decide to prepare an index on the ZONE column to enhance the performance of the queries on the ZONE column.
Which type of index would you select in this scenario?

A. Bitmap index
B. Reverse key index
C. Normal BTree index
D. Functionbased index

128:
查看下表并检查用于创建ZONEDATA表的命令。表包含百万行用于分析在DSS系统中。DML操作执行的十分稀少在表中。你决定准备一个索引在ZONE列去增强查询ZONE列的性能。
哪种类型的索引你应该选择在这个场景?
A.        bitmap索引
B.        反向键值索引
C.        正常的BTree索引
D.        基于函数的索引

答案:A
zone的值只有四个 ,基数少,故用位图索引较好。
Bitmap index 的特点:
1. 对于大数据量的查询,bitmap index 能更有效的减少响应时间
2. 减少index的占用空间

1.png (91.38 KB, 下载次数: 276)

1.png

回复 只看该作者 道具 举报

128#
发表于 2016-11-8 16:40:11
127:
Identify the logical structure that will never have more than one data segment created for it.

A. external table
B. partitioned table
C. partitioned index
D. nonclustered table
E. global temporary table

127:
确定逻辑结构不会被创建超过一个数据段。

A.        外部表
B.        分区表
C.        分区索引
D.        非簇表
E.        全局临时表

答案:D
非簇表只能使用一个段,所以选择D

回复 只看该作者 道具 举报

127#
发表于 2016-11-8 16:39:51
126:
Note the functionalities of various background processes:

1: Perform recovery at instance startup.
2: Free the resources used by a user process when it fails.
3: Cleanup the database buffer cache when a process fails.
4: Dynamically register database services with listeners.
5: Monitor sessions for idle session timeout.
6: Cleanup unused temporary segments.
7: Record the checkpoint information in control file.

Which option has the correct functionalities listed for a background process?

A. Checkpoint (CKPT): 1, 2, 5
B. System Monitor (SMON): 1, 6
C. Process Monitor (PMON): 4, 6, 7
D. Database Writer (DBWR): 1, 3, 4

126:
注意各种后台进程的功能:

1.        执行恢复在实例启动的时候
2.        释放用户进程失败时的资源
3.        清空数据库buffer cache 当进程失败的时候
4.        动态注册数据库服务器监听
5.        监视空闲会话超时
6.        清楚不用的临时段
7.        记录检查点信息在控制文件

哪个选项是正确的列出后台进程的功能?
A. Checkpoint (CKPT): 1, 2, 5
B. System Monitor (SMON): 1, 6
C. Process Monitor (PMON): 4, 6, 7
D. Database Writer (DBWR): 1, 3, 4

答案:B
一、SMON:系统监督进程
1.主要是已经提交的数据但是还没有进行写入数据文件给断电了,重启的时候,smon就会进行恢复
    a.执行前滚,将已经写入重做日志文件但是还没有写入到数据文件中的数据(使用scn号码来识别提交记录的)
    b.打开数据库
    c.回滚没有提交的事务
2.还可以进行磁盘空间维护工作
    a.回收或者合并数据文件中相连的空闲区
    b.释放临时段
二、PMON:进程监督进程
1.当某个进程崩溃,PMON将负责进行如下的清理工作
    a.回滚用户当前事务
    b.释放用户所加的所有表一级和行一级的锁
    c.释放用户所有的其他资源等
三、CKPT:校验(检查)点和检验点进程
1.提高系统效率和数据库一致性,引入了校验点的事件,CKPT是在DBWR将高速缓冲中的数据写入到数据文件上的时候产生的,理论上说它是不需要的
  可以通过redo log和 scn 保证了完全恢复,引入它是为了提高效率,因为所有的校验点为止的变化都已经写入到数据文件中了,在恢复的时候
  校验点之前的重做日志就不在需要了,这样实例恢复就加快了,CKPT会将校验点写入到所有相关的数据文件的文件头中,还要将
  校验点号码、重做日志序列号、归档日志名称和最低、最高scn号都会写入控制文件中,由于ckpt会产生大量的IO操作,因此
  不能频繁的产生校验点,最好在20分钟以上
四、ARCn:归档日志进程
1.当一组重做日志文件写满后,会写另外一组,当最后一组写满后会在写第一组,叫做日志切换
  2.如果没有开归档,那么覆盖后就无法进行恢复了
  3.如果开了归档,那么就会使用arch进程进行写入归档日志文件中,oracle会确保在一组重做日志的归档操作完成之前不会重新使用该组日志
五、DBWn:数据库写进程
1.11g之前只可以有0~9,10个进程,11g之后可以有36个,0~9和a~z,通过 db_writer_processes 来设置个数的,如果启动的时候没有说明个数
    那么是由cpu的个数来决定的该参数的
2.当以下情况发生时,DBWR会将高速缓冲区中的数据写入到数据文件中
    a.当脏缓冲区的数量超过了所设定的限额
    b.所设定的时间间隔已到
    c.有进程需要高速缓冲区,但是没有空闲的高速缓冲区空间时候
    d.校验(检查点)发生时
    e.某个表被删除或者截断(truncate,drop)
    f.某个表空间被设置为只读
    g.表空间进行联机备份时
    h.表空间被设置为脱机时
六、LGWR:重做日志写进程
1.将重做日志缓冲区的记录顺序写入到重做日志文件中,这里注意它是顺序写入的,因此IO相对要小
2. commit 语句怎样工作,这里使用了快速提交技术
    a.服务器进程把提交的记录连同产生的scn号码一起写入重做日志缓冲区中
    b.LGWR将重做日志缓冲区中的记录写入在重做日志文件中,这样就可以保证恢复了
    c.oracle通知用户(进程)提交已经完成
    e.服务器进程将修改数据库高速缓冲区中相关数据的状态并释放资源和打开锁(这个时候可能这些数据并没有写入到数据文件中,他们标记为脏数据,之后由DBWR写入数据文件)
3.以下情况LGWR会写入重做日志文件
    a.事务提交
    b.重做日志缓冲区中的记录超过了缓冲区容量的1/3
    c.DBWR将数据库高速缓冲区中的数据块写入到数据文件之前
    d.每3秒

回复 只看该作者 道具 举报

126#
发表于 2016-11-8 16:37:17
125:
View the Exhibits and examine lock waits. Users HR and SH complain that their transactions on one of the application tables, EMP, are waiting for response.
Which action would you take to release the lock and enable users HR and SH to continue with their transactions?


A. Kill the session of the user SCOTT with session ID118.
B. Issue manual checkpoint using the ALTER SYSTEM command.
C. Modify the profile used by user SCOTT to reduce the CONNECT_TIME limit.
D. Flush the Shared Pool to remove the SQL statement causing "wait" in memory.

125:
查看表格并检查锁等待。用户HR和SH抱怨他们的事务在一个应用表EMP上,正等待回应。哪个行动能让你释放锁并继续HR和SR用户的事务?

A.        杀掉SCOTT用户的ID为118的会话
B.        执行手动检查点使用ALTER SYSTEM命令
C.        修改SCOTT使用的profile减少CONNECT_TIME限制
D.        刷新共享池移除内存中导致等待的SQL语句

答案:A
有冲突的锁定请求以分层布局的形式显示,其中持有锁的会话位于顶部,下面是排队请求锁的所有会话。由图上可知,SCOTT是持有锁的会话。HR和SH是排队请求锁的会话。
对于冲突中涉及的每个会话,会显示用户名、会话ID 和会话已等待的秒数。选择会话 ID 可查看会话当前正在执行或请求的实际SQL 语句。
自动数据库诊断监视器(ADDM) 还会自动检测锁冲突,并且会就低效的锁定趋势提出建议。

为了解决锁冲突,应该:
• 提交或回退持有锁的会话
• 终止持有锁的会话(在紧急情况下)

要解决锁冲突,持有锁的会话必须释放锁。让会话释放锁的最好方式是与用户联系,要求用户完成事务处理。
紧急情况下,管理员可以通过单击“Kill Session (终止会话)”按钮来终止持有锁的会话。
ALTER SYSTEM KILL SESSION '118,2597' IMMEDIATE
终止会话后,当前事务处理中的所有工作都会丢失(回退)。会话被终止的用户必须再次登录,然后重做被终止的会话自上次提交以来所做的所有工作。

1.png (309.87 KB, 下载次数: 262)

1.png

回复 只看该作者 道具 举报

125#
发表于 2016-11-8 16:36:27
124:
You created a profile APP_USER and assigned it to the users. After a month, you decide to drop the profile. Some user sessions are currently connected to the database instance and are using the APP_USER profile.
This command is used to drop the profile:

SQL> DROP PROFILE app_user;

Which statement describes the result?
A. The command produces an error.
B. The profile is dropped and current user sessions use the DEFAULT profile immediately.
C. The profile is dropped and only the subsequent user sessions use the DEFAULT profile.
D. The profile is dropped, the sessions are terminated, and the subsequent user sessions use the DEFAULT profile.

124:
你创建一个profile APP_USER并分配给用户。一个月后,你决定删除profile。一些连接数据库实例的用户会话正在使用APP_USER profile。
这个命令用于删除profile:

SQL>DROP PROFILE app_user;

哪句描述的是最终结果?
A.        命令产生一个错误
B.        Profile被删除且当前用户会话使用默认的profile
C.        Profile被删除且只有后续的用户会话使用profile
D.        Profile被删除,会话终止并且后续的会话使用profile

答案:A
profile分配给用户后,必须取消才可以删除profile文件
--创建profile
SQL> create profile wwww limit failed_login_attempts 7;
Profile created.

--指定profile
SQL> alter user skd profile wwww;
User altered.

--查看skd的profile
SQL> select PROFILE from dba_users where username='SKD';
PROFILE
------------------------------
WWWW
--测试删除,删除失败
SQL> drop profile wwww;
drop profile wwww
*
ERROR at line 1:
ORA-02382: profile WWWW has users assigned, cannot drop without CASCADE

--修改为默认的profile
SQL> alter user skd profile default;
User altered.
--测试删除,删除成功
SQL> drop profile wwww;
Profile dropped.

回复 只看该作者 道具 举报

124#
发表于 2016-11-8 16:36:11
123:
You executed the following commands to find the location of the alert log file:


Where is the alert log file stored? (Choose all that apply.)

A. in the BACKGROUND_DUMP_DEST location; in text format
B. in the BACKGROUND_DUMP_DEST location; in XML format
C. in the BACKGROUND_DUMP_DEST location; in both text and XML format
D. in the DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert directory; in text format
E. in the DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert directory; in XML format
F. in the DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert directory; in both text and XML format

123:
你执行下面的语句寻找alert日志文件的位置:

Alert日志文件存储的位置是?(选择所有正确的)
A.        在BACKGROUND_DUMP_DEST中;文本格式
B.        在BACKGROUND_DUMP_DEST中;XML格式
C.        在BACKGROUND_DUMP_DEST中;文本格式和XML格式
D.        在DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert目录中;文本格式
E.        在DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert目录中;XML格式
F.        在DIAGNOSTIC_DEST/diag/rdbms/orcl/orcl/alert目录中;文本格式和XML格式

答案:AE
$ORACLE_BASE/diag/rdbms/<db_name>/<SID>/alert 目录中有一个XML 版本的预警日志。
要通过SQL*Plus 确定预警日志的位置,请执行以下操作:
• 使用SQL*Plus(或其它查询工具,如 SQL Developer)连接到数据库。
• 查询V$DIAG_INFO 视图。
要查看不带XML 标记的纯文本预警日志,请执行以下操作:
• 在V$DIAG_INFO 查询结果中,记下对应于Diag Trace 条目的路径。将目录更改至该路径。
• 使用文本编辑器打开alert_SID.log 文件。
要查看XML 格式的预警日志,请执行以下操作:
• 在V$DIAG_INFO 查询结果中,记下对应于Diag Alert 条目的路径。将目录更改至该路径。
• 使用文本编辑器打开log.xml文件。

1.png (156.47 KB, 下载次数: 258)

1.png

回复 只看该作者 道具 举报

123#
发表于 2016-11-8 16:35:31
122:
You execute a command to resize a data file, sales.dbf, of size 200 MB in your database:

ALTER DATABASE DATAFILE '/remorse/sales.dbf' RESIZE 150M;

Which statement is true about this command?

A. The command must be issued in MOUNT state.
B. The command succeeds only if the data file is offline.
C. The command must be issued when the database is in the archivelog mode.
D. The command succeeds if no extent in the tablespace is currently allocated above the 150 MB boundary of the file.

122:
你执行一个命令重置数据文件大小,sales.dbf,大小为200M在你的数据库:

ALTER DATABASE DATAFILE '/remorse/sales.dbf' RESIZE 150M;

哪些语句是正确的关于这个命令?
A.        命令必须在MOUNT状态下执行
B.        命令执行成功只有数据文件离线
C.        命令必须执行当数据库处于archivelog模式
D.        命令执行成功如果表空间中当前分配的没有大于150MB的文件边界的extent

答案:D
如果文件包含的数据超过指定减少的尺寸,这会返回一个错误。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/dfiles.htm#ADMIN11426

回复 只看该作者 道具 举报

122#
发表于 2016-11-8 16:35:08
121:
You suspect unauthorized data manipulation language (DML) operations on a particular table. You want to track users who are performing the transactions and the values used in the transactions. You also plan to transfer these values to another table for analysis. How would you achieve this?

A. by using triggers
B. by using Data Pump
C. by using external tables
D. by using anonymous PL/SQL blocks

121:
你怀疑未授权的数据库操作语言操作(DML)在一个特殊的表上。你想追踪正在执行事务和值使用在事务中的用户。你计划转换这些值到其他的表用于分析。你该如何达到这个目的?
A.        通过使用触发器
B.        通过使用数据泵
C.        通过使用外部表
D.        通过匿名PL/SQL块

答案:A
触发器是存储在数据库中的PL/SQL  代码对象,它们会在某些事件发生时自动运行或“触发”。Oracle  数据库允许许多操作充当触发事件,包括插入到表中、用户登录数据库以及尝试删除表或更改审计设置等操作。
有许多事件可用来触发触发器,这些事件分为三类。
•DML 事件触发器在通过语句修改数据时触发。
• DDL 事件触发器在通过语句创建或以某种方式修改对象时触发。
• 数据库事件触发器在数据库中发生特定事件时触发。
大多数触发器可指定为在事件发生前或事件发生后触发。对于DML 事件,可将触发器设计为在执行某一语句时触发一次,或者在修改每行时触发一次。

回复 只看该作者 道具 举报

121#
发表于 2016-11-2 16:22:27
120:
The tnsnames.ora file has an entry for the service alias ORCL as follows:

ORCL =
( DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.156.24.216)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = orcl.oracle.com)
)
)

The TNSPING command executes successfully when tested with ORCL, but you are not able to connect to the database instance with the following command:

SQL> CONNECT scott/tiger@orcl

What could be the reason for this?

A. The listener is not running on the database node.
B. The TNS_ADMIN environmental variable is set to a wrong value.
C. The orcl.oracle.com database service is not registered with the listener.
D. The DEFAULT_DOMAIN parameter is set to a wrong value in the sqlnet.ora file.

120:
Tnsnames.ora文件拥有一个服务别名ORCL的条目如下所示:

ORCL =
( DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.156.24.216)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = orcl.oracle.com)
)
)

TNSPING命令执行成功当测试使用ORCL,但是你不能连接数据库使用下面命令:

SQL> CONNECT scott/tiger@orcl

原因可能是什么?
A.        listener没有运行在数据库节点上
B.        TNS_ADMIN环境变量设置错误
C.        Orcl.oracle.com数据库服务没有注册到listener
D.        DEFAULT_DOMAIN参数设置成错误的值在sqlnet.ora文件

答案:C
如果listener没有启动,则tnsping不会成功,所以A错
TNS_ADMIN主要应用于一台主机上有多个版本的数据库,指定文件的路径,所以B错
当 SERVICE_NAME 填写不正确时,你可以 tnsping 通数据库实例,但是却无法连接到数据库实例,因为你填写错的 SERVICE_NAME 并没有注册到 LISTENER 当中,C正确
DEFAULT_DOMAIN主要是设定客户端解析名字的域 ,D错误

回复 只看该作者 道具 举报

120#
发表于 2016-11-2 16:22:07
119:
Which three descriptions are correct about the effects of the TRUNCATE command on a table? (Choose three.)

A. The corresponding indexes for the table are also truncated.
B. Delete triggers on the table are fired during the execution of the TRUNCATE command.
C. The child table is truncated when the TRUNCATE command is applied on the parent table.
D. The highwater mark (HWM) is set to point to the first usable data block in the table segment.
E. No undo or very little undo data is generated during the execution of the TRUNCATE command

119:
哪三个描述是正确的关于TRUNCATE命令在一个表上的影响?(选择三个)
A.        表相应的索引也被删除
B.        表上的删除触发器被解除当执行TRUNCATE命令
C.        当TRUNCATE命令应用于父表时,子表也被删除
D.        高水位(HWM)设置为指向表段中第一个可用的数据块
E.        没有undo或者很少的undo数据产生在执行TRUNCATE命令期间

答案:ADE

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/general.htm#ADMIN11533

回复 只看该作者 道具 举报

119#
发表于 2016-11-2 16:21:50
118:
You plan to configure the new Oracle Database 11g installation by performing these tasks:

- Use Automatic Storage Management (ASM) as the storage option.
- Use Oracle Enterprise Manager Database Control to manage the database.
- Provide the same password for SYS, SYSTEM, SYSMAN, and DBSNMP accounts during the installation.
- Configure the database to send email notifications.

Some tools available to you for installation are:

1: Oracle Universal Installer (OUI)
2: Database Configuration Assistant (DBCA)
3: Database Upgrade Assistant (DBUA)
4: Oracle Net Configuration Assistant

Which tools would you use for this installation?

A. 2
B. 3
C. 1 and 2
D. 3 and 4
E. 1,2 and 4

118:
你计划配置新的Oracle Database 11g安装通过执行这些任务:

- 使用自动存储管理(ASM)作为存储选项
- 使用Oracle 企业管理控制台管理数据库
- 提供SYS,SYSTEM,SYSMAN和DBSNMP账户相同的密码在安装期间
- 配置数据库发送email通知

一些可以用来安装的工具是:

1: Oracle Universal Installer (OUI)
2: Database Configuration Assistant (DBCA)
3: Database Upgrade Assistant (DBUA)
4: Oracle Net Configuration Assistant

哪些工具你将会用来这次安装?

A. 2
B. 3
C. 1 and 2
D. 3 and 4
E. 1,2 and 4

答案:E
OUI用于安装数据库软件
DBCA用于创建数据库
DBUA用于升级数据
Oracle Net Configuration Assistant用于配置监听

选择ASM作为存储和设置密码是在DBCA期间完成的
配置OEM和email是在OUI期间完成的,配置OEM需要配置监听,所以答案选E

回复 只看该作者 道具 举报

118#
发表于 2016-11-2 16:21:34
117:
The user SCOTT owns the CUST table that is placed in the SALES tablespace. The user SCOTT opens a session and executes commands as follows:

SQL> INSERT INTO cust VALUES(101, 'JACK');
1 row created.
SQL> INSERT INTO cust VALUES(102, 'SMITH');
1 row created.

As a DBA, you execute the following command from another session:

ALTER TABLESPACE sales READ ONLY;

Which statement is true regarding the effect of this command on the transaction in Scott's session?

A. The command fails as a transaction is still pending.
B. The transaction in Scott's session is rolled back and the tablespace becomes readonly.
C. The command waits and the user SCOTT can execute data manipulation language (DML) statements only as part of the current transaction.
D. The command hangs until all transactions on the objects in the tablespace commit or rollback, and then the tablespace is placed in readonly mode.

117:
用户SCOTT拥有CUST表放在SALES表空间。用户SCOTT打开一个会话并执行下面命令:

SQL> INSERT INTO cust VALUES(101, 'JACK');
1 row created.
SQL> INSERT INTO cust VALUES(102, 'SMITH');
1 row created.

作为一个DBA,你执行下面的命令在另一个会话:

ALTER TABLESPACE sales READ ONLY;

哪些语句是正确的关于这个命令?
A.        命令失败因为一个事务仍然挂起
B.        Scott会话的事务回滚且表空间变成readonly
C.        命令等待并且用户SCOTT只可以执行DML语句作为当前事务的一部分
D.        命令挂起直到所有在表空间上的对象的事务提交或回滚,然后表空间置于readonly模式

答案:D
ALTER TABLESPACE语句会被挂起,直到DML操作所在的会话提交事务

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN11379

回复 只看该作者 道具 举报

117#
发表于 2016-11-2 16:21:17
116:
Identify three situations in which you would NOT be able to drop a tablespace. (Choose three.)

A. when the tablespace is online
B. when the tablespace has segments with data in it
C. when the tablespace is a default permanent tablespace for the database
D. when the tablespace contains a table that is currently being used by transactions
E. when the tablespace contains undo data that is needed to rollback an uncommitted transaction

116:
哪三种情况你不能删除一个表空间?(选三个)
A.        当表空间online的时候
B.        当表空间的段包含数据的时候
C.        当表空间是数据库默认的永久表空间时
D.        当表空间包含表正在被事务使用时
E.        当表空间包含undo数据需要回滚没提交的事务时

答案:CDE
删除表空间有选多限制

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9004.htm#SQLRF01807

回复 只看该作者 道具 举报

116#
发表于 2016-11-2 16:20:58
115:
View the Exhibit. What would happen if Oracle Home is not empty?

A. The installation will not be continued until the location is empty.
B. The installation will proceed without overwriting the existing files.
C. The installation can be continued, but the existing files will be overwritten.
D. The installation terminates automatically after showing an error message.

115:
查看下图,如果Oracle Home不为空将会发生什么?
A.        安装不会继续直到位置为空
B.        安装会继续不覆盖已有的文件
C.        安装会继续,但存在的文件会被覆盖
D.        安装会终止在显示一个错误信息之后

答案:A
如果安装目录不为空会提示
所选安装与指定Oracle主目录中已安装的软件冲突
清空安装目录,安装得以继续

1.png (466.95 KB, 下载次数: 294)

1.png

回复 只看该作者 道具 举报

115#
发表于 2016-11-2 16:20:19
114:
View the Exhibit and examine the PL/SQL package and procedure.

You made changes to the COMPUTE_TAX function inside the EMP_ADMIN package body. Which statement is true after you recompile the EMP_ADMIN package body?

A. The USE_P procedure remains valid.
B. The USE_P procedure becomes invalid.
C. The SHOW_DETAIL procedure becomes invalid.
D. The EMP_ADMIN package specification becomes invalid and needs to be recompiled.

114:
查看下表并检查PL/SQL包和存储过程。你想改变EMP_ADMIN包体中的COMPUTE_TAX函数。哪个语句是正确的在你重新编译EMP_ADMIN包体之后?

A.        过程USE_P仍然有效
B.        过程USE_P变得无效
C.        过程SHOW_DETAIL变得无效
D.        EMP_ADMIN程序包说明变得无效需要重新编译

答案:A
程序包体与程序包说明是分开的。因此,可以更改并重新编译程序包体代码,此时不会将与程序包说明相关的其它对象标记为无效。

1.png (52 KB, 下载次数: 302)

1.png

回复 只看该作者 道具 举报

114#
发表于 2016-11-2 16:19:41
113:
Which two statements are true about the Automatic Workload Repository (AWR)? (Choose two.)

A. All AWR tables belong to the SYSTEM schema
B. The AWR contains system wide tracing and logging information
C. The snapshots collected by the AWR are accessible through data dictionary views
D. The snapshots collected by the AWR are used by self-tuning components in the database

113:
哪两句是正确的关于自动负载知识库(AWR)?(选择两个)

A.        所有的AWR表属于SYSTEM用户
B.        AWR包含系统跟踪信息个登录信息
C.        AWR收集的快照可通过数据字典访问
D.        AWR收集的快照被数据库的自我调优组件使用

答案:CD
A错误,AWR属于sysman并存储在sysaux表空间
B错误,这是ADR的功能
C正确,dba_hist_snapshot就可以查询
D正确,AWR是所有自我管理功能的基础

回复 只看该作者 道具 举报

113#
发表于 2016-11-2 16:19:19
112:
Your database instance is functional for the past one month. The Automatic Workload Repository (AWR) snapshot retention is set to 7 and the STATISTICS_LEVEL initialization parameter is set to TYPICAL. You receive a complaint about the poor performance of the database between 7 PM and 9 PM of the previous day. Choose two actions any of which can be referred to first to diagnose the problem. (Choose two.)

A. Use the Active Session History report.
B. Use the AWR Compare Periods report.
C. Use an ADDM analysis between 7 PM and 9 PM of the previous day.
D. Use the AWR Compare Period report between 7 PM and 9 PM of the previous day.

112:
在过去的一个月,你的数据库实例是功能性的。自动负载知识库(AWR)快照保留时间设置为7并且STATISTICS_LEVEL参数设置为TYPICAL。你收到一个投诉关于数据库在前一天的7PM到9PM之间性能下降。选择两个可以第一时间诊断问题的动作?(选择两个)

A.        使用Active Session History报告
B.        使用AWR Compare Periods报告
C.        使用ADDM分析前天的7点到9点
D.        使用前一天7点到9点的AWR Compare Period
答案:BC
A不正确,因为一般 Active Session History  默认保留时间为1小时,所以无法查前天的信息
D不正确,因为应该与正常时段对比来确认问题

回复 只看该作者 道具 举报

112#
发表于 2016-11-2 16:19:02
111:
A database user SMITH tries to query the V$SESSION view and fails to access it as follows:
Which are the two possible solutions to enable SMITH to query the data in V$SESSION? (Choose two.)


A. granting SELECT privilege to SMITH on V$SESSION
B. granting SELECT privilege to SMITH on V_$SESSION
C. asking the user SMITH to run the catalog.sql script
D. granting SELECT privilege to SMITH on V$FIXED_TABLES
E. setting the O7_DICTIONARY_ACCESSIBILITY parameter to TRUE
F. creating a view based on V$SESSION and granting SELECT privilege to SMITH on the view that was created

111:
一个数据库用户SMITH尝试查询视图V$SESSION但无法访问:
哪两个可能是使SMITH能够查询V$SESSION中数据的解决方案?
A.        授予SMITH在V$SESSION上的SELECT权限
B.        授予SMITH在V_$SESSION上的SELECT权限
C.        用户SMITH运行catalog.sql脚本
D.        授予SMITH在V$FIXED_TABLES上的SELECT权限
E.        设置O7_DICTIONARY_ACCESSIBILITY参数为TRUE
F.        创建一个视图基于V$SESSION并授予SMITH权限SELECT创建的表

答案:BF
从题中错误看出,SMITH 用户没有访问数据字典v$session的权限,两种解决方法,一是给他访问v$session的权限,二是在v$session建立视图,并授权让SMITH 可以查看。

1.png (44.58 KB, 下载次数: 303)

1.png

回复 只看该作者 道具 举报

111#
发表于 2016-11-1 17:20:10
110:
You receive complaints from users regarding the high waiting time for their transactions. On investigation, you find that some users are not committing their transactions though they are not performing any activity for a long time. As a result, SQL statements need to wait for row level locks. Which two actions could you take to prevent this locking problem in the future? (Choose two.)

A. Decrease the IDLE_TIME resource limit in the profile assigned to the blocking users.
B. Use Database Resource Manager to automatically log out sessions that block others and are idle
C. Set the limit in the profile of blocking users to control the number of blocks to be accessed in a session.
D. Decrease the maximum number of interested transaction list (ITL) slots for the segments on which the blocking user performs the transaction.
110:
你收到用户关于事务高等待时间的投诉。在调查中,你发现一些用户没有提交它们的事务尽管他们没有执行任何活动很长一段时间。因此,SQL语句需要等待行级别的锁。哪两个行动可以阻止这么锁问题出现?(选择两个)
A.        减少分配给阻塞用户的IDLE_TIME资源在profile中
B.        使用Database Resource Manager去自动注销阻塞其他用户和空闲的会话
C.        在profile中设置限制以用来阻塞用户控制数据块分配在一个会话的数量
D.        减少段上的ITL的最大数量,用于阻止用户执行事务

答案:AB
A正确,通过数据库资源管理器提供的空闲时间限制,来指定哪些阻塞用户的会话的空间时间,超过该时间后将终止会话。
B正确
C,设置阻塞用户的档案,以控制在一个会话中被访问的块的数量的限制。如此一来,被阻塞的用户如果想再次访问的时候就不能访问了。错误。
D和C类似,如果此时空闲的用户想访问以前不感兴趣的事务,那么就不能访问了。

回复 只看该作者 道具 举报

110#
发表于 2016-11-1 17:19:47
109:
View Exhibit to examine the current memory allocation and parameter settings, respectively. Why are advisors not available for the shared pool and the buffer cache?



A. because the DB_CACHE_ADVICE parameter is set to OFF
B. because Automatic Memory Management (AMM) is disabled for the database instance
C. because Automatic Shared Memory Management (ASMM) is enabled for the database instance
D. because the values for the DB_CACHE_SIZE and SHARED_POOL_SIZE parameters were not set initially

109:
查看下表,检查当前的内存分配和参数设置,为什么advisor不能用于共享池和buffer cache?

A.        因为DB_CACHE_ADVICE参数设置为OFF
B.        因为数据库实例禁用自动内存管理
C.        因为数据库实例启用了自动共享内存管理
D.        因为一开始没有设置DB_CACHE_SIZE和SHARED_POOL_SIZE参数

答案:C
从图中可以看到启用了asmm,所以share pool和buffer cache不需要进行调整,他们会动态调整。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e10897/montune.htm#ADMQS1034

1.png (273.36 KB, 下载次数: 298)

1.png

2.png (202 KB, 下载次数: 296)

2.png

回复 只看该作者 道具 举报

109#
发表于 2016-11-1 17:19:05
108:
Which two statements are true about standard database auditing? (Choose two.)

A. DDL statements can be audited.
B. Statements that refer to standalone procedure can be audited.
C. Operations by the users logged on as SYSDBA cannot be audited.
D. Only one audit record is ever created for a session per audited statement even though it is executed more than once.

108:
哪两句是正确的关于标准的数据库审计?(选择两个)
A.        DDL语句可以被审计
B.        涉及独立存储过程的语句可以被审计
C.        用户作为SYSDBA登录操作不能被审计
D.        一个会话只会有一条审计记录被创建即便它执行不止一次

答案:AB
SQL 语句审计:AUDIT table;
上面显示的语句可审计影响表的任何数据定义语言(DDL) 语句,包括CREATE TABLE、DROP TABLE和TRUNCATE TABLE等。
也可以审计pl/sql语句。
C答案:Oracle DB 会自动捕获SYSDBA和SYSOPER用户的登录事件。
D答案:审计设置为BY ACCESS。每次行使经审计的系统权限时,都会生成一条审计记录。
使用BY SESSION子句将这些记录组成一组,以便每个会话只生成一条记录。
(这样,如果一个用户针对另一个用户的表发出了多条更新语句,则只收集一条审计记录。)

回复 只看该作者 道具 举报

108#
发表于 2016-11-1 17:18:49
107:
Your database is in shutdown state. What will happend if you issue next command:

SQL> startup

A. instance will started
B. instance started and DB is mounted
C. instance started, DB opened and finally mounted
D. instance started, DB mounted and finally opened

107:
你的数据库处于shutdown状态。如果你执行下面这个命令将会发生什么:
SQL> startup

A.        实例将会启动
B.        实例启动并且数据库mount
C.        实例启动数据库open并最终mount
D.        实例启动数据库mount并最终open

答案:D
Startup默认为startup open

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/startup.htm#CNCPT602

回复 只看该作者 道具 举报

107#
发表于 2016-11-1 17:18:28
106:
Which of these is true about undo tablespace?
A. Undo tablespace is a temporary tablespace
B. Undo tablespace has only one datafile
C. Undo tablespace has a datafile which is reused in cyclic manner

106:
哪些是正确的关于undo表空间?
A.        undo表空间是临时表空间
B.        undo表空间只有一个数据文件
C.        undo表空间有一个数据文件以循环的方式使用

答案:A

回复 只看该作者 道具 举报

106#
发表于 2016-11-1 17:18:09
105:
Your database is functional with a peak load for the last one hour. You want to preserve the performance statistics collected during this period to be used for comparison when you analyze the performance of the database in the future.
What action would you take to achieve this task?
A. Insert finding directives for ADDM tasks in the future.
B. Create a baseline on a pair of snapshots spanning the peak-load period.
C. Decrease the snapshot interval in the AWR to collect more snapshots during the peakload period.
D. Set the snapshot retention period in the Automatic Workload Repository (AWR) to zero to avoid automatic purging of snapshots.

105:
数据库处于峰值负载的最后一个小时。你想保留在此期间收集的性能统计信息用于和未来的数据库性能进行比较和分析。
你会采取什么行动来完成这个任务?
A.        针对以后ADDM任务插入寻找指令
B.        创建一个基线用于和负载峰值期间对照
C.        在高峰负载时期,减少AWR快照时间间隔,收集更多的快照
D.        自动负载信息库(AWR)快照保留期限设置为零,以避免自动清除快照

答案:B
• 自动工作量资料档案库(AWR):是用于数据搜集、分析和提供解决方案建议的基础结构,包括数据库统计信息和度量、应用程序统计信息(事务处理量和响应时间)、操作系统统计信息及其它度量。自动工作量资料档案库(AWR) 通过为内部Oracle 服务器组件提供服务来收集、处理、维护和使用性能统计信息,以便进行问题检测和自优化。
• AWR 基线:是在一段时间内收集的一组AWR 快照。基线用于性能比较,这既可以是当前性能与基线的比较,也可以是一个基线与另一基线的比较。
从题中可知,可在峰值负载期间建立一对快照来对比性能。

回复 只看该作者 道具 举报

105#
发表于 2016-11-1 17:17:49
104:
View the Exhibit. You are creating an additional database by using the Database Configuration Assistant (DBCA). You opted to create a General Purpose database and during the database creation realize that the Block Size field is not enabled.

What could be the reason for this?  

A. You have chosen the File System option as the storage option.
B. You have chosen the Automatic Storage Management (ASM) as the storage option.
C. The data block size can be increased only when DBCA is invoked from Oracle Universal Installer (OUI).
D. You are using General Purpose template and not the Custom Database template to create the database.

104:
查看下图。你正在创建一个数据库通过使用Database Configuration Assistant(DBCA)。你选择创建一个一般用途数据库并且在数据库创建期间意识到Block Size field没有启用。
原因可能是什么?
A.        你选择了文件系统作为存储选项
B.        你选择了ASM作为存储选项
C.        数据块大小只能被增大当DBCA从Oracle Universal Installer(OUI)调起
D.        你正在使用一般用途模板而不是普通数据库模板创建数据库

答案:D
是因为之前创建数据库时,选择的是按照一般目的模板来创建的,故块大小为固定的,不能改。

1.png (240.75 KB, 下载次数: 302)

1.png

回复 只看该作者 道具 举报

104#
发表于 2016-11-1 17:17:11
103:
Which two statements are true regarding the Oracle Data Pump export and import operations? (Choose two.)

A. You cannot export data from a remote database.
B. You can rename tables during an import operation.
C. You can overwrite existing dump files during an export operation.
D. You can compress the data during export but not the metadata because it is not supported.

103:
哪两句是正确的关于Oracle Data Pump的导入和导出操作?(选择两个)
A.        你不能从远程数据库导出数据
B.        你可以重命名表在导入期间
C.        你可以覆盖已经存在的dump文件在导出操作期间
D.        你可以在导出期间压缩数据除了元数据因为它不支持

答案:BC
可以从远程导出,使用network_link参数
可以压缩元数据和数据,参数compression的选项有ALL,DATA_ONLY,METADATA_ONLY和NONE

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL201

回复 只看该作者 道具 举报

103#
发表于 2016-11-1 17:16:55
102:
Which two statements are true about checkpointing? (Choose two.)

A. The checkpoint frequency decreases with the smaller redo log file size.
B. It ensures that all committed data is written to the data files during normal shutdown.
C. The frequent full checkpoint in a database can cause the overall degradation of the database performance.
D. It prompts the Checkpoint (CKPT) process to write data to the data files and redo information to the online redo log files.

102:
哪两句关于检查点的描述是正确的?(选择两个)
A.        检查点出现的频率会减少随着redo日志文件变小
B.        它确保所有已经提交的数据被写入到数据文件在关机期间
C.        频繁的完全检查点会导致数据库性能全线下降
D.        它提示检查点进程(CKPT)写数据到数据文件和写redo信息到在线redo日志文件中

答案:BC
A.当重做日志文件太小的情况下,会频繁的切换日志,检查点信息写入数据文件的频率会增加而不是减少。A错。
B.在正常关库,会生成完全检查点,CKPT会让DBWn进程将所有已经提交的都写进数据文件,B对。
C.频繁的发生检查点会增加I/O的读写次数,造成数据库性能的下降,故C对。
D.LGWR是将重做信息写进重做日志里,DBWn是将数据写进数据文件,CKPT 进程写入的检查点信息包括检查点位置、系统更改编号(SCN)、联机重做日志文件中恢复开始的位置、有关日志的信息等等。.D错。

回复 只看该作者 道具 举报

102#
发表于 2016-11-1 17:16:37
101:
The user HR receives the following error while inserting data into the TTK table:

ERROR at line 1:
ORA-01653: unable to extend table HR.TTK by 128 in tablespace SMD Upon investigation, you find that SMD is a small file tablespace.

Which three action would allow the user to insert data? (Choose three.)

A. Add a data file to the SMD tablespace.
B. Add a data file to the temporary tablespace associated with the user HR.
C. Resize the data file associated with the SMD tablespace to make it larger.
D. Alter the data file associated with the SMD tablespace to grow automatically.
E. Change the segment space management for the SMD tablespace to automatic.

101:
HR用户收到下面的错误当插入数据到TTK表中:

ERROR at line 1:
ORA-01653: unable to extend table HR.TTK by 128 in tablespace SMD Upon investigation, you find that SMD is a small file tablespace.

哪三种动作允许用户插入数据?(选择三个)
A.        添加数据文件到SMD表空间
B.        添加数据文件到与HR用户相关联的临时表空间
C.        调整SMD表空间相关的数据文件使之更大
D.        变更SMD表空间相关的数据文件为自动增长
E.        改变SMD表空间的段空间管理为自动

答案:ACD
增大表空间有三种方法:
1、增加一个文件:ALTER TABLESPACE lmtbsb ADD DATAFILE '/u02/Oracle/data/lmtbsb02.dbf' SIZE 1M;
2、改变原来数据文件的大小:ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf' RESIZE 300M;
3、设置自动增长:ALTER TABLESPACE users ADD DATAFILE '/u02/oracle/rbdb1/users03.dbf' SIZE 10M AUTOEXTEND ON NEXT 512K MAXSIZE 250M;
故答案选ACD

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces.htm#ADMIN13453

回复 只看该作者 道具 举报

101#
发表于 2016-10-31 18:01:56
100:
所有的数据库用户正在连接数据库实例进行工作。HR用户打开了三个数据库会话并执行下面的命令在其中一个会话:
SQL> UPDATE persons SET ccode='U031' WHERE ccode='U029'; 123 rows updated. SQL> DELETE FROM persons WHERE exp='Y';
3 rows deleted.
SYS用户打开一个新的会话在HR执行上面的命令后。哪个会话可以看到UPDATE和DELETE命令的影响?
A.        只有HR用户打开的所有会话
B.        HR和SYS的所有会话
C.        HR用户执行命令的会话
D.        数据库用户有访问PERSONS表权限的用的所有会话

答案:C
因为update和delete之后没有commit,所以只能执行语句的会话才能看到结果。

回复 只看该作者 道具 举报

100#
发表于 2016-10-31 17:58:45
99:
You configured the Flash Recovery Area (FRA) for your database. The database instance is running in ARCHIVELOG mode. The default location for the archived redo log files is the Flash Recovery Area.
Which two files are removed automatically if the space is required in the FRA as per the retention policy? (Choose two.)
A. Flashback log files
B. Backups that have become obsolete
C. User managed backups of the data files and control files
D. Archived redo log files that have multiple copies in a different archive location and not backed up

99:
你为你的数据库配置Flash Recovery Area(FRA)。数据库实例处于ARCHIVELOG模式。默认的归档日志路径是Flash Recovery Area
哪两个文件自动删除如果FRA按照保留策略需要空间?
A.        闪回日志文件
B.        Obsolete的备份
C.        用户管理的数据文件和控制文件备份
D.        没有备份的归档日志文件有多路复用的备份在不同的归档路径

答案:AB
快速恢复区的空间管理由备份保留策略控制。保留策略确定文件何时过时,即何时这些文
件对达到数据恢复目标已不再有用。Oracle DB 通过删除不再需要的文件自动管理该存储。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV89505

回复 只看该作者 道具 举报

99#
发表于 2016-10-31 17:57:26
98:
In a new installation of Oracle Database 11g, you perform these activities:

1. Organize software and data on different subdirectories to avoid poor performance.
2. Use consistent naming conventions for database files.
3. Separate administrative information pertaining to the database in different directories.

Which option corresponds to the type of activities you performed?

A. Oracle Managed Files
B. Oracle Grid Architecture
C. Optimal Flexible Architecture
D. Oracle database architecture
E. Automatic Storage Management

98:
在一个新安装的Oracle Database 11g数据库,你执行下面活动:
1.        组织软件和数据在不同的子目录,避免性能不佳
2.        使用统一的命名惯例为数据库文件
3.        分开管理权限信息在不同目录

哪个选项对应的你指定的活动?

A. Oracle Managed Files
B. Oracle Grid Architecture
C. Optimal Flexible Architecture
D. Oracle database architecture
E. Automatic Storage Management

答案:C
OFA其实就是一种Oracle的一种规范,其意义就是用一种统一的给文件和文件夹的规则,和文件存放目录的规则做一个约定。这样,我们不管是安装多个版本的Oracle Database也好,因为目录规范,命名规范,这样软件不会冲突,方便管理,文件也方便查找。通过遵循OFA的指导,使得整个系统可以更加灵活

参考官方文档:
http://docs.oracle.com/cd/E11882_01/install.112/e47689/appendix_ofa.htm#LADBI1377

回复 只看该作者 道具 举报

98#
发表于 2016-10-31 17:55:28
97:
You have two database servers SEMP and SACCT. The database in the SEMP server maintains the employee information and the database in the SACCT server maintains the accounts payable information. The employees submit the expense reports to the accounts payable department. A user of the accounts payable database wants to extract the employee information from the database in the SEMP server for cross verification.
Which schema object enables the user to access the information from the remote database?

A. Cluster
B. Database link
C. Mapping table
D. Materialized view

97:
你有两个数据库服务器SEMP和SACCT。SEMP服务器上的数据库维护员工的信息,SACCT服务器上的数据库维护账户应付款信息。员工提交账户应付款部门的费用报告。一个账户应付款数据库的用户想提取员工信息从SEMP服务器上数据库进行交叉验证

哪个方案对象启用可以使用户访问远程数据库的信息?
A.        Cluster
B.        Database link
C.        Mapping table
D.        Materialized view

答案:B
使用DB Link可以实现数据库的远程连接,关于DB Link的介绍,
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts.htm#ADMIN12084

回复 只看该作者 道具 举报

97#
发表于 2016-10-31 17:53:43
View the Exhibit to examine the output of the DBA_OUTSTANDING_ALERTS view. After 30 minutes, you executed the following command:

SQL> SELECT reason,metric_value FROM dba_outstanding_alerts;
REASON METRIC_VALUE
----------------------------------------------- ----------------
Tablespace [TEST] is [28 perce 28.125 nt] full 28.125

What could be the reason for the elimination of the other rows in the output?


A. An Automatic Workload Repository snapshot has been taken recently.
B. The non-threshold-based alerts are transferred to DBA_ALERT_HISTORY.
C. The threshold alerts conditions are cleared and the alerts are transferred to BA_ALERT_HISTORY.
D. The threshold alerts related to database metrics are permanently stored in DBA_ALERT_HISTORY but not the threshold alerts related to instance metrics.

96:
查看下图检查DBA_OUTSTANDING_ALERTS视图的输出。30分钟之后,你执行下面的命令:

SQL> SELECT reason,metric_value FROM dba_outstanding_alerts;
REASON METRIC_VALUE
----------------------------------------------- ----------------
Tablespace [TEST] is [28 perce 28.125 nt] full 28.125

可能是什么原因消除输出中的行?

A.        采取最近一个自动负载知识库快照
B.        非基于阈值的alert被转移到DBA_ALERT_HISTORY
C.        基于阈值的alert条件被清除并且alert转移到DBA_ALERT_HISTORY
D.        基于阈值的alert数据库相关的指标被永久的存储在DBA_ALERT_HISTORY而不是基于阈值的alert实例相关的指标

答案:C
服务器生成预警分为两种类型:阈值预警和非阈值预警。
大多数服务器生成的预警是通过对数据库度量设置警告阈值和严重阈值来配置的。可为120 多个度量定义阈值,这些度量包括:
• 每秒的物理读取次数
• 每秒的用户提交次数
•SQL 服务响应时间
除了表空间的空间占用率度量与数据库相关外,其它度量都与实例相关。阈值预警又称为“有状态预警”,清空预警条件后,会自动清空这些预警。有状态预警显示在
DBA_OUTSTANDING_ALERTS中,清空后会转到DBA_ALERT_HISTORY。
服务器生成的其它预警对应于特定的数据库事件,如ORA-*错误、“快照太旧”错误、“恢复区空闲空间过少”和“可恢复会话被挂起”等。这些都不是基于阈值的预警,又称
为“无状态预警”。无状态预警会直接转到历史记录表。只在Database Control 环境中,清空无状态预警才有意义,因为Database Control 会在自身的资料档案库中存储无状态预警。

1.png (125.1 KB, 下载次数: 231)

1.png

回复 只看该作者 道具 举报

96#
发表于 2016-10-31 17:53:17
95:
You are managing an Oracle Database 11g database. You configured the database to run in ARCHIVELOG mode.
Which two statements are true in this scenario? (Choose two.)

A. You must shut down the database instance to perform the backups.
B. You must configure the Flash Recovery Area (FRA) for the database.
C. You can perform complete database backups without closing the database.
D. All the previous closed database backups including control files become invalid after you configure the database to ARCHIVELOG mode.

95:
你正在管理一个Oracle Database 11g数据库。你配置数据库为ARCHIVELOG模式。哪两句是正确的在这个场景?(选择两个)
A.        你必须关闭数据库才能执行备份
B.        你必须为数据库配置Flash Recovery Area
C.        你可以执行完整的数据库备份没有关闭数据库的情况下
D.        在你设置数据库为ARCHIVELOG模式之后,所有之前的相关数据库备份包括控制文件变得无效

答案:CD
A.在归档模式下,可以进行数据库非一致性备份,即热备份。不需要关闭数据库来备份。
B.在归档模式下,不用必须指定快速恢复区,归档日志可以重新自己指定本地位置或远程位置来归档。
C.在归档模式下,可以进行完成的数据库备份,而不需要数据库关闭。
D.在非归档转为归档模式后,或者重新配置成归档模式,之前所有的备份,包括控制文件,都已经变为无效的,因为日志信息的序列号是重头开始的。

回复 只看该作者 道具 举报

95#
发表于 2016-10-31 17:52:42
94:
Which three statements are true about logical structures of the Oracle database? (Choose three.)

A. Each segment contains one or more extents.
B. Multiple tablespaces can share a single data file.
C. A data block is the smallest unit of input/output (I/O) in data files.
D. It is possible to have tablespaces of different block sizes in a database.
E. Each data block in the database always corresponds to one operating system block.

94:
哪三个语句是正确的关于Oracle数据库的逻辑结构?(选择三个)
A.        每个段包含一个或多个区
B.        多个表空间可以共用一个数据文件
C.        数据块是数据文件最小的I/O单元
D.        一个数据库中可能有不同的块大小的表空间
E.        数据库中的每个数据块总是和操作系统块保持一致

答案:ACD
A段是由一个或多个去组成的,故正确
B一个数据文件只能属于一个表空间,一个表空间可以有多个数据文件,错误
C Oracle Data Block是最小的I/O单位,正确
D 可以指定非标准快大小的表空间
E 数据库里的块大小可以和操作系统一致,也可以是其的整倍数,错误

回复 只看该作者 道具 举报

94#
发表于 2016-10-31 17:51:54
93:
User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command:

SQL> SELECT ename FROM emp
2 WHERE job='CLERK' FOR UPDATE OF empno;

SCOTT has opened another session to work with the database instance. Which three operations would wait when issued in SCOTT's second session? (Choose three.)

A. LOCK TABLE emp IN SHARE MODE;
B. LOCK TABLE emp IN EXCLUSIVE MODE;
C. UPDATE emp SET sal=sal*1.2 WHERE job='MANAGER'
D. INSERT INTO emp(empno,ename) VALUES (1289,'Harry');
E. SELECT ename FROM emp WHERE job='CLERK' FOR UPDATE OF empno;

93:
用户SCOTT执行下面命令在EMP表上但是没有COMMIT,ROLLBACK或者任何DDL命令:

SQL> SELECT ename FROM emp
2 WHERE job='CLERK' FOR UPDATE OF empno;

SCOTT打开了另一个会话与数据库实例。哪三种操作会等待当在SCOTT的第二个会话执行的时候?(选择三个)

A. LOCK TABLE emp IN SHARE MODE;
B. LOCK TABLE emp IN EXCLUSIVE MODE;
C. UPDATE emp SET sal=sal*1.2 WHERE job='MANAGER'
D. INSERT INTO emp(empno,ename) VALUES (1289,'Harry');
E. SELECT ename FROM emp WHERE job='CLERK' FOR UPDATE OF empno;
答案:ABE
这个select ... for update 是在TX加上了S锁,在TM上增加了SX锁,
因此不能在TX上增加X锁,不能在TM上增加S、SSX、X锁
A:正确,这个相当于TMS锁
B:正确,这个是TM的X锁
C:这里只是TM的SX锁
D:和C一样
E:正确,这里是SX锁,锁的是不同的记录

回复 只看该作者 道具 举报

93#
发表于 2016-10-31 17:51:36
92:
You have set Tablespace Full Metrics Threshold values for the USERS tablespace as follows:
Warning (%): 90
Critical (%): 95
Which background process is responsible for issuing alerts when the threshold is crossed?

A. System monitor (SMON)
B. Process monitor (PMON)
C. Memory manager process (MMAN)
D. Manageability Monitor process (MMON)

92:
你设置USERS表空间的Tablespace Full Metrics Threshold值为下面:
Warning (%): 90
Critical (%): 95
哪个后台进程负责阈值超出时发出警报?

A. System monitor (SMON)
B. Process monitor (PMON)
C. Memory manager process (MMAN)
D. Manageability Monitor process (MMON)

答案:D
可管理性监视器进程(MMON),可执行各种与可管理性相关的后台任务,例如:
• 每当给定的度量超过其阈值时发出预警
• 通过衍生附加进程(MMON 从属进程)获取快照
• 捕获近期已做修改的SQL 对象的统计值

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/process.htm#BABJAIBD

回复 只看该作者 道具 举报

92#
发表于 2016-10-31 17:51:16
91:
You are working on a database that must be functioning 24 hours a day, 7 days a week. The database is configured in ARCHIVELOG mode.
Which two options do you have for performing user-managed backups? (Choose two.)

A. You can perform consistent backups only.
B. You can perform a complete database backup without shutting down the database instance.
C. You can back up data files only when all data files have the same SCN recorded in the control file.
D. You can back up only those data files whose headers are frozen by using ALTER TABLESPACE BEGIN BACKUP or ALTER DATABASE BEGIN BACKUP commands.

91:
你工作在一个7×24小时工作的数据库。数据库配置为ARCHIVELOG模式。
哪两个种是你可以执行用户管理的备份?(选择两个)
A.        你只可以执行一致性备份
B.        你可以执行一个完整的数据库备份在数据库实例不关闭的情况下
C.        你可以备份数据文件只有在在控制文件中所有数据文件拥有相同的SCN记录时
D.        你可以备份只有那些文件头使用ALTER TABLESPACE BEGIN BACKUP或者ALTER DATABASE BEGIN BACKUP命令冻结的数据文件

答案:BD
归档模式:可以进行一致性备份(冷备)和非一致性备份(热备)。
非归档模式:一致性备份(冷备)

一致性备份(冷备份):在数据库正常关闭情况下做备份,数据库处于一致性状态。
(可以用于归档和非归档),所有SCN号一致。缺点:数据库需要关闭。
非一致性备份(热备份):数据库在open状态下备份(用于归档模式),
使用alter database/tablespace xxx begin backup开始备份,此时会冻结数据文件文件头。

回复 只看该作者 道具 举报

91#
发表于 2016-10-28 16:49:57
90:
You execute the following command to change the status of the SALES tablespace:

SQL> ALTER TABLESPACE sales OFFLINE;

Which statements describe the effect of the command? (Choose all that apply.)

A. The tablespace would require recovery to go back online.
B. A checkpoint is taken on all data files that are associated with the SALES tablespace.
C. The sessions that subsequently try to access the objects in the SALES tablespace receive an error.
D. The new status of the SALES tablespace is recorded in the control file when the database instance is closed.

90:
你执行下面的命令改变SALES表空间的状态:

SQL> ALTER TABLESPACE sales OFFLINE;

哪些语句描述了命令的影响?(选择所有合适的)
A.        表空间需要恢复才能回到online状态
B.        检查点会记录在SALES表空间关联的所有数据文件
C.        会话随后访问SALES表空间的对象会收到一个错误
D.        当数据库实例关闭,SALES表空间的新状态被记录在控制文件中

答案:BC

表空间offline选项:
Normal(正常):如果表空间中的任何数据文件不存在任何错误状态,可通过正常方式使表空间脱机.表空间脱机时,会对表空间中的所有数据文件设置检查点,可以确保将所有数据写入磁盘.

Temporary(临时):如果表空间中的一个或多个文件存在错误状态,也可以使表空间暂时脱机.尚未脱机的数据文件脱机时,会对这些数据文件设置检查点.如果没有任何文件脱机,但是使用了临时子句,使表空间重新联机时便不需要执行介质恢复.但是,如果因写错误而导致表空间的一个或多个文件脱机,而且设置了表空间临时脱机,那么表空间需要执行恢复后才能重新联机.

Immediate(立即)表空间可以立即脱机,Oracle 数据库不需要对任何数据文件设置检查点.如果指定了"Immediate",则必须先对表空间执行介质恢复 recover tablespace ,才能使表空间联机.如果数据库在 NOARCHIVELOG 模式下运行,则无法立即使表空间脱机.

因为是正常的offline表空间,所以不需恢复,即可online,A错
正常的offline表空间,会对所有数据文件设置检查点,B对
不能访问offline的表空间,C对
表空间offline时会立即记录在控制文件,而不是关闭的时候才记录,D错

回复 只看该作者 道具 举报

90#
发表于 2016-10-28 16:49:17
89:
Examine the following statement that is used to modify the primary key constraint on the SALES table:

SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;

Which three statements are true regarding the above command? (Choose three.)

A. The constraint remains valid.
B. The index on the constraint is dropped.
C. It allows the loading of data into the table using SQL *Loader.
D. New data conforms to the constraint, but existing data is not checked.
E. It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

89:
检查下面用于修改SALES表主键约束的语句:

SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;

哪三句是正确的关于上面的命令?(选择三个)
A.        约束仍然有效
B.        约束上的索引被删除
C.        允许使用SQL*Load加载数据到表中
D.        新的数据符合约束,已经存在的数据不会被检查
E.        允许在表上对数据使用INSERT/UPDATE/DELETE SQL语句

答案:ABC
DISABLE 和ENABLE 是针对新增的数据是否符合约束,NOVALIDATE 和VALIDATE是针对已经存在的数据是否符合约束。
DISABLE NOVALIDATE:不检查新数据和现有数据,因此这些数据可能不符合约束条件。当数据来自验证过的源,而且表是只读表时,通常会使用此状态。因此,不会将新数据输入表中。在已清理了数据的数据仓库环境中使用NOVALIDATE。此时不需要进行验证,因而可以节省很多时间。
DISABLE VALIDATE:如果约束条件处于此状态,则不允许对有约束条件的列进行任何修改。因为如果在验证现有数据后,又允许将未经检查的数据输入表中,就会出现不一致的情况。通常,在必须验证现有数据但不进行修改时,以及不需要索引来提高性能时,可使用此状态。
ENABLE NOVALIDATE:新数据符合约束条件,但现有数据处于未知状态。通常在确信表中只存在纯净数据和符合规则的数据的情况下使用该状态,此时不需要进行验证。但是,不允许将违反规则的新数据输入到系统中。
ENABLE VALIDATE:新数据与现有数据均符合约束条件。这是约束条件的典型状态和默认状态。

A正确,因为DISABLE VALIDATE对现有的数据仍然有约束
B正确,因为DISABLE VALIDATE状态会删除索引
C正确,因为DISABLE VALIDATE对新增加的数据没有约束
D错误,因为DISABLE VALIDATE是对现有的数据有约束,新增的没有
E错误,因为DISABLE VALIDATE不允许对有约束条件的列进行任何修改

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/clauses002.htm#i1002038

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-5-15 22:04 , Processed in 0.070310 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569