Oracle.1Z0-052-3

一、源题
QUESTION 74
View the Exhibit. You want to create a tablespace to contain objects with block size 16 KB. But while configuring the storage you find that the block size that you can provide is only 8 KB. Which configuration could have enabled the block selection of 16 KB?

image.png

A. Choosing the extent allocation type to uniform
B. Choosing the Segment Space Management option to manual
C. Setting autoextension on for the data file mentioned for the tablespace
D. Setting the DB_16K_CACHE_SIZE parameter for the database instance to a nonzero value
Correct Answer: D
二、题目翻译
查看下表。你想创建一个表空间包含16KB块大小的对象。但是当配置存储的时候你发现你只能提供8KB块大小。哪些配置可以让你选择使用16KB?
A. 选择extent分配类型为uniform
B. 选择段空间管理方式为手动
C. 设置表空间涉及的数据文件为自动扩展
D. 设置数据库实例参数DB_16K_CACHE_SIZE为非零值

答案:D
三、题目解析

  1. 9i之后可以使用多种块大小,首先使用一个标准的数据块,然后最多可以定义4种其他的数据块,值为2的n次方,范围是2~32(这里也就5种)
  2. 使用其他块大小的时候,必须首先设置 db_nk_cache_size 的大小
SQL> show parameter k_cache_size
NAME                                 TYPE        VALUE
db_16k_cache_size                    big integer 0
db_2k_cache_size                     big integer 0
db_32k_cache_size                    big integer 0
db_4k_cache_size                     big integer 0
db_8k_cache_size                     big integer 0

首先应该设置这里对应的值,这里需要注意的是与数据库块大小相同的不能设置
create tablespace cache_size datafile 'cache_size_001.dbf' size 16M BLOCKSIZE 16K; --这里的16k必须先设置db_16k_cache_size

  1. 标准数据库大小用于系统表空间和临时表空间
  2. 数据块的内容和参数
    i.块头
    存储数据块的地址、表目录、行目录和事务槽,头部从上往下增长
    ii.数据区
    位于数据块的底部,当插入行的时候从下向上增长
    iii.空闲区
    位于中间,最初始是连续的,当删除和插入后导致碎片化,smon会进行合并空闲区的操作
    5.手工数据块的管理
    i.插入操作的时候,oracle将保留数据块15%的空闲空间,为将来的更新做准备
    ii.当空闲区小于15%的时候,oracle将该数据从空闲队列(freelists)中去掉
    iii.如果删除或修改造成了数据行的缩小,虽然大于了15%,但是使用的空间大于30,因此还是不能插入
    iv.只有当小于30(pctused),该数据块才可以重新放入空闲队列中

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

一、源题
QUESTION 75
You are installing Oracle Database 11g on a machine. When you run the installer, the Universal Installer (OUI) shows the message that says one of the product-specific prerequisite checks has failed:

Checking available swap space requirements ... 
Expected result: 1512MB 
Actual Result: 1018MB
Check complete. 
The overall result of this check is: Failed <<<< Problem: The system does not have the required swap space.

What happens to the installation in this situation?
A. It can be continued.
B. It resizes the swap space automatically when you proceed further.
C. It can be continued, but the instance cannot be started without increasing the swap space.
D. It shows a message saying one or more prerequisite checks have failed and the installation cannot proceed.
Correct Answer: A
二、题目翻译
你正在机器上安装Oracle Database 11g。当你运行安装,Universal Installer (OUI)显示消息一项检查没有通过:

Checking available swap space requirements ... 
Expected result: 1512MB 
Actual Result: 1018MB
Check complete. 
The overall result of this check is: Failed <<<< Problem: The system does not have the required swap space.

这种情况下安装发生了什么问题?
A. 可以继续安装
B. 进一步执行会自动调整SWAP空间大小
C. 可以继续,但是实例不能启动,如果不增加swap空间
D. 消息显示一个或多个先决条件检查失败,安装无法继续进行

答案:A
三、题目解析
1512M是期望值,不是必须达到的值,一般主要达到150M,就可以安装,选择A

一、源题
QUESTION 76
Which two statements about the background process of the database writer are true? (Choose two.)
A. It is possible to have multiple database writers in an Oracle instance.
B. It writes dirty buffers, if any, to data files whenever a checkpoint occurs.
C. It writes dirty buffers, if any, to data files whenever a transaction commits.
D. It writes dirty buffers, if any, to data files before the log writer (LGWR) writes.
Correct Answer: AB
二、题目翻译
哪两个语句是正确的关于数据库写的后台进程是正确的?(选择两个)
A. 可能有多个数据库写在一个数据库实例中
B. 如果发生检查点时,它会写脏缓冲区到数据文件
C. 如果发生事务提交,它会写脏缓冲区到数据文件
D. 在发生LGWR之前,它会写脏缓冲区到数据文件

答案:AB
三、题目解析
虽然对于大多数系统来说,一个数据库写进程(DBW0) 已经足够,但如果系统需要频繁修改数据,则可以配置附加进程(DBW1到DBW9以及DBWa到DBWj)以改进写性能(A正确,可以有很多个dbwr进程)。
DBWR触发条件

  1. 产生检查点
  2. 脏数据缓冲区达到阀值 默认 10%
    3.扫描整个data buffer没有空闲data buffer 中包含脏的和未脏的优先写脏数据列表 再写未脏块
  3. timeout 超时,如果DBWR没事做 会被每三秒唤醒一次去巡检 写不写不一定
  4. 表级别的truncate 或 drop 也会触发数据写
  5. 修改表空间的 read only
  6. 做表空间的offline (离线)
  7. 热备份 begin backup 命令

LGWR 触发条件:
1.用户进程提交事务处理时
2.重做日志缓冲区的三分之一已满时
3.重做日志缓冲区达到1M的redo条目
4.在DBWn进程将经过修改的缓冲区写入磁盘(如果需要)之前
5.每隔3 秒

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

一、源题
QUESTION 77
The TRANS_SUMMARY table contains product-wise transaction details that get updated with every transaction in the system. Each row has cumulative transaction details of a single product and every product is identified by a product code, which is the primary key. As part of the archival process, the company wants to transfer the rows in the TRANS_SUMMARY table to the TRANS_SUMMARY_DUP table at the end of every quarter of the year. Along with existing products, the company deals with many new products during every quarter. Which method is best suited for this quarterly data transfer?
A. Using the MERGE command
B. Using the SQL*Loader utility
C. Using the correlated UPDATE command
D. Using the INSERT command to perform bulk operation
Correct Answer: A

二、题目翻译
TRANS_SUMMARY表包含生产方面的事务细节如系统中的每笔交易。每一行累积记录单个产品的交易细节并且每个产品使用产品码也就是主键来鉴别。作为归档的一部分过程,公司想在每年的季度末转移TRANS_SUMMARY表的行到TRANS_SUMMARY_DUP表。随同现有的产品,公司在每季度期间交易很多新产品。哪种方法是最适合这个季度数据传输的?
A. 使用MERGE命令
B. 使用SQL*Load功能
C. 使用相关的UPDATE命令
D. 使用INSERT命令执行批量操作

答案:A
三、题目解析
使用MERGE命令可在一个命令中执行UPDATE 和INSERT 。可将一个源中的数据合并到另一个源,因而可选择插入新行和更新特定列(如果行已经存在)。
这道题的意思是将TRANS_SUMMARY里的数据合并到TRANS_SUMMARY_DUP表里,如果TRANS_SUMMARY_DUP有存在的产品,则保留,如果是新产品,则插入。

一、源题
QUESTION 78
Which two statements are true regarding a PL/SQL package body? (Choose two.)
A. It cannot be created without a package specification.
B. It cannot invoke subprograms defined in other packages.
C. It can contain only the subprograms defined in the package specification.
D. It can be changed and recompiled without making the package specification invalid.
Correct Answer: AD
二、题目翻译
哪两句关于PL/SQL包主体的描述是正确的?
A. 没有包定义,不能创建包体
B. 不能调用其他包的子程序
C. 只能包含指定的包中定义的子程序
D. 没有标记指定的包为无效的时候可以被修改和重新编译

答案:AD
三、题目解析
程序包体:
• 与程序包说明是分开的。因此,可以更改并重新编译程序包体代码,此时不会将与程序包说明相关的其它对象标记为无效。
• 包含程序包说明中定义的子程序的代码。这是负责完成工作的部分。程序包说明表明了如何调用程序包中的子程序;程序包体是代码段。
• 只有在编译了程序包说明之后才能编译程序包体。可以在没有程序包体的情况下创建程序包说明,但不能在没有程序包说明的情况下创建程序包体。
• 通过包装可隐藏代码明细。包装是一个可打乱PL/SQL 源代码的独立程序,所以可不暴露源代码的情况下传送PL/SQL 应用程序。

A,没有包装说明它不能创建。正确。只有在编译了程序包说明之后才能编译程序包体。可以在没有程序包体的情况下创建程序包说明,但不能在没有程序包说明的情况下创建程序包体。
B,它不能调用其他包中定义的子程序。错误,可以调用。
C,它只能包含包说明中定义的子程序。错误,可以调用不在包装包说明的子程序。
D,它可以改变和重新编译,而不使包装规格无效。正确。与程序包说明是分开的。因此,可以更改并重新编译程序包体代码,此时不会将与程序包说明相关的其它对象标记为无效。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/create_package_body.htm#LNPLS01372

一、源题
QUESTION 79
In your database instance, the user sessions are connected to the database server from the remote machines. You want to achieve the following for these users:

  1. The user account must be locked after four unsuccessful login attempts.
  2. The user must be prompted to change the password at regular intervals.
  3. The user may not have more than three simultaneous sessions.
  4. The user session must automatically be logged off if more than 10 minutes elapsed time used.
    How would you accomplish the above?
    A. By assigning profiles for the users
    B. By implementing Fine-Grained Auditing (FGA)
    C. By granting a secure application role to the users
    D. By implementing the Database Resource Manager plan
    Correct Answer: A
    二、题目翻译
    在你的数据库实例中,用户会话从远程机器连接数据库服务器。你想这些用户达到下面:
  5.    用户帐户必须锁定在四次尝试登录失败之后
    
  6.    用户必须被提示定期更改密码
    
  7.    用户不能有超过三个并发会话
    
  8.    用户必须自动注销如果超过10分钟运行时间
    

你将如何完成上述所示?
A. 通过指定用户profile
B. 通过实行Fine-Grained Auditing (FGA)
C. 通过授予一个安全的应用角色给用户
D. 通过实行Database Resource Manager plan

答案:A
三、题目解析
可以通过配置profile来达到限制上面的目标

SQL> select * from dba_profiles where profile='DEFAULT';

PROFILE                        RESOURCE_NAME                    RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT                        COMPOSITE_LIMIT                  KERNEL   UNLIMITED
DEFAULT                        SESSIONS_PER_USER                KERNEL   UNLIMITED
DEFAULT                        CPU_PER_SESSION                  KERNEL   UNLIMITED
DEFAULT                        CPU_PER_CALL                     KERNEL   UNLIMITED
DEFAULT                        LOGICAL_READS_PER_SESSION        KERNEL   UNLIMITED
DEFAULT                        LOGICAL_READS_PER_CALL           KERNEL   UNLIMITED
DEFAULT                        IDLE_TIME                        KERNEL   UNLIMITED
DEFAULT                        CONNECT_TIME                     KERNEL   UNLIMITED
DEFAULT                        PRIVATE_SGA                      KERNEL   UNLIMITED
DEFAULT                        FAILED_LOGIN_ATTEMPTS            PASSWORD 10
DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD 180

PROFILE                        RESOURCE_NAME                    RESOURCE LIMIT
------------------------------ -------------------------------- -------- ----------------------------------------
DEFAULT                        PASSWORD_REUSE_TIME              PASSWORD UNLIMITED
DEFAULT                        PASSWORD_REUSE_MAX               PASSWORD UNLIMITED
DEFAULT                        PASSWORD_VERIFY_FUNCTION         PASSWORD NULL
DEFAULT                        PASSWORD_LOCK_TIME               PASSWORD 1
DEFAULT                        PASSWORD_GRACE_TIME              PASSWORD 7

16 rows selected.

一、源题
QUESTION 80
Observe the information in the columns:

  1. The SGA
  2. The cursor state
  3. User-session data
  4. The stack space
    a. Text and parsed forms of all SQL statements
    b. Run-time memory values for the SQL statement, such as rows retrieved
    c. Security and resource usage information
    d. Local variables for the process
    Which option has the correct match between the memory areas and their contents?
    A. 1-c, 2-b, 3-d, 4-a
    B. 1-b, 2-c, 3-d, 4-a
    C. 1-a, 2-b, 3-c, 4-d
    D. 1-a, 2-b, 3-d, 4-c
    Correct Answer: C

二、题目翻译
观察列中的信息:

  1.    SGA
    
  2.    游标状态
    
  3.    用户会话数据
    
  4.    Stack space
    

a. 所有SQL语句的文本和解析形式
b. SQL语句的运行时间内存值,例如行检索
c. 安全性和资源使用信息
d. 程序的本地变量

哪个选项是正确的关于内存区域和他们的解释?

A. 1-c, 2-b, 3-d, 4-a
B. 1-b, 2-c, 3-d, 4-a
C. 1-a, 2-b, 3-c, 4-d
D. 1-a, 2-b, 3-d, 4-c

答案:C
三、题目解析
本题主要是考察一些概念问题

一、源题
QUESTION 81
You are using Enterprise Manager to schedule backups for your database. Which type of script would be generated by the backup scheduler?
A. XML script
B. PL/SQL script
C. Operating system script
D. Recovery Manager (RMAN) script
Correct Answer: D
二、题目翻译
你正在使用Enterprise Manager调度备份你的数据库。哪种类型的脚本会产生通过备份调度?
A. XML脚本
B. PL/SQL脚本
C. 操作系统脚本
D. RMAN脚本

答案:D
三、题目解析
如果你启用自动备份,Oracle Enterprise Manager调度一个日常备份job使用RMAN备份所有的数据文件到FRA上。

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

一、源题
QUESTION 82
Note the following functionalities of various background processes:

  1. Record the checkpoint information in data file headers.

  2. Perform recovery at instance startup.

  3. Cleanup unused temporary segments.

  4. Free the resources used by a user process when it fails.

  5. Dynamically register database services with listeners.

  6. Monitor sessions for idle session timeout.
    Which option has the correct functionalities listed for a background process?
    A. Archiver Process (ARCn): 1, 2, 5
    B. System Monitor Process (SMON): 1, 4, 5
    C. Process Monitor Process (PMON): 4, 5, 6
    D. Database Writer Process (DBWn): 1, 3, 4
    Correct Answer: C
    二、题目翻译
    注意下面各种各样的后台进程的功能:

  7.    记录检查点信息在数据文件头
    
  8.    执行实例恢复在启动的时候
    
  9.    清除没使用的临时段
    
  10.    用户进程故障时释放用户使用的资源
    
  11.    使用监听动态注册数据库服务
    
  12.    为空闲会话超时监视会话
    

哪个选项是正确的列出的后台进程和它的功能?

A. Archiver Process (ARCn): 1, 2, 5
B. System Monitor Process (SMON): 1, 4, 5
C. Process Monitor Process (PMON): 4, 5, 6
D. Database Writer Process (DBWn): 1, 3, 4

答案:C
三、题目解析

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

一、SMON:系统监控进程
1.主要是已经提交的数据但是还没有进行写入数据文件给断电了,重启的时候,smon就会进行恢复
a.执行前滚,将已经写入重做日志文件但是还没有写入到数据文件中的数据(使用scn号码来识别提交记录的)
b.打开数据库
c.回滚没有提交的事务
2.还可以进行磁盘空间维护工作
a.回收或者合并数据文件中相连的空闲区
b.释放临时段

二、PMON:进程监督进程
1.当某个进程崩溃,PMON将负责进行如下的清理工作
a.回滚用户当前事务
b.释放用户所加的所有表一级和行一级的锁
c.释放用户所有的其他资源等

三、ARCn:归档日志进程
1.当一组重做日志文件写满后,会写另外一组,当最后一组写满后会在写第一组,叫做日志切换
2.如果没有开归档,那么覆盖后就无法进行恢复了
3.如果开了归档,那么就会使用arch进程进行写入归档日志文件中,oracle会确保在一组重做日志的归档操作完成之前不会重新使用该组日志

四、DBWn:数据库写进程
1.11g之前只可以有09,10个进程,11g之后可以有36个,09和a~z,通过 db_writer_processes 来设置个数的,如果启动的时候没有说明个数
那么是由cpu的个数来决定的该参数的
2.当以下情况发生时,DBWR会将高速缓冲区中的数据写入到数据文件中
a.当脏缓冲区的数量超过了所设定的限额
b.所设定的时间间隔已到
c.有进程需要高速缓冲区,但是没有空闲的高速缓冲区空间时候
d.校验(检查点)发生时
e.某个表被删除或者截断(truncate,drop)
f.某个表空间被设置为只读
g.表空间进行联机备份时
h.表空间被设置为脱机时

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

一、源题
QUESTION 83
Which statement is true about a whole consistent database backup on a database running in ARCHIVELOG mode?
A. The backup will consist of used data blocks only.
B. The database must be shut down to accomplish the backup.
C. The backup can be accomplished without shutting down the database.
D. The backup will contain all database files that have never been backed up.
二、题目翻译
哪些语句是正确的关于运行在ARCHIVELOG模式下的一致性数据库备份?
A. 只备份使用过的数据块
B. 数据库必须shutdown来完成备份
C. 备份可以在不shutdown数据库的情况下完成
D. 备份将包含所有的未备份过的数据文件
答案:B
三、题目解析
一致性备份必须在数据库正常关闭的情况下进行,这个时候redo,数据文件和控制文件的scn都是一致的

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

一、源题
QUESTION 84
Which statement is true about the UNDO_RETENTION parameter when retention guarantee is not enabled?
A. It is the time period after which the undo data becomes obsolete.
B. It is the time period after which the committed undo data would be transferred to a temporary tablespace.
C. It is the minimum time period up to which the committed undo data would be retained if free undo space is available.
D. It is the time period after which the undo data is transferred to the Flash Recovery Area to provide read consistency.
Correct Answer: C
哪句是正确的关于UNDO_RETENTION参数在retention guarantee没启用的时候?

A. 它是undo数据变得失效之后的时间
B. 它是提交的undo数据被传输到临时表空间之后的时间
C. 它是undo空间可用的情况下保留提交的undo数据的最小时间
D. 它是undo数据传输到快速闪回区用来提高读一致性所需的时间

答案:C
当 retention guarantee 没有设置时,即undo数据 不强制保留UNDO_RETENTION 所设置的时间内,如果是undo表空间是自动增长,即在足够的空闲空间下,则可能会保留到UNDO_RETENTION 所设置的时间。如果undo表空间是固定的,则UNDO_RETENTION 可能会被忽略,undo数据可能被覆盖。
参考官方文档:
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmflash.htm#BRADV89743

一、源题
QUESTION 85
You have a large amount of historical data in a flat file. Some analysts in your organization need to query this data in the file. The file is too large to load the data in it into your current database. Which is the most effective method to access this data in your database?
A. Use the database link.
B. Use the SQL*Loader utility.
C. Use the Oracle Data Pump utility.
D. Create an external table and leave the data in the flat file.
Correct Answer: D

二、题目翻译
你有大量的历史数据在平面文件中。在你的公司中一些分析师需要查询这个文件中的数据。文件太大对你目前的数据库来说。哪种方法是最有效的去访问数据?
A. 使用database link
B. 使用SQL*Load功能
C. 使用Oracle Data Pump功能
D. 创建一个外部表并保留数据在平面文件中
答案:D
三、题目解析
因为题目中提到文件过大,不能导入到数据库中,故排除BC,又因为数据存在平面文件中,不是数据库文件,故A也不可行。答案选择D,使用外部表来访问

外部表,参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e22490/et_concepts.htm#SUTIL011

QUESTION 86
Which statements are true regarding the creation of an incident package file by using the EM Workbench Support? (Choose all that apply.)
A. You can add SQL test cases to the incident package.
B. You can add or remove the trace files to the package.
C. You cannot create an incremental incident package when the physical files are purged from the ADR.
D. You can create the incremental incident package ZIP file for new or modified diagnostic information for the incident package already created.
Correct Answer: ABD
二、题目翻译
哪些语句是正确的关于使用EM Workbench Support创建一个事件包文件?(选择所有正确的)
A. 你可以在事件包添加SQL测试用例
B. 你可以在事件包添加或移除追踪文件
C. 你不能创建一个增量事件包当物理文件从ADR删除
D. 你可以创建增量事件包压缩文件为新的或修改事件包已经创建的诊断信息。

答案:ABD
三、题目解析
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/diag.htm#CHDFBEAE

一、源题
QUESTION 87
You are managing an Oracle Database 11g database. You want to ensure the recovery of the database to the point of failure. Which configuration will you do to accomplish the task?
A. Multiplex all database files.
B. Configure the Flash Recovery Area.
C. Configure the database instance for ARCHIVELOG mode.
D. Configure the FAST_START_MTTR_TARGET initialization parameter.
Correct Answer: C
二、题目翻译
你正在管理一个Oracle Database 11g数据库。你想确保数据库的时间点恢复。哪些配置你需要做来完成这个任务?
A. 多路复用所有的数据文件
B. 配置Flash Recovery Area
C. 配置数据库实例为ARCHIVELOG模式
D. 配置FAST_START_MTTR_TARGET参数
答案:C
三、题目解析
指定时间点恢复,需要归档日志,所以必须处于归档模式,才能进行恢复,答案选择C

一、源题
QUESTION 88
View the Exhibit and examine the user information.
The user has been granted CONNECT and RESOURCE roles and no individual system privileges. The SL_REP user executes this command to create a table:

SQL> CREATE TABLE orders (
oid number(6), odate date,
ccode number(4), oamt number(10,2)
) TABLESPACE purchase_space;

The PURCHASE_SPACE tablespace already exists in the database.
Which statement describes the effect of the command?

image.png

A. The command executes successfully and creates the table in the USERS tablespace.
B. The command executes successfully and creates the table in the PURCHASE_SPACE tablespace.
C. The command produces an error because the user does not have the privilege to createthe table.
D. The command produces an error because the user does not have quota in the PURCHASE_SPACE tablespace.
Correct Answer: B

查看下表检查用户信息
用户被授予CONNECT和RESOURCE角色并且没有单独的系统权限。SL_REP用户执行这个命令去创建一个表:
SQL> CREATE TABLE orders (
oid number(6), odate date,
ccode number(4), oamt number(10,2)
) TABLESPACE purchase_space;

哪个语句是正确描述这个命令的影响?
A. 命令执行成功并且创建表在USERS表空间
B. 命令执行成功并且创建表在PURCHASE_SPACE表空间
C. 命令执行报错因为用户没有权限创建表
D. 命令执行报错因为用户在PURCHASE_SPACE表空间没有配额

答案:B
RESOURCE角色包含Create Table系统权限,所以可以创建表,创建语句中指定了表空间,故B正确

参考官方文档:
http://docs.oracle.com/cd/E11882_01/network.112/e36292/authorization.htm#DBSEG99936

四、测试

[oracle@oel ~]$ sqlplus / as sysdba
SQL> drop user sl_rep cascade; --删除以前的这个用户

User dropped.
SQL> select name from v$datafile;  --查看目前的数据文件

NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/system01.dbf
/u01/app/oracle/oradata/prod/sysaux01.dbf
/u01/app/oracle/oradata/prod/undotbs01.dbf
/u01/app/oracle/oradata/prod/example01.dbf
/u01/app/oracle/oradata/prod/tbs01.dbf

SQL> create tablespace users datafile '/u01/app/oracle/oradata/prod/users01.dbf' size 400m; --创建users表空间

Tablespace created.

SQL> create user SL_REP identified by oracle account unlock default tablespace users; --创建 SL_REP,并将默认表空间指定为users

User created.

SQL> grant connect,resource to sl_rep; --给sl_rep授权

Grant succeeded.

SQL> create tablespace PURCHASE_SPACE datafile '/u01/app/oracle/oradata/prod/ps01.dbf' size 10m; 创建PURCHASE_SPACE表空间

Tablespace created.

SQL> conn sl_rep/oracle --以sl_rep登陆
Connected.
--可以看到能够创建这个表
SQL> CREATE TABLE orders (  
  2  oid number(6), odate date,
  3  ccode number(4), oamt number(10,2)
  4  ) TABLESPACE purchase_space;

Table created.

一、源题
QUESTION 89
A constraint in a table is defined with the INITIALLY IMMEDIATE clause. You executed the ALTER TABLE command with the ENABLE VALIDATE option to enable the constraint that was disabled. What are the two effects of this command? (Choose two.)
A. It fails if any existing row violates the constraint.
B. It does not validate the existing data in the table.
C. It enables the constraint to be enforced at the end of each transaction.
D. It prevents insert, update, and delete operations on the table while the constraint is in the process of being enabled.
Correct Answer: AD
二、题目翻译
一个表上的约束使用INITIALLY IMMEDIATE子句定义。你执行ALTER TABLE命令使用ENABLE VALIDATE选项去启用被禁用的约束。这个命令的两个影响是什么?(选择两个)
A. 将会失败如果任何现有行违反约束
B. 它不会验证表中已经存在的数据
C. 它会启用约束强制执行在每个事务的末期
D. 阻止在表上的插入、更新和删除操作当约束被启用的时候

答案:AD
三、题目解析
INITIALLY IMMEDIATE表示初始化立即执行,在每条语句执行结束时检验约束
ENABLE VALIDATE表示原有的和新加的数据都必须遵循约束条件
A正确,B错误,ENABLE VALIDATE会验证已经存在的数据是否违反约束
C错,INITIALLY DEFERRED才是事务提交之后检查约束
D正确,会阻止插入、更新和删除操作来保证数据一致性

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

一、源题
QUESTION 90
The session of user SCOTT receives the following error after executing an UPDATE command on the EMP table:
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource
On investigation, you find that a session opened by user JIM has a transaction that caused the deadlock.
Which two statements are true regarding the session of SCOTT in this scenario? (Choose two.)
A. The session is terminated after receiving the error and JIM can continue with his transaction.
B. SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction.
C. The session is rolled back after receiving the error and JIM can continue with his transaction.
D. SCOTT has to reexecute the last command in the transaction after he commits the transaction.
Correct Answer: BD

二、题目翻译
用户SCOTT收到下面错误在EMP表上执行一个UPDATE命令之后:
ERROR at line 1:
ORA-00060: deadlock detected while waiting for resource

经调查,你发现用户JIM打开的会话有一个事务导致死锁
哪两句是正确的关于这个场景下的SCOTT?(选择两个)
A. 会话中止在收到报错之后并且JIM可以继续它的事务
B. SCOTT需要执行一个COMMIT或者ROLLBACK去允许JIM继续它的事务
C. 会话回滚在收到报错之后并且JIM可以继续它的事务
D. SCOTT不得不重新执行事务的最后一个命令在它提交它的事务之后
答案:BD
三、题目解析
死锁是锁定冲突的特殊示例。两个或多个会话等待由对方锁定的数据时,就会发生死锁。因为每个会话都在等待另一个会话释放锁定,所以任何一个会话都不能完成事务处理,也不能解决冲突。Oracle 数据库会自动检测死锁并终止语句,同时显示错误消息。更正这种错误的适当做法是执行提交或回退,这样做会在一个会话中释放任何其它锁定,以便其它会话可继续完成其事务处理。scott必须提交或回退,才能更正检测到的死锁误。如果执行提交,则必须重新提交第二次更新才能完成事务处理。如果执行回退,则必须同时重新提交这两个语句才能完成事务处理。

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

一、源题
QUESTION 91
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.
Correct Answer: ABC
二、题目翻译
检查下面用于修改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

一、源题
QUESTION 92
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 receivean error.
D. The new status of the SALES tablespace is recorded in the control file when the database instance is closed.
Correct Answer: BC
二、题目翻译
你执行下面的命令改变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错

一、源题
QUESTION 93
Identify the two situations in which you use the alert log file in your database to check the details. (Choose two.)
A. Running a query on a table returns "ORA-600: Internal Error."
B. Inserting a value in a table returns "ORA-01722: invalid number."
C. Creating a table returns "ORA-00955: name is already used by an existing object."
D. Inserting a value in a table returns "ORA-00001: unique constraint (SYS.PK_TECHP) violated."
E. Inserting a row in a table returns "ORA-00060: deadlock detected while waiting for resource."
Correct Answer: AE
二、题目翻译
指出那两种日志会出现在数据库告警日志中?
A. 在一个表上查询返回"ORA-600: Internal Error."
B. 在一个表上插入一个值返回"ORA-01722: invalid number."
C. 创建一个表返回"ORA-00955: name is already used by an existing object."
D. 在一个表上插入一个值返回"ORA-00001: unique constraint (SYS.PK_TECHP) violated."
E. 在一个表上插入一行数据返回"ORA-00060: deadlock detected while waiting for resource."
正确答案: AE
三、题目解析
每个数据库都有一个alert_<sid >.log文件。此文件位于数据库所在的服务器中,如果设置了$ORACLE_BASE,则此文件默认存储在$ORACLE_BASE/diag/rdbms/<db_name>/<SID>/trace中。
数据库预警文件是按时间顺序列出消息的日志文件,例如:
• 启动时使用的任何非默认初始化参数
• 已发生的所有内部错误( ORA-600) 、块损坏错误( ORA-1578 ) 和死锁错误( ORA-60 )
• 管理操作,如SQL 语句CREATE 、ALTER、DROP DATABASE 和TABLESPACE,以及Enterprise Manager 或SQL*Plus 语句STARTUP、SHUTDOWN 、ARCHIVE LOG和RECOVER
• 与共享服务器和分派程序进程的功能相关的多个消息和错误
• 自动刷新实体化视图时发生的错误
Oracle DB 使用预警日志来保留这些事件的记录,以此作为在操作员控制台上显示这些信息的替代方法。(许多系统会同时在控制台中显示这些信息。)如果某个管理操作成功完成,系统会将“completed(已完成)”消息和一个时间戳写入预警日志中。

一、源题
QUESTION 94
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.
Correct Answer: BD
二、题目翻译
你工作在一个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开始备份,此时会冻结数据文件文件头。

一、源题
QUESTION 95
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)
Correct Answer: D
二、题目翻译
你设置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

一、源题
QUESTION 96
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;
Correct Answer: ABE

二、题目翻译
用户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锁,锁的是不同的记录

一、源题
QUESTION 97
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.
Correct Answer: ACD
二、题目翻译
哪三个语句是正确的关于Oracle数据库的逻辑结构?(选择三个)
A. 每个段包含一个或多个区
B. 多个表空间可以共用一个数据文件
C. 数据块是数据文件最小的I/O单元
D. 一个数据库中可能有不同的块大小的表空间
E. 数据库中的每个数据块总是和操作系统块保持一致
答案:ACD
三、题目解析
A段是由一个或多个去组成的,故正确
B一个数据文件只能属于一个表空间,一个表空间可以有多个数据文件,错误
C Oracle Data Block是最小的I/O单位,正确
D 可以指定非标准快大小的表空间
E 数据库里的块大小可以和操作系统一致,也可以是其的整倍数,错误

一、源题
QUESTION 98
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.
Correct Answer: CD
二、题目翻译
你正在管理一个Oracle Database 11g数据库。你配置数据库为ARCHIVELOG模式。哪两句是正确的在这个场景?(选择两个)
A. 你必须关闭数据库才能执行备份
B. 你必须为数据库配置Flash Recovery Area
C. 你可以执行完整的数据库备份没有关闭数据库的情况下
D. 在你设置数据库为ARCHIVELOG模式之后,所有之前的相关数据库备份包括控制文件变得无效

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

一、源题
QUESTION 99
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
image.png

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.
Correct Answer: C
二、题目翻译
查看下图检查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 会在自身的资料档案库中存储无状态预警。

一、源题
QUESTION 100
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
Correct Answer: B
二、题目翻译
你有两个数据库服务器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

一、源题
QUESTION 101
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
    Correct Answer: C

二、题目翻译
在一个新安装的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

一、源题
QUESTION 102
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
Correct Answer: AB
二、题目翻译
你为你的数据库配置Flash Recovery Area(FRA)。数据库实例处于ARCHIVELOG模式。默认的归档日志路径是Flash Recovery Area
哪两个文件自动删除如果FRA按照保留策略需要空间?
A. 闪回日志文件
B. 废弃的备份
C. 用户管理的数据文件和控制文件备份
D. 没有备份的归档日志文件有多路复用的备份在不同的归档路径
答案:AB
三、题目解析
快速恢复区的空间管理由备份保留策略控制。保留策略确定文件何时过时,即何时这些文
件对达到数据恢复目标已不再有用。Oracle DB 通过删除不再需要的文件自动管理该存储。

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

一、源题
QUESTION 103
All the database users are presently connected to the database instance and working. The HR user has opened three database sessions and executed the following command in one of his sessions:

SQL> UPDATE persons SET ccode='U031' WHERE ccode='U029'; 
123 rows updated. 
SQL> DELETE FROM persons WHERE exp='Y';
3 rows deleted.

The SYS user opens a new session after HR executed the above commands. Which sessions can see the effect of the UPDATE and DELETE commands?
A. All sessions of the HR user only
B. All sessions of the HR user and the SYS user
C. The session of the HR user that executed the commands
D. All the sessions for which the database users have access privilege to the PERSONS table
Correct Answer: C
二、题目翻译
所有的数据库用户正在连接数据库实例进行工作。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,所以只能执行语句的会话才能看到结果。

一、源题
QUESTION 104
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.
Correct Answer: ACD
二、题目翻译
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
三、题目解析
增大表空间有三种方法:

SQL> create tablespace SMD datafile '/u01/app/oracle/oradata/prod/smd01.dbf' size 1m; 

Tablespace created.
--1、增加一个文件
SQL> ALTER TABLESPACE SMD ADD DATAFILE '/u01/app/oracle/oradata/prod/smd02.dbf' SIZE 1M; 

Tablespace altered.
--2、改变原来数据文件的大小
SQL> ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/prod/smd02.dbf' RESIZE 2M;

Database altered.
--3、设置自动增长
SQL> ALTER TABLESPACE SMD ADD DATAFILE '/u01/app/oracle/oradata/prod/smd03.dbf' SIZE 10M AUTOEXTEND ON NEXT 512K MAXSIZE 250M;

Tablespace altered.

故答案选ACD

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

一、源题
QUESTION 105
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.
Correct Answer: BC
二、题目翻译
哪两句关于检查点的描述是正确的?(选择两个)
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错。

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

一、源题
QUESTION 106
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.
Correct Answer: BC
二、题目翻译
哪两句是正确的关于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

一、源题
QUESTION 107
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?

image.png

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.
Correct Answer: D
二、题目翻译
查看下图。你正在创建一个数据库通过使用Database Configuration Assistant(DBCA)。你选择创建一个一般用途数据库并且在数据库创建期间意识到Block Size field没有启用。
原因可能是什么?
A. 你选择了文件系统作为存储选项
B. 你选择了ASM作为存储选项
C. 数据块大小只能被增大当DBCA从Oracle Universal Installer(OUI)调起
D. 你正在使用一般用途模板而不是普通数据库模板创建数据库
答案:D
三、题目解析
是因为之前创建数据库时,选择的是按照一般目的模板来创建的,故块大小为固定的,不能改。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,088评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,715评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,361评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,099评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 60,987评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,063评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,486评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,175评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,440评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,518评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,305评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,190评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,550评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,880评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,152评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,451评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,637评论 2 335

推荐阅读更多精彩内容