D: 错误, COMMIT_WAIT= FORCE_WAIT(默认值),控制事务提交实时写redo日志,与题意不符
5: Your database is open and the LISTENER listener is running. The new DBA of the system stops
the listener by using the command:
LSNRCTL> STOP
What happens to the sessions that are presently connected to the database instance?
A.The sessions are able to perform only queries.
B.The sessions are not affected and continue to function normally.
C.The sessions are terminated and the active transactions are rolled back.
D.The sessions are not allowed to perform any operations till the listener is started.
Correct Answers: B
已连接的会话,当停止监听时不会中断
6: You executed this command to create a temporary table:
SQL> CREATE GLOBAL TEMPORARY TABLE report_work_area (startdate DATE, enddate
DATE, class CHAR(20)) ON COMMIT PRESERVE ROWS;
Which statement is true about the rows inserted into the REPORT_WORK_AREA table during a
transaction?
A.The rows stay in the table only until session termination.
B.The rows stay in the table only until the next transaction starts on the table.
C.The rows are visible to all current sessions after the transaction is committed.
D.The rows stay available for subsequent sessions after the transaction is committed.
Correct Answers: A
Oracle数据库除了可以保存永久表外,还可以建立临时表temporary tables。这些临时表用来保存一个会话SESSION的数据,或者保存在一个事务中需要的数据。当会话退出或者用户提交commit和回滚rollback事务的时候,临时表的数据自动清空,但是临时表的结构以及元数据还存储在用户的数据字典中。
2.详细介绍
Oracle临时表分为会话级临时表和事务级临时表。
会话级临时表是指临时表中的数据只在会话生命周期之中存在,当用户退出会话结束的时候,Oracle自动清除临时表中数据。
事务级临时表是指临时表中的数据只在事务生命周期中存在。当一个事务结束(commit or rollback),Oracle自动清除临时表中数据。
临时表中的数据只对当前Session有效,每个Session都有自己的临时数据,并且不能访问其它Session的临时表中的数据。因此,临时表不需要DML锁。
当一个会话结束(用户正常退出 用户不正常退出 ORACLE实例崩溃)或者一个事务结束的时候,Oracle对这个会话的表执行 TRUNCATE 语句清空临时表数据.但不会清空其它会话临时表中的数据.
你可以索引临时表和在临时表基础上建立视图.同样,建立在临时表上的索引也是临时的,也是只对当前会话或者事务有效. 临时表可以拥有触发器. 3.建立临时表
临时表的定义对所有会话SESSION都是可见的,但是表中的数据只对当前的会话或者事务有效.
7: In which of the scenarios will the DBA perform recovery? (Choose all that apply.)
选项
A.The alert log file is corrupted.
B.A tablespace is accidentally dropped.
C.One of the redo log members is corrupted.
D.A database user terminates the session abnormally.
E.The hard disk on which the data file is stored is corrupted.
Correct Answers: B E
A选项alert log 文件的损坏貌似不会影响运行
C选项redo log 文件有备份来着,一个损坏可以复制另外一个改个名字就好了
D选项应该是redo log 在下次启动时会自动同步执行,所以也不需要备份
8: Note the following structures in your database server:
1. Extents
2. OS Blocks
3. Tablespace
4. Segments
5. Oracle Data Block
Which option has the correct arrangement of these structures from the smallest to the largest?
A.2, 5, 1, 4, 3
B.1, 2, 3, 4, 5
C.5, 2, 1, 3, 4
D.2, 1, 5, 4, 3
Correct Answers: A
这个记住即可
9: You are working on an instance started using the SPFILE. You want to move the Flash
Recovery Area of your database to a new location. You want the Flashback log files to be stored in
the new location. Given below are the steps to accomplish the task in random order:
1) Shut down the instance.
2) Change the value of the DB_RECOVERY_FILE_DEST initialization parameter to a new
value.
3) Execute the ALTER DATABASE FLASHBACK OFF command.
4) Start up the instance and mount the database.
5) Execute the ALTER DATABASE FLASHBACK ON command.
6) Open the database.
Select the correct order in which these tasks need to be performed.
A.2, 1, 4, 3, 5, 6
B.1, 4, 3, 2, 6, 5
C.1, 4, 2, 6, 3, 5
D.3, 2, 1, 4, 5, 6
Correct Answers: A
10: A user, who is authenticated externally, logs in to a remote machine and connects to the
database instance. What action would you take to ensure that a user cannot connect to the database
instance by merely logging in to a remote machine?
A.Set REMOTE_OS_ROLES to FALSE.
B.Set the OS_ROLES parameter to FALSE.
C.Set the REMOTE_OS_AUTHENT parameter to FALSE.
D.Set the REMOTE_LOGIN_PASSWORD_FILE parameter to NONE.
Correct Answers: C
C,REMOTE_OS_AUTHENT指定远程客户端是否使用OS_AUTHENT_PREFIX参数的值来授权
D(X). 参数名有误,应为REMOTE_LOGIN_PASSWORDFILE,指定Oracle是否检查口令文件
11: Your database instance is started using the server parameter file (SPFILE). You executed a
command to change the value of the LOG_BUFFER initialization parameter:
ALTER SYSTEM SET LOG_BUFFER=32M SCOPE=BOTH;
What would be the outcome of this command?
A.The command succeeds only if Automatic Memory Management is not enabled.
B.The command succeeds, but you need to restart the database for changes to take effect.
C.The command returns an error because the size of the redo log buffer cannot be changed
dynamically.
D.The parameter value is changed and it comes into effect as soon as space becomes available in
the System Global Area (SGA).
Correct Answers: C
redo log 文件不能被动态改变
12: The database instance is currently using SPFILE. View the Exhibit and examine the error that
you received while running the DB Structure Integrity check.
Given below are the steps to recover from the error in random order:
1. Shut down the instance, if not already done.
2. Copy one of the remaining control files to a new location.
3. Change the value of the CONTROL_FILES initialization parameter to correspond to the
new location of the control files.
4. Start up the database instance to the NOMOUNT stage.
5. Recover the database to the point of failure of the control file.
6. Open the database.
Identify the correct sequence of steps?
A.1, 2, 4, 3, 5, 6
B.2, 4, 3, 5, 6; 1 not required
C.4, 5, 6, 2, 3; 1 not required
D.5, 2, 3, 4; 1 and 6 not required
Correct Answers: A
控制文件丢失的解决办法
13: View the Exhibit and examine the parameters.
User A executes the following command to update the TRANS table:
SQL> UPDATE B.trans SET tr_amt=tr_amt+500 WHERE c_code='C005';
Before user A issues a COMMIT or ROLLBACK command, user B executes the following
command on the TRANS table:
SQL> ALTER TABLE trans MODIFY (tr_type VARCHAR2(3));
What would happen in this scenario?
A.The ALTER TABLE command modifies the column successfully.
B.The DDL operation gets higher priority and transaction for user A is rolled back.
C.The ALTER TABLE command waits indefinitely until user A ends the transaction.
D.The ALTER TABLE command fails after waiting for 60 seconds due to the resource being busy.
Correct Answers: D
不允许在一个表中更新的同时,启用另外一个会话修改表的定义
14: View the Exhibit to examine the details for an incident.
Which statement is true regarding the status of the incident?
A.The DBA is working on the incident and prefers that the incident be kept in the ADR.
B.The incident is now in the Done state and the ADR can select the incident to be purged.
C.The incident has been newly created and is in the process of collecting diagnostic information.
D.The data collection for the incident is complete and the incident can be packaged and sent to
Oracle Support.
Correct Answers: D
答案解析:
ADR (Automatic Diagnostic Repository)
使用Enterprise Manager 支持工作台,可以通过执行以下常规步骤来调查、报告并(在某些情况下)解决问题:
1. 在Enterprise Manager 的“Database(数据库)”主页上,复查严重错误预警。选择一个预警查看详细资料。
2. 分析问题详细信息并查看针对问题所记录的所有意外事件的列表。可显示自动运行的所有健康状况检查的查找结果。
3. (可选)运行附加健康状况检查并调用SQL Test Case Builder,该程序将收集与SQL 问题相关的所有必需数据,并且以Oracle 技术支持能够再现该问题的方式对这些信息进行打包。
4. 使用My Oracle Support 创建一个服务请求并(可选)随问题信息一起记录服务请求号。
5. 调用意外事件打包服务,该服务可以对收集到的有关某个问题的所有诊断数据进行打包,可以选择将这些数据上载到Oracle 技术支持。上载之前可以对数据进行编辑,删除敏感信息。
6. 可以在支持工作台中维护一份服务请求的活动日志。可运行Oracle 指导以帮助修复SQL 故障或损坏的数据。
7. 为一个、一些或所有意外事件设置状态,以便关闭问题。
15: User A executes the following command to drop a large table in your database:
SQL> DROP TABLE trans;
While the drop table operation is in progress, user B executes the following command on the same
table:
SQL> DELETE FROM trans WHERE tr_type='SL';
Which statement is true regarding the DELETE command?
A.It fails to delete the records because the records are locked in SHARE mode.
B.It deletes the rows successfully because the table is locked in SHARE mode.
C.It fails to delete the records because the table is locked in EXCLUSIVE mode.
D.It deletes the rows successfully because the table is locked in SHARE ROW EXCLUSIVE
mode.
Correct Answers: C
share lock mode 大家都能查询,都不能进行DML操作,但是EXCLUSIVE就是有一个session可以进行DML操作,独占式,ROW SHARE 和ROW EXCLUSIVE 是对应的行级别的锁, SHARE ROW EXCLUSIVE允许其它的session查询或者用select for update 来锁定记录,但是不允许其它session获取SHARE锁
强弱程度
EXCLUSIVE > ROW SHARE EXCLUSIVE > SHARE > ROW EXCLUSIVE > ROW SHARE
16: Which is the correct description of a pinned buffer in the database buffer cache?
A.The buffer is currently being accessed.
B.The buffer is empty and has not been used.
C.The contents of the buffer have changed and must be flushed to the disk by the DBWn process.
D.The buffer is a candidate for immediate aging out and its contents are synchronized with the
block contents on the disk.
Correct Answers: A
Buffer States
The database uses internal algorithms to manage buffers in the cache. A buffer can be in any of the following mutually exclusive states:
-
Unused
The buffer is available for use because it has never been used or is currently unused. This type of buffer is the easiest for the database to use.
-
Clean
This buffer was used earlier and now contains a read-consistent version of a block as of a point in time. The block contains data but is "clean" so it does not need to be checkpointed. The database can pin the block and reuse it.
-
Dirty
The buffer contain modified data that has not yet been written to disk. The database must checkpoint the block before reusing it.
Every buffer has an access mode: pinned or free (unpinned). A buffer is "pinned" in the cache so that it does not age out of memory while a user session accesses it. Multiple sessions cannot modify a pinned buffer at the same time.
The database uses a sophisticated algorithm to make buffer access efficient. Pointers to dirty and nondirty buffers exist on the same least recently used (LRU) list, which has a hot end and cold end. A cold buffer is one that has not been recently used. A hot buffer is frequently accessed and has been recently used.
17: View the Exhibit.
Which statements are true regarding the USERS tablespace? (Choose all that apply.)