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

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

1

好友

1

主题
发表于 2016-10-13 17:34:13 | 查看: 16597| 回复: 187
1:
The instance abnormally terminates because of a power outage. Which statement is true about redo log files during instance recovery?
A. Inactive and current redo log files are required to accomplish recovery
B. Online and archived redo files are required to accomplish instance recovery
C. All redo log entries after the last checkpoint are applied from redo log files to data files
D. All redo log entries recorded in the current log file until the checkpoint position are applied to data files

1:
实例因为断电异常中止。哪些是关于redo日志在实例恢复期间的正确描述?
A.        Inactive和current状态的redo日志需要完成恢复
B.        Online和Archived日志需要实例恢复
C.        最后一个checkpoint之后的所有redo信息都要应用到数据文件
D.        所有记录在current状态日志中直到检查点位置的redo信息应用于数据文件

答案:C
实例恢复是进程应用记录在online redo log的信息去重建最近一次检查点的之后的变更。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/startup.htm#CNCPT1301
发表于 2016-10-13 17:35:16
2:
Examine the command:
SQL>ALTER USR skd ACCOUNT LOCK;
Which two statements are true after the command is executed? (Choose two.)
A. The SKD user cannot log in to the database instance
B. The objects owned by the SKD user are not accessible to any user
C. The other users can access the objects owned by the SKD user, on which they have access
D. The password for the SKD user expires and the user is forced to change the password at the next log in

2:
检查命令:
SQL>ALTER USR skd ACCOUNT LOCK;
哪两个语句是正确的命令执行之后?(选择两个)
A.        SKD用户不能登录数据库实例
B.        SKD拥有的对象不能被任何用户访问
C.        访问过SKD的用户,可以访问SKD用户拥有的对象
D.        SKD用户的密码过期并且下次登录时强制更改密码

答案:AC
创建两个测试用户SKD和SKD2
SQL> create user SKD identified by oracle;

User created.
SQL> create user SKD2 identified by oracle;

User created.

SKD用户创建测试表
SQL> create table object as select * from dba_objects;

Table created.

使用sys用户给SKD上锁
SQL> alter user SKD account lock;

User altered.

尝试登录SKD用户
SQL> connect SKD/oracle
ERROR:
ORA-28000: the account is locked

Warning: You are no longer connected to ORACLE.
所以A对,D错

使用SKD2用户尝试访问SKD用户的object表
SQL> select owner from SKD.object where rownum < 2;

OWNER
------------------------------
SYS
故B错,C对

回复 显示全部楼层 道具 举报

发表于 2016-10-13 17:35:32
本帖最后由 wangtong 于 2017-2-6 10:43 编辑

3:
For which database operation would you need the database to be in the MOUNT state?
A. Renaming the control files
B. Re-creating the control files
C. Dropping a user in your database
D. Dropping a tablespace in your database
E. Configuring the database instance to operate in the ARCHIVELOG or NOARCHIVELOG modes

3:
数据库在mount状态期间能做什么操作?
A.        重命名控制文件
B.        重建控制文件
C.        删除用户
D.        删除表空间
E.        配置数据库为ARCHIVELOG或NOARCHIVELOG模式

答案:E

ACD需要在数据库处于open状态
B需要数据库处于nomount状态
数据库在mount期间可以执行以下操作:
        启用或禁用redo日志归档选项
        执行完整的数据库恢复

参考文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/start.htm#ADMIN11142

回复 显示全部楼层 道具 举报

发表于 2016-10-13 17:41:34
4:
The job to gather optimizer statistics for objects runs as part of the automatic maintenance window in your database instance. At a certain point of time, the maintenance window closes before the statistics are gathered for all objects. Which statement is true in this scenario?
A. The statistics collection continues until all objects are processed.
B. The job is terminated and the statistics collected are restored to a time before the job started.
C. This produces an error and the statistics collected are locked until the next time that the maintenance window is opened.
D. The job is terminated and the statistics for the remaining objects are collected the next time that the
maintenance window is opened.

4:
收集优化器统计信息的作业作为你数据库实例自动维护窗口的一部分。在一个确定的时间点,自动维护窗口关闭在所有的对象的统计信息收集完成之前。哪句描述是正确的在以下场景?
A.        统计信息收集继续直到所有的对象处理
B.        作业中止并且统计信息收集还原到作业开始的时间点
C.        产生一个错误并且统计信息收集锁住直到下次维护窗口打开
D.        作业中止并且剩余对象的统计信息继续收集在下次维护窗口打开的时候

答案:D

一个作业在你的数据库实例的自动维护窗口中为一些对象正在搜集优化统计信息,在一个特定的时间点,所有对象的统计信息还没有搜集完,维护窗口就关闭了,此时,这个作业被终止,剩下的统计信息的搜集将在下次维护窗口打开的时候继续搜集。

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

回复 显示全部楼层 道具 举报

发表于 2016-10-13 17:41:56
5:
You want to move all objects of the APPS user in the test database to the DB_USR schema of the production database. Which option of IMPDP would you use to accomplish this task?
A. FULL
B. SCHEMAS
C. TRANSFORM
D. REMAP_SCHEMA
E. REMAP_TABLESPACE

5:
你想移动测试库中APPS用户的所有对象到生产数据库的DB_USR用户。哪个IMPDP的选项可以完成这个任务?
A.        FULL
B.        SCHEMAS
C.        TRANSFORM
D.        REMAP_SCHEMA
E.        REMAP_TABLESPACE

答案:D
A是全库导入
B是导入某个用户
C是去掉表空间和存储子句
D是将一个用户导入另一个用户
E 是将数据从一个表空间导入另一个表空间

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

回复 显示全部楼层 道具 举报

发表于 2016-10-14 10:38:42
6:
You executed the following command to create a password file in the database server:
$ orapwd file = orapworcl entries = 5 ignorecase=N
Which statement describes the purpose of the above password file?

A. It records usernames and passwords of users when granted the DBA role
B. It contains usernames and passwords of users for whom auditing is enabled
C. It is used by Oracle to authenticate users for remote database administrator
D. It records usernames and passwords of all users when they are added to OSDBA or OSOPER operating groups

6:
执行下面命令创建一个密码文件
$ orapwd file = orapworcl entries = 5 ignorecase=N
哪些描述是正确的关于上面的密码文件?
A.        当授予DBA角色的时候记录用户的用户名和密码
B.        包含启用了审计的用户的用户名和密码
C.        Oracle用来对远程的数据库管理员进行身份验证
D.        用来记录加入OSDBA或OSOPER组的所有用户的用户名和密码

答案:C
Oracle的口令文件的作用是存放所有sysdba或者sysoper权限连接数据库的用户的口令。
是否使用口令文件,是通过oracle提供的一个参数remote_login_passwordfile来控制的, remote_login_passwordfile有none,shared,exclusive3个值,none表示不使用口令文件, exclusive表示实例独占使用口令文件,也就是各自实例使用单独的口令文件,shared表示多个实例共享一个口令文件。

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

回复 显示全部楼层 道具 举报

发表于 2016-10-14 10:39:03
本帖最后由 wangtong 于 2017-2-6 11:06 编辑

7:
Which two statements are true regarding the MRKT tablespace? (Choose two.)
SQL> CREATE BIGFILE TABLESPACE MRKT
2 DATAFILE '/u01/app/oracle/oradata/orcl/mrkt.dbf' size 10M LOGGING
3 EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TABLESPACE MRKT;
Database altered.

A. No more data files can be added to the tablespace.
B. Segment space is managed by free lists in the tablespace.
C. A user created without being assigned a default tablespace uses this tablespace.
D. The tablespace can be dropped with the current setting with segments present in it.

7:
哪两句关于MRKT表空间的描述是正确的?(选择两个)
SQL> CREATE BIGFILE TABLESPACE MRKT 2 DATAFILE '/u01/app/oracle/oradata/orcl/mrkt.dbf' size 10M LOGGING 3 EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
Tablespace created.
SQL> ALTER DATABASE DEFAULT TABLESPACE MRKT;
Database altered.

A.        不能再添加数据文件到表空间
B.        段空间在表空间中是自由列表管理
C.        创建用户不指定默认表空间将使用这个表空间
D.        表空间可以删除在当前的配置下

答案:AC

BIGFILE只能有一个数据文件,A对
ALTER DATABASE DEFAULT TABLESPACE MRKT;将默认表空间修改成MRKT,C对
创建MRKT的时候,Oracle自动创建本地管理表空间和自动段空间管理(ASSM)。B错
默认表空间不能直接drop,D错

回复 显示全部楼层 道具 举报

发表于 2016-10-14 10:39:52
8:
View the Exhibit and examine the privileges granted to the MGR_ROLE role. The user SKD has been granted the CONNECT and RESOURCE roles only. The database administrator (DBA) grants MGR_ROLE to the user SKD by executing the command:
SQL> GRANT MGR_ROLE TO SKD WITH ADMIN OPTION;
Which statement is true about the user SKD after he/she is granted this role?


A. The user SKD can grant only the MGR_ROLE role to other users, but not the privileges in it
B. The user SKD can revoke the MGR_ROLE only from the users for whom he/she is the grantor
C. The user SKD can grant the privileges in the MGR_ROLE role to other users but not with ADMIN OPTION
D. The user SKD can grant the privileges in the MGR_ROLE role to other users, but cannot revoke privileges from them

8:
观察下面的表并检查赋予MGR_ROLE角色的权限。用户SKD只被授予CONNECT和RESOURCE角色。DBA授权MGR_ROLE给SKD用户使用下面命令:
SQL> GRANT MGR_ROLE TO SKD WITH ADMIN OPTION;
下面哪些描述是正确的关于SKD被授予这个角色之后?
A.        SKD只能授予其他用户MGR_ROLE角色,不能是角色里的权限
B.        SKD只可以从它授予的用户的MGR_ROLE角色
C.        SKD可以授予其他用户MGR_ROLE角色中的权限不使用ADMIN选项
D.        SKD可以授权其他用户MGR_ROLE角色中的权限,但是不能收回权限

答案:A
实验验证
sys@TEST0924> create user SKD identified by SKD;

User created.

sys@TEST0924> grant connect,resource to SKD;

Grant succeeded.

sys@TEST0924> create role MGR_ROLE;

Role created.

sys@TEST0924> grant create role to MGR_ROLE;

Grant succeeded.

sys@TEST0924> grant create user to MGR_ROLE;

Grant succeeded.

sys@TEST0924> grant select any table to MGR_ROLE;

Grant succeeded.
查dba_sys_privs、dba_role_privs,dba_tab_privs三个视图看用户到底有哪些权限
sys@TEST0924>select * from dba_role_privs where  grantee='MGR_ROLE';

no rows selected

sys@TEST0924> select * from role_sys_privs where role='MGR_ROLE';

ROLE                           PRIVILEGE                                ADM
------------------------------ ---------------------------------------- ---
MGR_ROLE                       SELECT ANY TABLE                         NO
MGR_ROLE                       CREATE ROLE                              NO
MGR_ROLE                       CREATE USER                              NO

sys@TEST0924> select * from role_tab_privs where role='MGR_ROLE';

no rows selected

WITH ADMIN OPTION的意思是被授予该权限的用户有权将某个权限(如MGR_ROLE)授予其他用户或角色,取消是不级联的。

sys@TEST0924> GRANT MGR_ROLE TO SKD WITH ADMIN OPTION;

Grant succeeded.

sys@TEST0924> create user user1 identified by test1;

User created.

sys@TEST0924> grant create session to user1;

Grant succeeded.

skd@TEST0924> grant MGR_ROLE to user1;

Grant succeeded.

skd@TEST0924> grant create user to user1;
grant create user to user1
*
ERROR at line 1:
ORA-01031: insufficient privileges
A正确,可以授权给MGR_ROLE给别的用户,但不能把MGR_ROLE里面的权限如create user授权给别的用户。
B错误,可以级联回收,可以回收不是SKD自己授予的。
C错,错误。The user SKD can grant the privileges in the MGR_ROLE role to other users。根据A答案,SKD不能将MGR_ROLE角色里的权限给别的用户。
D,也可以回收权限。
skd@TEST0924> revoke MGR_ROLE from user1;

Revoke succeeded.
1.png

回复 显示全部楼层 道具 举报

发表于 2016-10-14 10:41:09
9:
After performing a clean shut down of the database instance for maintenance, you mount the database and then execute a command to open the database:
SQL> ALTER DATABASE OPEN;
Which two statements are true? (Choose two.)

A. The online redo log files and online data files are opened
B. All the online data files headers are checked for consistency
C. Instance recovery is performed before opening the database
D. The path and existence of all the log file members are checked

9:
执行一次干净的关闭数据库之后,你mount数据库,然后执行下面命令:
SQL> ALTER DATABASE OPEN;
哪两个说法是正确的?(选择两个)
A.        在线redo log和在线数据文件被打开
B.        所有的在线数据文件头检查一致性
C.        实例恢复执行在数据库打开之前
D.        检查所有日志文件成员的路径和存在

答案:AB

打开数据库过程包括执行以下任务:
• 打开数据文件
• 打开联机重做日志文件
如果尝试打开数据库时任一数据文件或联机重做日志文件不存在,则Oracle 服务器返回错误。
在最后这个阶段,Oracle 服务器会验证是否可以打开所有数据文件和联机重做日志文件,还会检查数据库的一致性。如有必要,系统监视器(SMON) 后台进程将启动实例恢复。

回复 显示全部楼层 道具 举报

发表于 2016-10-14 10:41:31
10:
Examine the command that is used to create a table:
SQL> CREATE TABLE orders ( oid NUMBER(6) PRIMARY KEY,
odate DATE, ccode NUMBER (6),
oamt NUMBER(10,2) )
TABLESPACE users;
Which two statements are true about the effect of the above command? (Choose two.)

A. A CHECK constraint is created on the OID column.
B. A NOT NULL constraint is created on the OID column.
C. The ORDERS table is the only object created in the USERS tablespace.
D. The ORDERS table and a unique index are created in the USERS tablespace.
E. The ORDERS table is created in the USERS tablespace and a unique index is created on the OID column in the SYSTEM tablespace.

10:
执行下面命令创建一个表:
SQL> CREATE TABLE orders ( oid NUMBER(6) PRIMARY KEY,
odate DATE, ccode NUMBER (6),
oamt NUMBER(10,2) )
TABLESPACE users;
哪两句是描述正确的(选择两个)?
A.        CHECK约束被创建在OID列上
B.        NOT NULL约束被创建在OID列上
C.        ORDERS表是唯一创建在USERS表空间上的对象
D.        ORDERS表和唯一索引被创建在USERS表空间
E.        ORDERS表被创建在USERS表空间,唯一索引被创建OID列在SYSTEM表空间中

答案:BD

加在OID列上的是主键约束,包含唯一约束和非空约束,A错,B对
因为OID上有主键索引,所以会自动创建唯一索引,也在USERS表空间,CE错,D对

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:03:32
11:
Which two statements are true about Shared SQL Area and Private SQL Area? (Choose two.)

A. Shared SQL Area will be allocated in the shared pool
B. Shared SQL Area will be allocated when a session starts
C. Shared SQL Area will be allocated in the large pool always
D. The whole of Private SQL Area will be allocated in the Program Global Area (PGA) always
E. Shared SQL Area and Private SQL Area will be allocated in the PGA or large pool
F. The number of Private SQL Area allocations is dependent on the OPEN_CURSORS parameter

11:
哪两句是正确的关于共享SQL区和私有SQL区?(选择2个)
A.        共享SQL区被分配在共享池
B.        共享SQL区被分配当启动会话时
C.        共享SQL区总是被分配到大池
D.        私有SQL区总是被分配到PGA
E.        共享SQL区和私有SQL区被分配到PGA或者大池
F.        私有SQL区分配取决于参数OPEN_CURSORS

答案:AF
Shared SQL Area存储着SQL的执行计划等信息,可以被多个session共享,该component存储在SGA中
Private SQL Area 包括绑定变量等信息,每个session的这类信息都不一样,为session所独有(PGA)。且在Private SQL Area 存储一个指向shared SQL area ( SGA )中共享SQL的指针,与OPEN_CURSORS参数相关。

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:04:28
12:
Which three statements are correct about temporary tables? (Choose three.)

A. Indexes and views can be created on temporary tables
B. Both the data and structure of temporary tables can be exported
C. Temporary tables are always created in a user's temporary tablespace
D. The data inserted into a temporary table in a session is available to other sessions
E. Data Manipulation Language (DML) locks are never acquired on the data of temporary tables

12:
哪三句话是正确的关于临时表?(选择3个)
A.        索引和视图可以被创建在临时表
B.        临时的数据和表结构都能被导出
C.        临时表总是创建在临时表空间
D.        在一个会话中插入数据到临时表对另一个会话可用
E.        临时表不需要DML锁

答案:ACE

        在临时表中可以创建索引、视图及触发器,还可以使用“Export and Import(导出和导入)”或“Data Pump(数据泵)”导出和导入临时表的定义。但是,即使使用了ROWS 选项,也不会导出数据。
A,可以对临时表创建索引,视图,触发器,正确
B,可以用 export 和 import 工具导入导出表的定义和数据,错误,不能导出数据。
C,一个用户的临时表就放在当前用户的临时表空间中,创建临时表后并不产生任何 segments分配,与普通表不同,正确。
D,被插入临时表的数据能被其他会话访问,错误。临时表中的数据是基于一个会话或者一个事务的,其他的会话不能访问到。
E,在临时表中,DML锁永远不需要,正确。
临时表可专用于事务处理,也可专用于会话。对于专用于事务处理的临时表而言,数据存在于事务处理期间;对于专用于会话的临时表而言,数据存在于会话期间。在这两种情况下,会话插入的数据专用于会话。每个会话仅可查看和修改自己的数据。因此,临时表的数据从不会获得DML 锁。

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

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:05:25
13:
Which two kinds of failures make the Data Recovery Advisor (DRA) generate a manual checklist? (Choose two.)

A. Failure when no standby database is configured
B. Failure because a data file is renamed accidentally
C. Failure that requires no archive logs to be applied for recovery
D. Failure due to loss of connectivity-for example, an unplugged disk cable

13:
哪两种故障导致DRA产生手动清单?(选择2个)
A.        当没有配置备用数据库时发生故障
B.        因为数据文件意外的重命名导致的故障
C.        因为没有归档日志应用于恢复产生的故障
D.        由于丢失连接导致的故障,例如没插电缆的磁盘
答案:BD

DRA会显示两种类型的故障
        需要人工干预的故障,例如,未插入磁盘电缆的连接故障
        可以通过撤销以前的错误操作快速修复的故障,例如:错误的重命名了数据文件

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

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:05:46
14:
Which two statements correctly describe the relation between a data file and the logical database structures? (Choose two)

A. An extent cannot spread across data files.
B. A segment cannot spread across data files.
C. A data file can belong to only one tablespace.
D. A data file can have only one segment created in it.
E. A data block can spread across multiple data files as it can consist of multiple operating system (OS) blocks.

14:
哪两句是正确的关于描述数据文件和数据库逻辑结构关系?(选择2个)
A.        extent不能跨数据文件
B.        segment不能跨数据文件
C.        一个数据文件只能属于一个表空间
D.        一个数据文件只能创建一个段
E.        一个数据块可以跨多个数据文件,因为它由多个操作系统块组成

答案:AC
Extent不能跨数据文件,segment可以,A错,B对
每个表空间都可以有一个或多个数据文件,但一个数据文件只能属于一个表空间,c对
一个数据文件可以有多个段,并且段能跨数据文件,D错
数据块不能跨数据文件,E错

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

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:06:22
15:
Which two statements are true regarding a tablespace? (Choose two.)

A. It can span multiple databases
B. It can consist of multiple data files
C. It can contain blocks of different sizes
D. It can contains segments of different sizes
E. It can contains a part of nonpartitioned segment


15:
哪两句关于表空间的描述是正确的?(选择两个)
A.        可以跨多个数据库
B.        可以由多个数据文件组成
C.        可以包含不同大小的数据块
D.        可以包含不同大小的段
E.        可以包含非分区段的一部分

答案:BD
表空间在物理上将所有逻辑结构的数据都存储在表空间中。
表空间不能跨数据库,A错
每个表空间都可以有一个或多个数据文件,但一个数据文件只能属于一个表空间,B对
数据库的数据库大小是固定的,C错
段是由一系列的区组成的,而去又是由一系列的块组成的,块的大小是固定的,所以段的大小不固定,D对
非分区段能跨数据文件,但是不能跨表空间,E错
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/logical.htm#CNCPT004

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:06:45
16:
Which two statements are true regarding Oracle Data Pump? (Choose two.)

A. EXPDP and IMPDP are the client components of Oracle Data Pump
B. DBMS_DATAPUMP PL/SQL packages can be used indedendently of the DATA Pump clients
C. Oracle Data Pump export and import operations can be performed only by users with the SYSDBA privilege
D. Oracle Data Pump imports can be done from the export files generated in the Original Export Release 9.x
E. EXPDP and IMPDP use the procedures provided by DBMS_METADATA to execute export and import commands

16:
哪些是正确的关于Oracle Data Pump?(选择两个)
A.        EXPDP和IMPDP是Oracle Data Pump的客户端组件
B.        DBMS_DATAPUMP PL/SQL可以独立Data Pump client之外使用
C.        Oracle Data Pump的导入和导出操作只能由有SYSDBA权限的用户执行
D.        Oracle Data Pump可以导入由9.x版本的Original Export产生的导出文件
E.        EXPDP和IMPDP使用DBMS_METADATA执行导出和导入命令

答案:AB

Data Pump包含三个部分:DBMS_DATAPUMP,DBMS_METADATA,,客户端命令行EXPDP和IMPDP,所以A正确
DBMS_DATAPUMP和DBMS_METADATA都可以独立于Data Pump client使用,B正确

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

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:07:06
17:
Identify the two situations in which the alert log file is updated with 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. Rebuilding an index using ALTER INDEX ... REBUILD fails with an error "ORA-01578: ORACLE data block corrupted (file # 14, block @ 50)."
F. Rebuilding an index using ALTER INDEX .... REBUILD fails with an error "ORA-01578: ORACLE data block corrupted (file #14, block #50)."

17:
鉴别两种情况下告警日志更新细节。(选择两个)
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.        重建索引使用ALTER INDEX ... REBUILD失败,报"ORA-01578: ORACLE data block corrupted (file # 14, block @ 50)."
F.        重建索引使用ALTER INDEX ... REBUILD失败,报"ORA-01578: ORACLE data block corrupted (file # 14, block  # 50)."

答案:AF


每个数据库都有一个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
• 与共享服务器和分派程序进程的功能相关的多个消息和错误
• 自动刷新实体化视图时发生的错误

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:07:29
18:
Which two statements are true about alerts? (Choose two.)

A. Clearing an alert sends the alert to the alert history
B. Response actions cannot be specified with server-generated alerts
C. The nonthreshold alerts appear in the DBA_OUTSTANDING_ALERTS view
D. Server-generated alerts notify the problems that cannot be resolved automatically and require administrators to be notified

18:
哪两个语句是正确的关于告警日志?(选择两个)
A.        清除告警日志发送告警到告警历史
B.        响应动作不会产生指定的服务器告警
C.        阈值警报出现在视图DBA_OUTSTANDING_ALERTS中
D.        服务器告警通知不能自动解决和需要管理员注意的问题

答案:AD

告警有两种,一种是trace和alert文件,一种是Server-Generated Alerts
这道题应该说的是第二种情况
Server-Generated Alerts是数据库产生的一种告警,它可能包括解决这个告警的方法,当告警清除后还会生成通知消息,当问题出现或者没有匹配到期望的阈值的时候就会自动生成告警,这些阈值都是可以定义的,比如
1.每秒的物理读
2.每秒的用户提交
3.sql服务响应时间
一些没有基于阈值的比如
1.快照太旧
2.恢复会话挂起
3.恢复区的使用
A:正确,当告警清除后会从DBA_OUTSTANDING_ALERTS删除,并且在DBA_ALERT_HISTORY中添加
B:错误,会产生
C:错误,一些没有基于阈值的也会警报
D:正确,发现的问题不会自动处理,需要DBA人工干预
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/monitoring.htm#ADMIN11247

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:07:51
19:
Examine the following steps performed on a database instance:
1. The DBA grants the CREATE TABLE system privilege to the SKD user with ADMIN OPTION
2. The SKD user creates a table
3. The SKD user grants the CREATE TABLE system privilege to the HR user
4. The HR user creates a table
5. The DBA revokes the CREATE TABLE system privilege from SKD
Which statement is true after step 5 is performed?

A. The table created by SKD is not accessible and SKD cannot create new tables
B. The tables created by SKD and HR remain, but both cannot create new tables
C. The table created by HR remains and HR still has the CREATE TABLE system privilege
D. The table created by HR remains and HR can grant the CREATE TABLE system privilege to other users

19:
检查下面在数据库实例执行的步骤:
1.        DBA授予SKD用户CREATE TABLE权限使用ADMIN OPTION
2.        SKD用户创建一个表
3.        SKD用户授予CREATE TABLE系统权限给HR用户
4.        HR用户创建一个表
5.        DBA收回SKD的CREATE TABLE系统权限

哪些语句是正确的上述5步执行之后?
A.        SKD创建的表是不可访问的并且SKD不能创建新表
B.        SKD和HR创建的表仍然在,但都不能创建新表
C.        HR创建的表存在且HR仍然有CREATE TABLE系统权限
D.        HR创建的表存在且HR可以授予其它用户CREATE TABLE系统权限

答案:C
SKD创建的表是可以访问的,但是不能创建新表,A错
系统权限的收回不是级联的,所以不会影响HR用户的权限,HR可以创建新表,B错,C对
SKD授予HR权限时没有使用with admin option,故HR用户不能授予其他用户权限,D错

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

回复 显示全部楼层 道具 举报

发表于 2016-10-17 11:08:09
本帖最后由 wangtong 于 2017-3-22 16:10 编辑

20:
You execute this command to drop the ITEM table, which has the primary key referred in the ORDERS table:
SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE;
Which two statements are true about the effect of the command? (Choose two.)

A. No flashback is possible to bring back the ITEM table.
B. The ORDERS table is dropped along with the ITEM table.
C. The dependent referential integrity constraints in the ORDERS table are disabled.
D. The dependent referential integrity constraints in the ORDERS table are removed.
E. The table definition of the ITEM table and associated indexes are placed in the recycle bin

20:
执行下面命令删除ITEM表,主键被ORDERS表参照:
SQL> DROP TABLE scott.item CASCADE CONSTRAINTS PURGE;
哪些语句是正确的关于上述命令的影响?(选择两个)
A.        不能使用flashback找回ITEM表
B.        ORDERS表随ITEM表一起删除
C.        ORDERS表的参照性完整约束失效
D.        ORDERS表的参照性完整约束删除
E.        ITEM的表定义和相关的索引被放到回收站

答案:AD
由于使用了PURGE,不会讲表和相关的对象放入回收站,因此flashback不能用,A对,E错
指定CASCADE CONSTRAINTS 语句是指删除所有的参照完整性约束包括主键约束和唯一性约束。
如果不指定此语句,则参照完整性约束还存在,drop table时会返回一个错误。C错,D对
B错误,如果想实现这个需要级联删除,
alter table order_status2 add constraint order_status2_modified_by_fk modified_by references
employees(employee_id) on delete cascade;
--使用了on delete cascade语句,用于删除父表一条记录的时候,子表记录也要删除
         alter table order_status2 add constraint order_status2_modified_by_fk modified_by references
employees(employee_id) on delete set null;
--这里使用了on delete set null语句,当父表删除的时候,子表记录就会设置为空

参考文档:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9003.htm#SQLRF01806

回复 显示全部楼层 道具 举报

发表于 2016-10-18 09:58:16
21:
View the Exhibit and examine the privileges granted to the SL_REP user. The EMP table is owned by the SCOTT user. The SL_REP user executes the following command:
SQL> GRANT SELECT ON scott.emp TO hr;
Which statement describes the outcome of the command?


A. The command executes successfully
B. The command produces an error because the EMP table is owned by SCOTT
C. The command produces an error because SL_REP has the GRANT ANY OBJECT PRIVILEGE without ADMIN_OPTION
D. The command produces an error because SL_REP does not have the SELECT privilege with GRANT_OPTION on the EMP table

21:
查看下图并检查授予SL_REP用户的权限。EMP表的拥有者是SCOTT用户。SL_REP用户执行下面的命令:
SQL> GRANT SELECT ON scott.emp TO hr;
哪些关于输出结果的命令是正确的?
A.        命令执行成功
B.        命令产生一个错误因为EMP表的拥有者是SCOTT
C.        命令产生一个错误因为SL_REP用户GRANT ANY OBJECT PRIVILEGE没使用ADMIN_OPTION
D.        命令产生一个错误因为SL_REP没有SELECT权限在EMP表上

答案:A
A对,因为SL_REP用户拥有GRANT ANY OBJECT PRIVILEGE权限,所以可以授予别的用户SELECT权限
下面是实验
1、创建SL_REP用户
create user SL_REP identified by 123;

2、授予相应的权限
grant connect,resource to SL_REP;
grant grant any object privilege to SL_REP;

3、执行上面的命令
SQL> GRANT SELECT ON scott.emp TO hr;
Grant succeeded.

1.png

回复 显示全部楼层 道具 举报

发表于 2016-10-18 09:59:15
22:
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 in committed
D. The rows stay available for subsequent sessions after the transaction is committed

22:
执行下面命令创建一个临时表:
SQL> CREATE GLOBAL TEMPORARY TABLE report_work_area
( startdate DATE,
enddate DATE,
class CHAR(20)
) ON COMMIT PRESERVE ROWS;
哪些语句是正确的关于一个事务中,在表REPORT_WORK_AREA中插入行?
A.        表中的行保持直到会话中止
B.        表中的行保持直到下个事务开始
C.        事务提交后行是可见的对所有当前会话来说
D.        事务提交后行依旧可用对后续会话

答案:A
因为使用了ON COMMIT PRESERVE ROWS;即指定插入行的生存期为会话的持续时间
ON COMMIT DELETE ROWS :指定插入行的生存期仅为事务处理的持续时间

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

回复 显示全部楼层 道具 举报

发表于 2016-10-18 09:59:41
23:
You want to access employee details contained in flat files as part of the EMPLOYEE table. You plan to add a new column to the EMPLOYEE table to achieve this. Which data types would you use for the new column?

A. CLOB
B. BLOB
C. BFILE
D. LONG RAW


23:
你想把包含在平面文件中的员工详细信息作为EMPLOYEE表的一部分。你打算添加一个新的列实现。哪种数据类型你需要使用在新的列?
A.        CLOB
B.        BLOB
C.        BFILE
D.        LONG RAW

答案:C
CLOB字符型大对象。一般存储大数量文本信息。存储单字节,固定宽度的数据。
BLOB二进制大对象。存储在数据库里的大对象,一般是图像声音等文件。
BFILE二进制文件,存储在数据库外的操作系统文件,只读的。把此文件当二进制处理。
LONG RAW 为未加工的可变长二进制数据,最长2G(不建议使用)

回复 显示全部楼层 道具 举报

发表于 2016-10-18 09:59:58
24:
The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many database users:
CREATE OR REPLACE PROCEDURE create_dept ( v_deptno NUMBER, v_dname VARCHAR2, v_mgr NUMBER, v_loc NUMBER)
BEGIN
INSERT INTO hr.departments VALUES (v_deptno, v_dname, v_mgr, v_loc);
END;
The users having permission to execute the procedure are able to insert records into the DEPARTMENTS table even though they do not have the INSERT privilege on the table. You want only those users who have privileges on the DEPARTMENTS table to be able to execute the procedure successfully. What would you suggest to the PL/SQL developers to achieve this?

A. Create the procedure with definer's right.
B. Create the procedure with invoker's right.
C. Grant the EXECUTE privilege with GRANT OPTION on the procedure to selected users.
D. Create the procedure as part of a PL/SQL package and grant the EXECUTE privilege on the package to selected users.

24:
HR用户创建一个标准存储过程并授予EXECUTE权限给数据库用户:
CREATE OR REPLACE PROCEDURE create_dept ( v_deptno NUMBER, v_dname VARCHAR2, v_mgr NUMBER, v_loc NUMBER)
BEGIN
INSERT INTO hr.departments VALUES (v_deptno, v_dname, v_mgr, v_loc);
END;

用户拥有权限执行过程也能够插入记录到DEPARTMENTS表,即使它没有INSERT表的权限。你想拥有DEPARTMENTS表权限的用户能成功执行过程。你建议PL/SQL开发人员如何实现?
A.        创建过程使用definer身份
B.        创建过程使用invoker身份
C.        使用GRANT OPTION授予EXECUTE权限给选择的用户
D.        创建过程作为包的一部分并且授予package EXECUTE权限给选择的用户

答案:B
A: 错误,应创建调用者权限,而不是定义者权限
B: 正确
C: 错误,默认是以定义者权限创建存储过程,那么有execute权限就可以向部门表insert数据 不能实现需求grant option权限是指可以把存储过程权限授权给其它人
D: 错误,存储过程可单独创建,不需要放到包里,这样也不能实现题里的需求

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:00:52
25:
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

25:
查看图表检查incident的详细信息。哪些语句是正确的关于incident的状态?
A.        DBA正在处理incident并且更喜欢将incident保存在ADR中
B.        Incident现在处于Done状态并且ADR可以选择清理incident
C.        Incident被新建并且正在收集诊断信息
D.        Incident收集信息已经完成并且可以被打包发送给Oracle Support

答案:D
使用Enterprise Manager 支持工作台,可以通过执行以下常规步骤来调查、报告并(在某些情况下)解决问题:
1. 在Enterprise Manager 的“Database(数据库)”主页上,复查严重错误预警。选择一个预警查看详细资料。
2. 分析问题详细信息并查看针对问题所记录的所有意外事件的列表。可显示自动运行的所有健康状况检查的查找结果。
3. (可选)运行附加健康状况检查并调用SQL Test Case Builder,该程序将收集与SQL 问题相关的所有必需数据,并且以Oracle  技术支持能够再现该问题的方式对这些信息进行打包。
4. 使用My Oracle Support  创建一个服务请求并(可选)随问题信息一起记录服务请求号。
5. 调用意外事件打包服务,该服务可以对收集到的有关某个问题的所有诊断数据进行打包,可以选择将这些数据上载到Oracle  技术支持。上载之前可以对数据进行编辑,删除敏感信息。
6. 可以在支持工作台中维护一份服务请求的活动日志。可运行Oracle  指导以帮助修复SQL 故障或损坏的数据。
7. 为一个、一些或所有意外事件设置状态,以便关闭问题

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

http://docs.oracle.com/cd/E11882_01/server.112/e10897/problems.htm#ADMQS12110
2.png

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:01:18
26:
What can you achieve by implementing reverse key index?

A. Reverse the bytes of each column indexed including the row ID
B. Store a bitmap for each key value instead of a list of row IDs in the leaf node
C. Prevent contention on the highest leaf block when using sequences to generate keys
D. Remove repeated key values from the index to fit more index entries in a given amount of disk space

26:
你可以通过反向键索引实现什么?
A.        反转每个索引列的字节包括row ID
B.        存储每个键值的位图代替叶节点的一系统row ID
C.        避免争用最高的叶子块当使用序列产生键值时
D.        删除重复的索引键值适合更多的索引条目在给定数量的磁盘空间

答案:C
A改变的是字符顺序,不是列顺序
B描述的是bitmap index
C正确
D Remove repeated key values 可以尝试用函数索引 substr()达到

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

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:01:55
27:
You executed the following command to perform a backup of the USERS tablespace:
SQL> ALTER TABLESPACE users BEGIN BACKUP;
ALTER TABLESPACE users BEGIN BACKUP
*
ERROR at line 1:
ORA-01123: cannot start online backup;
media recovery not enabled
What could be the reason for this error?

A. The MTTR Advisor is disabled.
B. The database is in NOARCHIVELOG mode.
C. The tablespace is already in backup mode.
D. The Flash Recovery Area is not configured.

27:
执行下面的命令备份USERS表空间
SQL> ALTER TABLESPACE users BEGIN BACKUP;
ALTER TABLESPACE users BEGIN BACKUP
*
ERROR at line 1:
ORA-01123: cannot start online backup;
media recovery not enabled
什么导致整个错误
A.        MTTR Advisor禁用
B.        数据库处于NOARCHIVELOG模式
C.        表空间已经处于备份模式
D.        Flash Recovery Area没有配置

答案:B
对数据库进行热备,必须处于归档模式。
出现这个报错是因为数据库没有开归档,所以B对

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:02:49
28:
Which statements listed below describe the data dictionary views?

1. These are stored in the SYSTEM tablespace
2. These are the based on the virtual tables
3. These are owned by the SYS user
4. These can be queried by a normal user only if O7_DICTIONARY_ACCESSIBLILITY parameter is set to TRUE
5. The V$FIXED_TABLE view can be queried to list the names of these views
A. 1 and 3
B. 2,3 and 5
C. 1,2, and 5
D. 2,3,4 and 5

28:
下列哪些语句描述的是数据字典视图?
1.        存储在SYSTEM表空间
2.        基于虚拟表
3.        SYS用户拥有
4.        可以被正常的用户查询,只要O7_DICTIONARY_ACCESSIBLILITY参数设置为TRUE
5.        V$FIXED_TABLE可以被查询列出这些视图的名字

A. 1和3
B. 2,3和5
C. 1,2和5
D. 2,3,4和5

答案:A
1,3它们都被存在system表空间以及owner都是sys用户
2动态性能视图以基于数据库服务器内部的内存结构构建的虚拟表为基础
4 O7_DICTIONARY_ACCESSIBILTY设置为TRUE,则如果用户授予了如select any table等权限,即使不是dba或sysdba用户也可以访问数据字典。设置为FLASE,则普通用户不能访问
5 V$FIXED_TABLE只能查询动能性能视图所有的名称。

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:04:30
29:
View the Exhibit to examine the error that occurred during the database startup. You opened an RMAN session for the database. To repair the failure, you executed the following command as the first RMAN command:
RMAN> REPAIR FAILURE;
Which statement describes the consequence of this command?



A. The command performs the recovery and closes the failure
B. The command only displays the advice and the RMAN script required for recovery
C. The command executes the RMAN script to repair the failure and remove the entry from the Automatic Diagnostic Repository (ADR)
D. The command produces an error because the ADVISE FAILURE command was not executed before the REPAIR FAILURE command

29:
查看图表查看数据库启动期间发生的错误。你打开一个数据库的RMAN会话。去修复这个故障,你执行下面的命令作为第一个RMAN命令:
RMAN> REPAIR FAILURE;
哪个语句描述命令的结果?

A.        命令执行recovery并且关闭故障
B.        命令只显示建议和恢复需要的RMAN脚本
C.        命令执行RMAN脚本修复故障并从ADR删除信息
D.        命令产生一个错误因为ADVISE FAILURE命令没有在REPAIR FAILURE之前执行

答案:D
执行步骤
list failure
advise failure
repair failure
change failure
ADR(automatic diagnostic repository) 自动诊断存储库,ADR提供了大量新的信息以及新的工具以方便数据库管理
3.png

回复 显示全部楼层 道具 举报

发表于 2016-10-18 10:05:45
30:
You plan to move data from a flat file to a table in your database. You decide to use SQL*Loader direct path load method to perform this task. The table in which you plan to load data in an important table having various integrity constraint defined on it. Which constraints will remain enabled by default during this operation? (Choose all that apply.)

A. CHECK
B. UNIQUE
C. NOT NULL
D. PRIMARY KEY
E. FOREIGN KEY

30:
你打算从平面文件移动数据到你的数据库。你决定使用SQL*Loader直接路径加载方法来执行该任务。你打算加载数据的重要表上定义的有各种完整性约束。哪些约束将默认启动在这个操作期间?(选择所有适用的)
A.        CHECK
B.        UNIQUE
C.        NOT NULL
D.        PRIMARY KEY
E.        FOREIGN KEY

答案:BCD
4.png

回复 显示全部楼层 道具 举报

发表于 2016-10-18 17:16:05
谢谢解释

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:40:10
31:
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 the SHARE mode
B. It deletes the rows successfully because the table is locked in the SHARE mod
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

31:
用户A执行下面的命令删除数据库中的大表:
SQL> DROP TABLE trans;
当删除表操作正在进行时;用户B执行下面的命令在相同的表;
SQL> DELETE FROM trans WHERE tr_type='SL';
哪些语句是正确的关于DELETE命令?
A.        删除记录失败因为记录被锁处于SHARE模式
B.        删除行成功因为表被锁处于SHARE模式
C.        删除记录失败因为表被锁处于EXCLUSIVE模式
D.        删除行成功因为表被锁处于SHARE ROW EXCLUSIVE模式

答案:C
当执行alter table,drop table,drop index,truncate table,lock exclusive的时候会造成excluvise锁,因此B错,C对
当执行lock share row exclusive的时候会造成共享排他锁,排除D
当执行insert,update,delete,lock row share的时候会造成行级排他锁,在提交前不允许做dml操作,因此排除A

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

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:48:57
32:
In which situation may the UNDO_RETENTION parameter be ignored, even if it is set to a value?

A. When the data file of the undo tablespace is autoextensible
B. When there are more than one undo tablespace available in the database
C. When the undo tablespace is of a fixed size and retention guarantee is not enabled
D. When the undo tablespace is autoextensible and retention guarantee is not enabled

32:
在什么情况下UNDO_RETENTION参数即使设置了,也不起作用?
A.        当undo表空间的数据文件是自动扩展的时候
B.        当数据库有不只一个undo表空间可用的时候
C.        当undo表空间是固定尺寸且retention guarantee没有启用的时候
D.        当undo表空间是自动扩展且retention guarantee没有启用的时候

答案:C
此题考的是UNDO_RETENTION 即使设置了值,在哪些情况下会忽略。
在固定大小的还原表空间,且没有设置retention guarantee 强制保留,UNDO_RETENTION 就会被忽略。如果设置了retention guarantee ,即使是固定大小的表空间,也不会忽略UNDO_RETENTION,但有可能出现事务失败。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams265.htm#REFRN10225

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:55:21
33:
You perform differential incremental level 1 backups of your database on each working day and level 0 backup on Sunday to tape: Which two statements are true about differential incremental backups? (Choose two.)

A. The backup performed on Sundays contains all the blocks that have ever been used in the database
B. The backup performed on Sundays contains all the blocks that have changed since the last level 1 backup
C. The backup performed on each working day contains all the blocks that have changed since the last level 0 backup
D. The backup performed on Monday contains all the blocks that have changed since the level 0 backup and every other working day contains all the blocks that have changed since the level 1 backup

33:
你在你的数据库工作日执行level 1差异增量备份,在周日执行level 0差异增量备份到磁带上;
哪两句是正确的关于差异增量备份?(选择两个)

A.        每周日执行的备份包括数据库使用过的所有的块
B.        每周日执行的备份包括所有自从上次level 1备份改变的块
C.        工作日执行的备份包括所有自从上次level 0备份改变的块
D.        周一执行的备份包括自从level 0备份改变的块和其它工作日自从level 1备份改变的块

答案:AD
执行增量备份操作时,首先需要的是增量基本备份(incremental base backup),即level 0,今后所有的增量备份都是基于这个基本备份的。
0级增量备份会备份所有曾经在此数据库中使用的块。
从星期一到星期六的每一天,1级增量备份备份最近1或0级增量备份以来所有更改过的块。周一备份周日0级备份以来变化的块,周二备份周一1级备份改变的块,等等。

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

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:55:43
34:
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

34:
你的数据库处于open且LISTENER正在运行。新的DBA停止监听使用命令:
command: LSNRCTL> STOP
现在连接数据库实例会话会发生什么?
A.        会话只能执行查询
B.        会话无影响并且功能正常
C.        会话中止并且活动的事务回滚
D.        会话不允许任何操作直到监听启动

答案:B
当会话连接到数据库,即使停止了监听,也不会影响会话的政策操作
--首先在一个crt窗口连接上数据库
[oracle@wahaha3 ~]$ sqlplus scott/tiger@wahaha3
SQL> select * from dept;
    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
在另外一个crt窗口执行下面命令        
[oracle@wahaha3 admin]$ lsnrctl stop   --停止监听
[oracle@wahaha3 admin]$ lsnrctl status --查看状态
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 27-JUL-2016 22:15:50
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused   
在第一个crt窗口验证是否中断会话
SQL> select * from dept;     --不受影响,执行dml也不受影响
    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON
SQL> exit --退出
[oracle@wahaha3 ~]$ sqlplus scott/tiger@wahaha3  --重新连接,发现无法连接了
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jul 27 22:17:12 2016
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
ERROR:
ORA-12541: TNS:no listener

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:56:07
35:
You are managing an Oracle Database 11g database with the following backup strategy:
1. On Sunday, an incremental level 0 tape backup is performed
2. Monday through Saturday, a cumulative incremental level 1 tape backup is performed

Which two statements are true regarding the backups performed? (Choose two.)

A. The backup performed in step 1 backs up all blocks that have ever been in use in the database
B. The backup performed in step 2 copies all the blocks changed since the most recent level 0 backup
C. The backup performed in step 1 backs up all the blocks changed since the most recent level 1 backup
D. The backup performed in step 2 backs up all blocks that have changed since the most recent incremental backup at level 1

35:
你管理一个Oracle Database 11g数据库使用下面的备份策略:
1.        周日执行一个level 0增量磁带备份
2.        周一到周六,执行一个level 1累积增量磁带备份
哪两句是正确的关于执行备份?(选择两个)
A.        第一步执行的备份会备份所有数据库使用过的数据块
B.        第二步执行的备份拷贝所有自从上次level 0备份改变的数据块
C.        第一步执行的备份会备份自从上次level 1备份改变的数据块
D.        第二步执行的备份会备份自从上次level 1增量备份改变的数据块

答案:AB
此题考查的是增量累积备份
参考33题

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:57:09
36:
View the Exhibit and examine the attributes of an undo tablespace. In an OLTP system, the user SCOTT has started a query on a large table in the peak transactional hour that performs bulk inserts. The query runs for more than 15 minutes and then SCOTT receives the following error:
ORA-01555: snapshot too old
What could be the reason for this error?

A. The query is unable to get a read-consistent image.
B. There is not enough space in Flash Recovery Area.
C. There is not enough free space in the flashback archive.
D. The query is unable to place data blocks in undo tablespace.

36:
查看下图并检查undo表空间的属性。在OLTP系统,用户SCOTT在事务顶峰时期在一个大表启动一个查询执行批量插入。查询运行超过15分钟并且SCOTT收到下面错误:
ORA-01555: snapshot too old
这个错误的原因是什么?
A.        查询不能得到一致性读副本
B.        Flash Recovery Area没有足够的空间
C.        闪回归档没有足够的空间
D.        查询不能放数据块在undo表空间

答案:A
[oracle@ ~]$ oerr ora 1555
01555, 00000, "snapshot too old: rollback segment number %s with name \"%s\" too small"
// *Cause: rollback records needed by a reader for consistent read are
//         overwritten by other writers
// *Action: If in Automatic Undo Management mode, increase undo_retention
//          setting. Otherwise, use larger rollback segments
该错误的意思是,快照太旧了,回滚段太小,
原因:读一致性需要获取其他写用户的回滚段
解决办法:如果是自动undo管理模式,增加undo_retention的设置,否则,使用比较大的回滚段
因此选择A
1.png

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:57:41
37:
Which two operations can be performed on an external table? (Choose two.)

A. Create a view on the table
B. Create an index on the table
C. Create a synonym on the table
D. Add a virtual column to the table
E. Update the table using the UPDATE statement
F. Delete rows in the table using the DELETE command

37:
哪两种操作可以在外部表执行?(选择两个)
A.        在表上创建视图
B.        在表上创建索引
C.        在表上创建同义词
D.        在表上增加一个虚拟列
E.        更新表使用UPDATE语句
F.        删除行使用DELETE命令

答案:AC
参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN12896

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:57:57
38:
Which two statements are true regarding listeners? (Choose two.)

A. Listeners use only the TCP/IP protocol.
B. Multiple listener processes can run simultaneously on a host.
C. Multiple database instances can be registered with a single listener.
D. The listener-related errors can be traced only at the administrative level.
E. Only one database instance can be registered with a single listener at any time.

38:
哪两句是正确的关于监听?(选择两个)
A.        Listener只使用TCP/IP协议
B.        多个linstener进程可以同时运行在一个主机上
C.        多个数据库实例可以在一个监听上注册
D.        Listener相关的错误只能在管理员级别追踪
E.        一个数据库实例只能被一个listener注册在任何时候

答案:BC
A错误,还有IPC
B正确,可以设置不同的端口号,从而启动多个监听
C正确,多个数据库可以注册到同一个监听。
D错误,相关信息会写入到Listener Log File
E和C冲突,错误

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:58:14
39:
You set the following parameters in the parameter file and restarted the database:

MEMORY_MAX_TARGET=0
MEMORY_TARGET=500M
PGA_AGGREGATE_TARGET=90M
SGA_TARGET=270M

Which two statements are true about these parameters after the database instance is restarted? (Choose two.)

A. The MEMORY_MAX_TARGET parameter is automatically set to 500 MB.
B. The PGA_AGGREGATE_TARGET and SGA_TARGET parameters are automatically set to zero.
C. The value of the MEMORY_MAX_TARGET parameter remains zero until it is changed manually.
D. The lower bounds of PGA_AGGREGATE_TARGET and SGA_TARGET parameters are set to 90 MB and 270 MB, respectively.

39:
设置下列参数在参数文件并重启数据库
MEMORY_MAX_TARGET=0
MEMORY_TARGET=500M
PGA_AGGREGATE_TARGET=90M
SGA_TARGET=270M
哪两句是正确的关于这些参数在数据库实例重启之后?(选择两个)
A.        MEMORY_MAX_TARGET参数自动设置为500MB
B.        PGA_AGGREGATE_TARGET 和SGA_TARGET参数自动设置为0
C.        MEMORY_MAX_TARGET参数为0直到手动修改
D.        PGA_AGGREGATE_TARGET 和SGA_TARGET的下限分别是90MB和270MB

答案:AD
设置了MEMORY_TARGET之后,会自动管理sga和pga。
如果只设置了MEMORY_TARGET,没设置MEMORY_MAX_TARGET,则MEMORY_MAX_TARGET会和MEMORY_TARGET相同。故A正确
PGA_AGGREGATE_TARGET和SGA_TARGET分别设置为90M和270M,意味着pga和sga最小不会小于90M和270M,故D正确。

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams143.htm#REFRN10285

回复 显示全部楼层 道具 举报

发表于 2016-10-19 09:58:34
40:
You have issued a SHUTDOWN ABORT command to bring down your database instance. Consider the steps that will be performed later when you open the database:

1. SGA is allocated.
2. Control file is read.
3. Redo log files are opened.
4. Instance recovery is started.
5. Background processes are started.
6. Data file headers are checked for consistency.
7. Server parameter file or the initialization parameter file is read.

Which option has the correct order in which these steps occur?

A. 7, 1, 5, 2, 3, 6, 4
B. 1, 2, 3, 7, 5, 6, 4
C. 7, 1, 4, 5, 2, 3, 6
D. 1, 7, 5, 4, 2, 3, 6

40:
你执行SHUTDOWN ABORT命令关闭数据库实例。考虑打开数据库之的步骤:
1.        分配SGA
2.        读取控制文件
3.        打开日志文件
4.        开始实例恢复
5.        启动后台进程
6.        检查数据文件头一致性
7.        读取spfile或pfile文件

哪个是正确的步骤?
A. 7, 1, 5, 2, 3, 6, 4
B. 1, 2, 3, 7, 5, 6, 4
C. 7, 1, 4, 5, 2, 3, 6
D. 1, 7, 5, 4, 2, 3, 6

答案:A
本题考查的是数据库启动

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

回复 显示全部楼层 道具 举报

发表于 2016-10-20 09:32:01
41:
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 OS_ROLES parameter to FALSE
C. Set the REMOTE_OS_AUTHENT parameter to FALSE
D. Set the REMOTE_LOGIN_PASSWORD_FILE parameter to NONE

41:
一个用户,通过外部认证,登录一个远程机器并连接数据库实例。你采取什么行动才能确保用户仅仅不能通过远程机器连接数据库实例?
A.        设置REMOTE_OS_ROLES为false
B.        设置OS_ROLES为false
C.        设置REMOTE_OS_AUTHENT参数为false
D.        设置REMOTE_LOGIN_PASSWORD_FILE参数为none

答案:C
参数REMOTE_OS_ROLES指定操作系统角色是否被远程客户端允许
参数OS_ROLES定义了是由Oracle还是操作系统来验证和管理每个用户的角色。TRUE表示操作系统管理,FLASE表示Oracle自身验证和管理角色。
参数REMOTE_OS_AUTHENT用来限制外部验证的方式远程数据库验证。FLASE不允许,TRUE代表允许
参数REMOTE_LOGIN_PASSWORD_FILE代表是否使用口令文件验证,NONE是不使用,exclusive独占口令文件,share共享口令文件

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e10575/tdpsg_network_secure.htm#TDPSG60672

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:16:13
42:
Which two statements are true about setting the FAST_START_MTTR_TARGET initialization parameter to a nonzero value? (Choose two.)

A. The MTTR advisor will be disabled
B. Automatic checkpoint tuning will be enabled
C. The value for the LOG_CHECKPOINT_INTERVAL initialization parameter will be override the value for FAST_START_MTTR_TARGET
D. The time taken to recover the instance after the crash is always exactly the same as the value given for the FAST_START_MTTR_TARGET initialization parameter

42:
哪两句是正确的关于设置FAST_START_MTTR_TARGET初始参数为非零值?(选择两个)
A.        MTTR advisor会被禁用
B.        自动检查点调优被启用
C.        初始参数LOG_CHECKPOINT_INTERVAL会被FAST_START_MTTR_TARGET重写
D.        实例崩溃后恢复实例花费的时间总是恰好同FAST_START_MTTR_TARGET初始参数给的值

答案:BC
启用MTTR Advisor需要设置STATISTICS_LEVEL和FAST_START_MTTR_TARGET,故A错
快速启动检查点功能是通过指定所需的非零恢复平均时间(MTTR)值来启用的,该值将用于设置FAST_START_MTTR_TARGET初始化参数。此参数控制数据库对单个实例执行崩溃恢复所花费的时间量。启用快速启动检查点功能时,Oracle将自动保持检查点的速度,已便达到请求的MTTR.如果将该值设置为0,将禁用此功能,故B正确
FAST_START_MTTR_TARGET 会被 LOG_CHECKPOINT_INTERVAL所覆盖,故C正确
D错误,是在所需时间内或在尽量接近此事件的范围内,并不是指定的时间点

参考官方文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40402/initparams090.htm#REFRN10058

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:20:24
43:
You want to create a role to meet these requirements:

1. The role is to be protected from unauthorized usage.
2. The password of the role is not to be embedded in the application source code or stored in a table.

Which method would you use to restrict enabling of such roles?

A. Create the role with external authentication.
B. Create the role as a secure application role.
C. Create the role as a password-protected role.
D. Create a role and use Fine-Grained Access Control (FGAC) to secure the role.

43:
你想创建一个角色有下面这些需求:
1.        创建一个角色防止未授权使用
2.        角色的密码没有嵌入到应用的源码或存储在表里
哪些方法你可以用来限制使用这样的角色?
A.        创建角色使用外部认证
B.        创建角色作为安全应用程序角色
C.        创建角色作为密码保护角色。
D.        创建角色并使用FGAC去保护角色

答案:C
secure application role, 是授予给应用程序用户的数据库角色,通过调用者权限存储过程从数据库表获取角色的口令。
secure application role的口令不是嵌在应用程序中的

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

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:20:54
44:
View the Exhibit and identify the component marked with a question mark.


A. Checkpoint (CKPT)
B. Process Monitor (PMON)
C. Archiver Processes (ARcn)
D. Recoverer Process (RECO)
E. Memory Manager Process (MMAN)

44:
查看下图并鉴别问号标志的组件。

A. Checkpoint (CKPT)
B. Process Monitor (PMON)
C. Archiver Processes (ARcn)
D. Recoverer Process (RECO)
E. Memory Manager Process (MMAN)

答案:A
检查点被记录在控制文件和每个数据文件的文件头。
出现检查点的时候,DBWr会将所有修改的缓冲区内容写到数据文件中
当DBWr需要写入的数据的SCN号大于LGWR记录的SCN号,会触发LGWR写入
故可以知道问好处应为CKPT

参考文档:
http://docs.oracle.com/cd/E11882_01/server.112/e40540/process.htm#CNCPT1246
1.png

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:21:17
45:
Note the following points describing various utilities in Oracle Database 11g:

1. It enables the transfer of data from one database to another
2. It provides a complete solution for the backup, restoration and recovery needs of the entire database
3. It enables the loading of data from an external file into tables of an Oracle Database
4. It provides a tape backup management for the Oracle ecosystem

Which point describes the Oracle Data Pump utility?

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

45:
注意以下几点描述Oracle Database 11g各种功能:
1.        它使数据从一个数据库转移到另一个地方
2.        它提供了一个备份,恢复和恢复整个数据库的完整解决方案
3.        它使数据从外部文件加载到数据库的表
4.        提供了一个Oracle磁带备份管理生态系统

哪一个描述了Oracle Data Pump功能?
A.1
B.2
C.3
D. 4
E. 1 and 3
F. 1, 2, 3 and 4

答案:A
1描述的是数据泵的功能
2是RMAN
3是SQL*Load
4是Oracle Secure Backup

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:21:33
46:
Your database is configured in shared server mode. However, your senior DBA asks you to modify the value of the PRIVATE_SGA limit in the profile of the users.
What could be the reason for this?

A. To limit the User Global Area (UGA) memory allocated to a session from the SGA
B. To limit the amount of memory to be used for the dispatcher queue of a session in SGA
C. To limit the amount of memory to be used for the request pool in System Global Area (SGA)
D. To control the amount of memory allocated in SGA for the local variables for each shared server process

46:
你的数据库配置为共享服务模式。然而,你的高级dba要求你修改PRIVATE_SGA的值限制用户资源。原因可能是什么?
A.        限制从SGA分配给会话的UGA
B.        限制SGA中一个会话中用于调度队列的内存数量
C.        限制SGA中用于request pool的内存数量
D.        控制SGA中分配给每个共享服务进程的本地变量的内存数量

答案:A
在专用服务器模式下,进程和会话是一对一的关系,UGA被包含在PGA中,
在共享服务器模式下,进程和会话是一对多的关系,UGA在大池(Large Pool)中分配。
如果分配失败,如大型池太小,或是根本没有设置大型池,则从共享池(Shared Pool)中分配

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

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:21:54
47:
You used the IMMEDIATE option to shutdown your database instance. Consider the steps that will be performed later when you open the database:
1. SGA is allocated.
2. Control file is read.
3. Redo log files are read.
4. Instance recovery is started.
5. Background processes are started.
6. Data files are checked for consistency.
7. Server parameter file or the initialization parameter file is read.
Which option has the correct order in which these steps occur?

A. 7, 1, 5, 2, 3, 6, 4
B. 1, 5, 7, 2, 3, 6; step 4 is not required
C. 7, 1, 5, 2, 3, 6 step 4 is not required
D. 1, 2, 3, 5, 6, 4; step 7 is not required

47:
你使用IMMEDIATE选项关闭数据库实例。考虑打开数据库需要执行的步骤:
1.        分配SGA
2.        读取控制文件
3.        读取日志文件
4.        开始实例恢复
5.        启动后台进程
6.        检查数据文件一致性
7.        读取spfile或者pfile

哪个选项是正确的关于这些步骤?

A. 7, 1, 5, 2, 3, 6, 4
B. 1, 5, 7, 2, 3, 6; step 4 is not required
C. 7, 1, 5, 2, 3, 6 step 4 is not required
D. 1, 2, 3, 5, 6, 4; step 7 is not required

答案:C
shutdown abort后,再startup,需要用到smon进行实例恢复,而shutdown immediate则不需要进行实例恢复。
参考第40题。

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:22:13
48:
Automatic Shared Memory Management (ASMM) has been enabled for your database instance. The initialization parameters for the components that are managed by ASMM are not set. After observing the effects of ASMM, you executed the following command:

SQL> ALTER SYSTEM SET DB_CACHE_SIZE = 100M;

Which statement is true in this scenario?

A. The minimum memory size for the database buffer cache is set to 100 MB.
B. The maximum memory size that can be obtained by the database buffer cache during ASMM is set to 100 MB.
C. The minimum memory size allocated for a server process in the database buffer cache in dedicated mode is set to 100 MB.
D. The maximum memory size from the database buffer cache that can be released for dynamic distribution during ASMM is set to 100 MB.

48:
你的数据库启用了自动共享内存管理(ASMM)。ASMM管理的组件的初始化参数没有设置。为了观察ASMM的影响,你执行下面命令:

SQL> ALTER SYSTEM SET DB_CACHE_SIZE = 100M;

哪些语句是正确的在这个场景?

A.        数据库buffer cache的最小设置为100MB
B.        在ASMM中数据库buffer cache最大可以获得的内存是100MB
C.        数据库buffer cache在专用模式下分配给一个服务进程最小为100MB
D.        数据库buffer cache动态管理被释放的最大值设置为100MB

答案:A
启用ASMM 之前,应该从 SPFILE 中删除单个内存区参数,因为设置这些参数会使
ASMM 受到限制。看到 ASMM 分配的效果之后,如果决定要调整特定组件的分配值,可
以为这些组件指定值。如果指定的值比目前的值小,这些值将被视为各个组件的最小内存
大小。如果指定的值比目前的值大,那么只要有空闲内存,就可以将内存组件的大小重新
上调至您提供的值。执行此操作会限制可用于自动调整的内存量,但在环境需要对大小进
行特殊调整、而ASMM 又无法满足此需要时,可使用此功能。

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

回复 显示全部楼层 道具 举报

发表于 2016-10-20 10:23:17
49:
Examine the values for the following initialization parameters:
FAST_START_MTTR_TARGET=0
LOG_CHECKPOINT_INTERVAL=0
Which two will be the implications of these values in your database? (Choose two.)

A. The SGA advisor will be disabled
B. The MTTR advisor will be disabled
C. Automatic checkpoint tuning will be disabled
D. Checkpoint information will not be written to the alert log file

49:
检查下面初始化参数的值:
FAST_START_MTTR_TARGET=0
LOG_CHECKPOINT_INTERVAL=0
哪两个将被影响在你的数据库中?(选择两个)
A.        SGA advisor将被禁用
B.        MTTR advisor将被禁用
C.        Automatic checkpoint tuning将被禁用
D.        检查点信息将被写入alert日志中

答案:BC

参考42题

回复 显示全部楼层 道具 举报

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

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

GMT+8, 2024-3-29 21:40 , Processed in 0.069633 second(s), 24 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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