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

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖
楼主: wangtong
查看: 16888| 回复: 187
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,所以只能执行语句的会话才能看到结果。

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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错。

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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, 下载次数: 291)

1.png

回复 只看该作者 道具 举报

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 快照。基线用于性能比较,这既可以是当前性能与基线的比较,也可以是一个基线与另一基线的比较。
从题中可知,可在峰值负载期间建立一对快照来对比性能。

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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子句将这些记录组成一组,以便每个会话只生成一条记录。
(这样,如果一个用户针对另一个用户的表发出了多条更新语句,则只收集一条审计记录。)

回复 只看该作者 道具 举报

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, 下载次数: 289)

1.png

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

2.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类似,如果此时空闲的用户想访问以前不感兴趣的事务,那么就不能访问了。

回复 只看该作者 道具 举报

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, 下载次数: 293)

1.png

回复 只看该作者 道具 举报

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不正确,因为应该与正常时段对比来确认问题

回复 只看该作者 道具 举报

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是所有自我管理功能的基础

回复 只看该作者 道具 举报

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, 下载次数: 293)

1.png

回复 只看该作者 道具 举报

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, 下载次数: 283)

1.png

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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错误

回复 只看该作者 道具 举报

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 事件,可将触发器设计为在执行某一语句时触发一次,或者在修改每行时触发一次。

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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, 下载次数: 249)

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.

回复 只看该作者 道具 举报

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, 下载次数: 253)

1.png

回复 只看该作者 道具 举报

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秒

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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, 下载次数: 265)

1.png

回复 只看该作者 道具 举报

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, 下载次数: 253)

1.png

回复 只看该作者 道具 举报

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指定的空间,也可以向索引块添加新条目。

回复 只看该作者 道具 举报

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的备份删除。

回复 只看该作者 道具 举报

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 表空间来存储应用 程序的数据。

回复 只看该作者 道具 举报

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, 下载次数: 248)

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

回复 只看该作者 道具 举报

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, 下载次数: 258)

1.png

回复 只看该作者 道具 举报

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来设置推荐的值。

回复 只看该作者 道具 举报

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

回复 只看该作者 道具 举报

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:错误

回复 只看该作者 道具 举报

140#
发表于 2016-11-9 19:07:41
139:
You want to check the details of few errors that users have reported. You search for the alert log file and execute few commands to find the location of the alert log file.View the Exhibit and check the commands executed.


What is the location of the alert_orcl.log file?
A. ORACLE_HOME/dbs
B. ORACEL_HOME/rdbms
C. /u01/app/oracle/admin/orcl/adump
D. /u01/app/oracle/flash_recovery_area
E. ORACLE_BASE/diag/rdbms/orcl/alert
F. ORACLE_BASE/diag/rdbms/orcl/orcl/trace

139:
你想检查一些用户报告的错误的详细。你查找alert日志文件并执行一些命令寻找alert日志文件的位置。查看下图并检查执行的命令。
Alert_orcl.log文件位置在哪儿?

A. ORACLE_HOME/dbs
B. ORACEL_HOME/rdbms
C. /u01/app/oracle/admin/orcl/adump
D. /u01/app/oracle/flash_recovery_area
E. ORACLE_BASE/diag/rdbms/orcl/alert
F. ORACLE_BASE/diag/rdbms/orcl/orcl/trace


答案:F
要通过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 (105.24 KB, 下载次数: 309)

1.png

回复 只看该作者 道具 举报

141#
发表于 2016-11-9 19:10:47
140:
You want to enable archiving on your database. Presently, the database is running in NOARCHIVELOG mode.
Given below are the steps to accomplish the task in random order:

1. Shut down the instance.
2. Execute the ALTER DATABASE ARCHIVELOG command.
3. Start up the instance and mount the database.
4. Set the DB_RECOVERY_FILE_DEST initialization parameter to $ORACLE_HOME/dest_1.
5. Open the database.

Which is the correct sequence of steps for accomplishing the task?

A. 4, 1, 3, 2, 5
B. 1, 3, 4, 5, 2
C. 1, 3, 2, 5; 4 not required
D. 4, 1, 5, 2; 3 not required
E. 1, 3, 4, 5; 2 not required

140:
你想启用归档在你的数据库。目前,数据库运行在非归档模式。下面是完成这项任务的步骤以随机的顺序:

1.        关闭实例
2.        执行ALTER DATABASE ARCHIVELOG命令
3.        启用实例并挂载数据库
4.        配置DB_RECOVERY_FILE_DEST参数为$ORACLE_HOME/dest_1
5.        打开数据库

哪个是正确的步骤顺序完成这个任务?

A. 4, 1, 3, 2, 5
B. 1, 3, 4, 5, 2
C. 1, 3, 2, 5; 4 not required
D. 4, 1, 5, 2; 3 not required
E. 1, 3, 4, 5; 2 not required

答案:C
Oracle 11g中系统默认的情况是以DB_RECOVERY_FILE_DEST定义的目录来存放归档日志。
DB_RECOVERY_FILE_DEST参数是默认的flash recovery area的路径,里面存放有归档日志、闪回日志以及rman的备份文件等文件。
LOG_ARCHIVE_DEST:指定归档文件存放的路径,该路径只能是本地磁盘,默认为’’。
LOG_ARCHIVE_DEST_n:默认值为’’。Oracle最多支持把日志文件归档到10个地方,n从1到10。归档地址可以为本地磁盘,或者网络设备。

回复 只看该作者 道具 举报

142#
发表于 2016-11-10 19:01:55
141:
See the Exhibit. Which statements are true regarding the USERS tablespace? (Choose all that apply.)


A. A bitmap is used to record free extents
B. Free extents information is managed within the tablespace
C. Free extents information is managed in the SYSAUX tablespace
D. The data dictionary tables are updated when extents are allocated or deallocated

141:
查看下表,哪些语句是正确的关于USERS表空间?(选择所有适用的答案)

A.        一个bitmap用于记录空的extent
B.        空的extent信息由表空间管理
C.        空的extent信息由SYSAUX表空间管理
D.        数据字典表会更新当extent被分配或者收回

答案:AB
分区管理方式有2种:

LOCAL:本地管理,默认选项,在数据文件头用位图方式管理文件内分区使用情况.
DICTIONARY:字典管理,用数据字典表记录文件分区使用情况,技术落后,不推荐使用.

1.png (201 KB, 下载次数: 300)

1.png

回复 只看该作者 道具 举报

143#
发表于 2016-11-10 19:02:13
142:
In your database instance, the STATISTICS_LEVEL initialization parameter is set to BASIC. What is the impact of this setting?
A. Optimizer statistics are collected automatically.
B. Only timed operating system (OS) statistics and plan execution statistics are collected.
C. The snapshots for the Automatic Workload Repository (AWR) are not generated automatically.
D. Snapshots cannot be collected manually by using the DBMS_WORKLOAD_REPOSITORY package.
E. The Oracle server dynamically generates the necessary statistics on tables as part of query
optimization.

142:
在你的数据库实例,STATISTIC_LEVEL初始参数设置为BASIC。这个设置的影响是什么?

A.        优化器统计信息自动收集
B.        只有定时的操作系统(OS)统计信息和执行计划统计信息被收集
C.        自动负载知识库(AWR)不会自动产生快照
D.        快照不能手动通过DBMS_WORKLOAD_REPOSITORY包收集
E.        Oracle服务器动态的产生必要的表的统计信息,做为查询优化的一部分

答案:C
STATISTICS_LEVEL初始化参数可控制对各种统计信息和各种指导的捕获,其中包括自动维护任务。自动维护任务包括搜集优化程序统计信息。STATISTICS_LEVEL参数
可设置为以下级别:
• BASIC:AWR 统计信息和度量的计算被关闭。自动优化程序统计信息任务被禁用,所有指导和服务器生成的预警也被禁用。
• TYPICAL:收集数据库自我管理所需的主要统计信息。这些统计信息表示监视OracleDB 行为通常需要的信息。这包括自动搜集统计信息,以减少由于统计信息过时或无
效而导致不正确执行SQL 语句的可能性。
• ALL:捕获所有可能的统计信息。此捕获级别增加了计时操作系统统计信息和计划执行统计信息。多数情况下并不需要这些统计信息,为了获得最佳性能,不应启用这些
统计信息;有时执行特定的诊断测试时需要这些统计信息。
Oracle 建议将STATISTICS_LEVEL初始化参数设置为默认值TYPICAL。如果将该参数的值设置为BASIC,则会禁用自动搜集优化程序统计信息功能。
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams254.htm#REFRN10214

回复 只看该作者 道具 举报

144#
发表于 2016-11-10 19:02:31
143:
You have recently collected statistics on certain objects of a schema in your database. But you observe suboptimal execution plans for the queries on these objects after two days of statistics collection. The optimizer statistics retention period is set to its default value. Which action would help to use the previous set of statistics on the objects?
A. Restore statistics from statistics history.
B. Reduce the optimizer statistics retention period by 2 days.
C. Set the OPTIMIZER_PENDING_STATISTICS parameter to TRUE.
D. Reduce the Automatic Workload Repository (AWR) retention period by 2 days.

143:
你最近在你的数据库中收集某个用户的对象。但你观察这些对象的查询执行计划不是最优在收集了两天的统计信息之后。优化器统计信息保留时间设置为默认。哪些行为能帮助你使用之前统计信息的设置在对象上?

A.        从统计信息历史中恢复统计信息
B.        减少优化器统计信息保留时间为2天
C.        设置OPTIMIZER_PENDING_STATISTICS参数为TRUE
D.        减少自动负载知识库(AWR)保留时间为2天

答案:A
A,正确,可以从统计信息的历史信息恢复统计信息。如下面这个储存过程,RESTORE_TABLE_STATS Procedure,可以帮助你恢复原来的统计信息。
参考官方文档:
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68658

回复 只看该作者 道具 举报

145#
发表于 2016-11-10 19:05:16
144:
Which three statements regarding the server parameter file (SPFILE) are true? (Choose three.)
A. An SPFILE is a binary file
B. An SPFILE cannot reside on a client
C. An SPFILE cannot contain static parameters
D. An SPFILE can store changes persistently across instance restarts
E. An SPFILE can be read by the database server, but it is not written to by the server
F. An SPFILE must be created manually, before creating a database, even if you use the Database Configuration Assistant (DBCA) to create the database

144:
哪三句关于参数文件(SPFILE)是正确的?(选择三个)
A.        SPFIEL是二进制文件
B.        SPFILE不能保留在客户端
C.        SPFILE不能包含静态参数
D.        SPFILE可以存储实例重启间的持续变化
E.        SPFILE可以被数据库服务器读,但是不能被写
F.        SPFILE可以手工建,在创建数据库之前,如果你使用DBCA去创建数据库的话
答案:ABD
spfile是一个二进制文件,是属于服务器端,不是客户端。spfile可以包含有静态参数,也可以存储实例重新启动的参数的长久的变化,spfile可以在服务器上读,也可以通过alter system或者alter session来写入服务器。spfile在DBCA创建数据库时创建或者使用create spfile来创建。

回复 只看该作者 道具 举报

146#
发表于 2016-11-10 19:06:03
145:
Your test database is configured to run in NOARCHIVELOG mode. One of the data files in the USERS tablespace is lost due to a media failure. You notice that all the online redo logs have been overwritten since the last backup.
What would you do to recover the data file?
A. Take the USERS tablespace offline and re-create the lost data file
B. Shutdown the instance, restore the data file from the last consistent backup and restart the database instance
C. Shutdown the instance, restores all the database files from the last consistent backup and restart the database instance
D. Take the USERS tablespace offline, restore all the data files of the USERS tablespace from the last consistent backup and make the tablespace online

145:
你的测试数据库处于NOARCHIVELOG模式。USERS表空间的一个数据文件丢失由于介质故障。你注意到所有的在线redo日志都被重写了自从上次备份。
你将如何恢复数据文件?
A.        离线USRES表空间然后重建丢失的数据文件
B.        关闭数据库实例,恢复数据文件从上次一致性备份中并重启数据库实例
C.        关闭数据库实例,恢复所有的数据文件从上次一致性备份中并重启数据库实例
D.        离线USERS表空间,恢复所有USERS表空间的数据文件从上次一致性备份中,并online表空间

答案:C
在非归档模式下,只能使用冷备份来备份所有的文件,当数据文件丢失,重做日志被覆盖。则只能恢复到最近一次的一致性备份。不能用重做日志恢复到指定的时间点。数据库处于NOARCHIVELOG模式(默认模式)时,只能恢复到最后一次备份时的状态。在该备份之后执行的所有事务处理都会丢失。

回复 只看该作者 道具 举报

147#
发表于 2016-11-10 19:17:15
146:
Examine the command:

SQL>DBMS_STATS.SET_TABLE_PREFS('SH','CUSTOMERS','PUBLISH','false');

Which statement describes the effect of the above command?

A. Automatic statistics collection is stopped for the CUSTOMERS table
B. Statistics for the CUSTOMERS table are locked and cannot be overwritten
C. Existing statistics for the CUSTOMERS table become unusable for the query optimizer
D. Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics

146:
执行下面命令:

SQL>DBMS_STATS.SET_TABLE_PREFS('SH','CUSTOMERS','PUBLISH','false');

哪些语句描述了上述命令的影响?

A.        CUSTOMERS表的自动统计信息收集停止
B.        CUSTOMERS表的统计信息锁定且不能被覆盖
C.        CUSTOMERS已存在的统计信息变得无用对查询优化器来说
D.        随后,CUSTOMERS表上的统计信息收集存储为等待信息统计

答案:D
这里设置PUBLISH,意思是决定是否job收集完统计信息就马上发布,11.1以前是马上发布到字典表,现在用户可以收集后不立即发布,它容许dba在发布前进行测试。
参考官方文档:
http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68676

回复 只看该作者 道具 举报

148#
发表于 2016-11-10 19:17:34
147:
The database instance has the following parameter setting:
OS_AUTHENT_PREFIX = OPS$
OS_ROLES = FALSE
REMOTE_OS_AUTHENT = FALSE
REMOTE_OS_ROLES = FALSE
TIMED_OS_STATISTICS = 0
You have a local operating system user SKD. You create a database user OPS$SKD, and then assign external authentication. The user OPS$SKD has the CREATE SESSION privilege.
What would you achieve by the above process?
A. The database user OPS$SKD will be able to administer the database.
B. The authentication detail for the database user OPS$SKD is recorded in the password file.
C. The local operating system user SKD will be able to access the database instance without specifying the username and password.
D. The database user OPS$SKD has to login with the password of the local operating system user SKD to access the database instance.

147:
数据库实例有下面的参数设置:
OS_AUTHENT_PREFIX = OPS$
OS_ROLES = FALSE
REMOTE_OS_AUTHENT = FALSE
REMOTE_OS_ROLES = FALSE
TIMED_OS_STATISTICS = 0
你有一个本地操作系统用户SKD。你创建一个数据库用户OPS$$SKD,并分配外部身份认证。用户OPS$$SKD拥有CREATE SESSION权限。
你将能获得什么通过上面的过程?

A.        数据库用户OPS$$SKD将能管理数据库
B.        用户OPS$$SKD的身份证明的详细讲记录在密码文件中
C.        本地操作系统用户SKD将能够访问数据库实例不指定用户名和密码
D.        数据库用户OPS$$SKD登录使用本地操作系统用户SKD的密码访问数据库实例

答案:C
OS_AUTHENT_PREFIX:用户前缀,比如你的前缀是OPS$,你的系统用户为oracle,那么你的数据库账号就应该是OPS$ORACLE
OS_ROLES:TRUE表示由操作系统管理所有用户的角色分配,FALSE表示Oracle自身验证和管理角色
REMOTE_OS_AUTHENT:指定是否允许采用外部验证的方式登录数据库。默认为FLASE
REMOTE_OS_ROLES:指定是否允许远程客户端操作系统的角色。默认为FLASE
TIMED_OS_STATISTICS: 指定Oracle收集操作系统统计信息的时间间隔
A错,OPS$$SKD用户只有CREATE SESSION权限
B错,外部操作系统验证不需要密码
D错,不需要使用SKD用户的密码

回复 只看该作者 道具 举报

149#
发表于 2016-11-10 19:18:16
148:
Your database instance is running with full workload after database creation. You have decided to use a fixedsize undo tablespace. You want to use the undo Advisor to estimate the capacity of the undo tablespace.
Which two factors must you consider before using the Undo Advisor to estimate the capacity of the undo tablespace? (Choose two.)
A. The retention period to support flashback
B. The expected length of the longest-running query
C. The number of undo tablespaces in the database
D. The size of the Flash Recovery Area for the database instance

148:
你的数据库实例在数据库创建之后满负载运行。你觉得使用一个固定大小的undo表空间。你想使用undo Advisor去估算undo表空间的容量。
哪两个因素必须考虑在你使用Undo Advisor估算undo表空间容量之前?(选择两个)

A.        支持闪回的保留时间
B.        预期的最长查询的运行时间
C.        数据库undo表空间的数量
D.        数据库实例的快速闪回区的大小

答案:AB
使用Undo Advisor,你首先要考虑两个值:
预期的最长运行查询的时间
你需要闪回操作的最长间隔时间

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

回复 只看该作者 道具 举报

150#
发表于 2016-11-10 19:18:45
149:
You have an ORDERS table with the following structure:
Name  Null?  Type
----------- -------- ------------------
OID          NUMBER(6)
ODATE        DATE
CCODE        NUMBER(6)
OAMT         NUMBER(10,2)

The table has data in the ODATE column for all rows. Many orders are placed in a single day. You need to ensure that the ODATE column must contain data for every order in future.
Which method would serve the purpose?
A. Modify the column using the ALTER TABLE ... MODIFY command.
B. Add a UNIQUE constraint to the column using the ALTER TABLE ... ADD CONSTRAINT command.
C. Add a NOT NULL constraint to the column using the ALTER TABLE ... ADD CONSTRAINT command.
D. Add a PRIMARY KEY constraint to the column using the ALTER TABLE ... ADD CONSTRAINT command.

149:
你有一个ORDERS表有下面的结构:
Name  Null?  Type
----------- -------- ------------------
OID          NUMBER(6)
ODATE        DATE
CCODE        NUMBER(6)
OAMT         NUMBER(10,2)
表中ODATE列每行都有数据。许多订单发生在一天。你需要确保ODATE列必须包含未来每个订单的数据。
哪种方法能达到目的?

A.        修改列使用ALTER TABLE …MODIFY命令
B.        添加一个UNIQUE约束在列上使用ALTER TABLE … ADD CONSTRAINT命令
C.        添加一个NOT NULL约束在列上使用ALTER TABLE …ADD CONSTRAINT命令
D.        添加一个主键约束在列上使用ALTER TABLE …ADD CONSTRAINT命令

答案:A
为保证ODATE列必有数据,可以添加一个NOT NULL约束,添加非空约束使用alter table modify,其它的约束使用alter table add constraint
参考官方文档:
http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_objects.htm#TDDDG191

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-4-20 16:28 , Processed in 0.069105 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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