052 217题库(个人整合翻译版)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

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
Answer: C
答案解析:
这个是属于实例恢复,实例恢复不需要DBA的干预。

Oracle DB 会自动从实例故障中进行恢复。

实例所需要做的就是正常启动。

如果Oracle Restart 已启用并且配置为监视该数据库,则该启动操作会自动进行。

实例会装载控制文件,然后尝试打开数据文件。

如果实例发现数据文件在关闭期间尚未同步,则会使用重做日志组中包含的信息将数据文件前滚到关闭时的状态,此时利用的重做日志信息即是自最后一次检查点以来所有的重做信息。

然后,将打开数据库,并回退所有未提交的事务处理。

2.Examine the command:
SQL>ALTER USR skd ACCOUNT LOCK; 将skd用户锁定后会发生啥?选俩
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
--SYS可访问skd的对象B错误,C正确
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 login--只是不能连接到数据库,但密码没有过期,也没有强制要求改变密码,错误。

Answer: AC
3.For which database operation would you need the database to be in the MOUNT state?
什么数据库操作需要使数据库出于mount状态?
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 设置数据库为归档模式或非归档模式
Answer: E
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.这个作业被终止,
剩下的统计信息的搜集将在下次维护窗口打开的时候继续搜集。

Answer: D
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?
将测试DB中APPS用户的所有对象移动到生产DB的DB_USR模式下,使用哪个IMPDP 选项完成这个任务?
A. FULL
B. SCHEMAS
C. TRANSFORM
D. REMAP_SCHEMA
E. REMAP_TABLESPACE
Answer: D
答案解析:
REMAP_SCHEMA提供原有的FROMUSER/TOUSER功能,可用于更改对象所有权。

实现不同用户之间的数据迁移。

例如:
impdp system/123456 schemas=scott directory=mydc dump=scott.dmp remap_schema=scott:bob --导入scott模式到bob模式
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?
用该命令在DB Server上创建一个口令文件,下面哪句是描述该口令文件含义的?
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
Answer: C
答案解析:
远程连接,则使用口令文件来验证授权用户。

如果已配置口令文件,则首先检查此文件。

使用Database Configuration Assistant 创建数据库时,口令文件是区分大小写的。

如果从早期数据库版本进行升级,请确保用于远程连接的口令文件区分大小写:
orapwd file=orapworcl entries=5 ignorecase=N
7.Which two statements are true regarding the MRKT tablespace? (Choose two.)
下列哪两个选项对MRKT tablespace的描述是正确的?
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.
BIGFILE只能有一个数据文件。

A对
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. Answer: AC
答案解析:
1、BIGFILE只能有一个数据文件。

A对
2、ALTER DATABASE DEFAULT TABLESPACE MRKT;设置默认表空间,以后用户创建的数据都会放在这个表空间里。

C对。

3、创建BIGFILE时,oracle自动创建本地管理表空间和自动段空间管理(ASSM)。

B错
Oracle Database automatically creates a locally managed tablespace with automatic
segment space management.
4、正在使用的默认表空间不能被drop。

D错。

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.
SKD用户仅被授予CONNECT and RESOURCE角色
The database administrator (DBA) grants MGR_ROLE to the user SKD by executing the command: SQL> GRANT MGR_ROLE TO SKD WITH ADMIN OPTION;
DBA用上面的SQL语句授予SKD用户MGR_ROLE角色,下面对SKD用户被授予此角色后的
描述哪句正确?
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 正确,可以授权给MGR_ROLE给别的用户,但不能把MGR_ROLE里面的权限如create user 授权给别的用户。

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
Answer: A
答案解析:
B错误,可以级联回收,可以回收不是SKD自己授予的。

C错误,The user SKD can grant the privileges in the MGR_ROLE role to other users。

根据A答案,SKD不能将MGR_ROLE角色里的权限给别的用户。

D错误,也可以回收权限。

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;
执行从DB的mount状态到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
Answer: AB
答案解析:
数据库操作正常意味着实例已启动、数据库已装载且已打开。

在数据库操作正常时,任何有效用户都可连接到数据库,而且可执行典型数据访问操作。

打开数据库过程包括执行以下任务:
• 打开数据文件
• 打开联机重做日志文件
如果尝试打开数据库时任一数据文件或联机重做日志文件不存在,则Oracle 服务器返回错误。

在最后这个阶段,Oracle 服务器会验证是否可以打开所有数据文件和联机重做日志文件,还会检查数据库的一致性。

如有必要,系统监视器(SMON) 后台进程将启动实例恢复。


以在受限模式下启动数据库实例,以便只让有管理权限的用户使用该实例。

要在受限模式下启动实例,可在“Advanced Startup Options(高级启动选项)”页上选择“Restrict access to database(限制对数据库的访问)”选项。

或者在启动Open模式时,添加restrict关键字:startup restrict,
设置或取消受限状态:alter system enable\disable restricted session;
命令:
sys@TEST0924> alter database open;
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.)
上面创建表的SQL语句产生什么影响?选俩
A. A CHECK constraint is created on the OID column.
B. A NOT NULL constraint is created on the OID column.
一个非空约束被创建在OID列上
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
默认情况下,users是用户创建对象默认的表空间,所以创建的表和索引都放在users表空间里。

E. The ORDERS table is created in the USERS tablespace and a unique index is created on the OID column in the SYSTEM tablespace.
Answer: BD
答案解析:
A。

在oid 列上不是check约束,是主键约束。

B。

在oid 列上有主键约束,主键约束包含唯一约束和非空约束,故正确。

C。

因为在oid 列上有主键索引,故会自动创建唯一索引,故对象不只ORDERS 表,还有一个索引。

D。

默认情况下,users是用户创建对象默认的表空间,所以创建的表和索引都放在users表空间里。

E。

ORDERS 被创建在USERS表空间,唯一性索引页被创建在USERS表空间,而不是SYSTEM 表空间。

所以选BD.
11.Which two statements are true about Shared SQL Area and Private SQL Area? (Choose two.) 对shared SQL Area 和Private SQL Area来说下列那两条是正确的?
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
Answer: AF
答案解析:
shared SQL area:An area in the shared pool that contains the parse tree and execution plan for a SQL statement. Only one shared SQL area exists for a unique statement.
A cursor is a name or handle to a specific private SQL area.cursors are closely associated with private SQL areas。

private SQL area:An area in memory that holds a parsed statement and other information for processing. The private SQL area contains data such as bind
variable values,query execution state information, and query execution work areas.
The client process is responsible for managing private SQL areas. The allocation and deallocation of private SQL areas depends largely on the application, although the number of private SQL areas that a client process can allocate is limited by the initialization parameter OPEN_CURSORS.
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
一个用户的临时表就放在当前用户的临时表空间中,创建临时表后并不产生任何 segments
分配,与普通表不同,正确。

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
在临时表中,DML锁永远不需要,正确。

Answer: ACE
答案解析:
在临时表中可以创建索引、视图及触发器,还可以使用“Export and Import(导出和导入)”或“Data Pump(数据泵)”导出和导入临时表的定义。

但是,即使使用了ROWS 选项,也不会导出数据。

B,可以用 export 和 import 工具导入导出临时表的定义和数据,错误,不能导出临时表数据。

D,被插入临时表的数据能被其他会话访问,错误。

临时表中的数据是基于一个会话或者一个事务的,其他的会话不能访问到。

临时表可专用于事务处理,也可专用于会话。

对于专用于事务处理的临时表而言,数据存在于事务处理期间;对于专用于会话的临时表而言,数据存在于会话期间。

在这两种情况下,会话插入的数据专用于会话。

每个会话仅可查看和修改自己的数据。

因此,临时表的数据从不会获得DML 锁。

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
Answer: BD
答案解析:
在“View and Manage Failures(查看和管理故障)”页上单击“Advise(建议)”按钮后,数据恢复指导会生成一个手动核对清单。

可显示两种类型的故障。

• 需要人工干预的故障:例如,未插入磁盘电缆的连接故障。

• 可通过撤消以前的错误操作快速修复的故障:例如,如果错误地重命名了数据文件,则与从备份启动RMAN 还原相比,将该文件重命名回以前的名称可以更快地进行修复。

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.
Answer: AC
答案解析:
从下图可以看出,一个数据文件只能属于一个表空间。

而数据文件和extent也是一对一的,即是说数据文件不能跨区,但可以跨段。

15.Which two statements are true regarding a tablespace? (Choose two.)
对于一个tablespace来说下列哪两条正确?
A. It can span multiple databases
B. It can consist of multiple data files
一个表空间可以由多个数据文件组成
C. It can contain blocks of different files
D. It can contains segments of different sizes
一个表空间可以有很多大小不同的段
E. It can contains a part of nonpartitioned segment
Answer: BD
答案解析:
数据库被划分为多个“表空间”,表空间是可用于将相关逻辑结构组合在一起的逻辑存储单元。

每个数据库在逻辑上都分为一个或多个表空间。

对每个表空间均显式创建一个或多个数据文件,每个数据文件只属于一个表空间,表空间在物理上将所有逻辑结构的数据都存储在表空间中。

注:还可以创建大文件表空间,这种表空间只有一个文件。

此文件通常非常大,其大小可达到行ID 体系结构允许的最大大小。

此最大大小是表空间的块大小乘以236,即,如果块大
小为32 KB,则最大大小为128 TB。

传统的小文件表空间(默认值)通常包含多个数据文件,但这些文件不能很大。

从以下可知道,在users表空间中,有很多段,并且段的大小不一样。

16.Which two statements are true regarding Oracle Data Pump? (Choose two.)
下列哪两句对Oracle数据泵的描述是正确的?
A.EXPDP and IMPDP are the client components of Oracle Data Pump
expdp和IMPDP、是Oracle数据泵的客户端组件
B. DBMS_DATAPUMP PL/SQL packages can be used independent of the DATA Pump clients dbms_datapump PL/SQL包可以被当做独立的数据泵客户端
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
E. EXPDP and IMPDP use the procedures provided by DBMS_METADATA to execute export and import
commands
Answer: AB
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: I nternal 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)."
Answer: 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(已完成)”消息和一个时间戳写入预警日志中。

18.Which two statements are true about alerts? (Choose two.)
对于预警下列说法哪两句正确?
A. Clearing an alert sends the alert to the alert history
清空预警条件后,会自动清空这些预警。

有状态预警显示在
DBA_OUTSTANDING_ALERTS中,清空后会转到DBA_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
服务器生成的预警对应于一些数据库时间,不会自动去解决,而是通知管理员去解决。

Answer: AD
答案解析:
服务器生成预警分为两种类型:阈值预警和非阈值预警。

大多数服务器生成的预警是通过对数据库度量设置警告阈值和严重阈值来配置的。

可为120 多个度量定义阈值,这些度量包括:
• 每秒的物理读取次数
• 每秒的用户提交次数
•SQL 服务响应时间
除了表空间的空间占用率度量与数据库相关外,其它度量都与实例相关。

阈值预警又称为“有状态预警”,清空预警条件后,会自动清空这些预警。

有状态预警显示在
DBA_OUTSTANDING_ALERTS中,清空后会转到DBA_ALERT_HISTORY。

服务器生成的其它预警对应于特定的数据库事件,如ORA-*错误、“快照太旧”错误、“恢复
区空闲空间过少”和“可恢复会话被挂起”等。

这些都不是基于阈值的预警,又称
为“无状态预警”。

无状态预警会直接转到历史记录表。

只在Database Control 环境中,清空无状态预警才有意义,因为Database Control 会在自身的资料档案库中存储无状态预警。

服务器生成的预警对应于一些数据库时间,不会自动去解决,而是通知管理员去解决。

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?
检查数据库实例上执行的下列步骤:第5步之后下面哪个选项是正确的?
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 Oracle系统权限不具有级联收回的功能。

HR创建的表保留,并且还可创建新表
D. The table created by HR remains and HR can grant the CREATE TABLE system privilege to other users
Answer: C
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.
因为加了PURGE,回收站里没有相关信息,无法使用flashback drop恢复
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. ORDERS表中的依赖完整性约束被删除了
E. The table definition of the ITEM table and associated indexes are placed in the recycle bin. Answer: AD
答案解析:
指定CASCADE CONSTRAINTS语句是指删除所有的参照完整性约束包括主键约束和唯一性约束。

如果不指定此语句,则参照完整性约束还存在,drop table时会返回一个错误。

指定PURGE,意味着在drop table的同时也释放了和它相关联的空间。

如果指定PURGE,
那么数据库不会将表和它相关联的对象放置到回收站。

flashback drop是基于回收站的,如果回收站里没有相关信息,则无法恢复。

You cannot roll back a DROP TABLE statement with the PURGE clause, nor can you recover the table if you have dropped it with the PURGE clause.
在drop table指定purge时,不能rollback,也不能恢复。

Using this clause is equivalent to first dropping the table and then purging it from the
recycle bin. This clause lets you save one step in the process. It also provides enhanced
security if you want to prevent sensitive material from appearing in the recycle bin.
使用这条语句,相当于先drop表,然后清空回收站。

如果你想防止敏感材料出现在回收站中使用purge后清空材料,提供了增强的安全性。

21.View the Exhibit and examine the privileges granted to the SL_REP user.
查看示例并检查授予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
SL_REP user有grant any object privilege权限,肯定执行成功了..
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
Answer: A
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?
创建一个report_work_area临时表,向该临时表插入行哪句正确?
A.The rows stay in the table only until session termination
ON COMMIT PRESERVE ROWS :指定插入行的生存期为会话的持续时间
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 Answer: A
答案解析:
下列子句控制着行的生存期:
• ON COMMIT DELETE ROWS :指定插入行的生存期仅为事务处理的持续时间
• ON COMMIT PRESERVE ROWS :指定插入行的生存期为会话的持续时间
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
BFILE 二进制文件,存储在数据库外的操作系统文件,只读的。

把此文件当二进制处理。

(类似于long类型)
D. LONG RAW
Answer: C
24.The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedure to many database users:
HR用户创建如下的独立过程,并将该过程的执行特权授予多个数据库用户:
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?
用户有执行procedure 的权限以至于能够把记录插入到DEPARTMENTS,即使这些用户没有插入DEPARTMENTS表的权限。

你希望只有能够插入DEPARTMENTS表的数据的那些用户执行procedure 成功。

有什么建议来实现?
A. Create the procedure with definer's right.
B. Create the procedure with invoker's right.
以调用程序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.
Answer: B
答案解析:
PL/SQL 还提供的数据保护功能。

调用方不必知道要读取或处理的数据结构便可进行调用。

另外,调用方不必具有访问这些对象的权限,只需要具有执行PL/SQL 程序的权限就足够了。

可以选择使用另一种模式的权限来调用PL/SQL,这种情况下,调用方必须有权执行调用程序运行期间执行的每个语句。

26.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
调用意外事件打包服务,该服务可以对收集到的有关某个问题的所有诊断数据进行打包,可以选择将这些数据上载到Oracle 技术支持。

上载之前可以对数据进行编辑,删除敏感信息。

Answer: D
答案解析:
使用Enterprise Manager(OEM)支持工作台,可以通过执行以下常规步骤来调查、报告并(在某些情况下)解决问题:
1. 在Enterprise Manager 的“Database(数据库)”主页上,复查严重错误预警。

选择一个预警查看详细资料。

2. 分析问题详细信息并查看针对问题所记录的所有意外事件的列表。

可显示自动运行的所有健康状况检查的查找结果。

3. (可选)运行附加健康状况检查并调用SQL Test Case Builder,该程序将收集与SQL 问题相关的所有必需数据,且以Oracle技术支持能够再现该问题的方式对这些信息进行打包。

4. 使用My Oracle Support 创建一个服务请求并(可选)随问题信息一起记录服务请求号。

5. 调用意外事件打包服务,该服务可以对收集到的有关某个问题的所有诊断数据进行打包,可以选择将这些数据上载到Oracle技术支持。

上载之前能对数据进行编辑,删除敏感信息
6. 可以在支持工作台中维护一份服务请求的活动日志。

可运行Oracle 指导以帮助修复SQL 故障或损坏的数据。

7. 为一个、一些或所有意外事件设置状态,以便关闭问题。

27.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
Answer: C
28.What is the effect of this command?
SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL;
A. One audit record is created for every successful DROP TABLE command executed in the session of SCOTT
B. One audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege to other users
C. One audit record is created for the whole session if user SCOTT successfully drops one or more tables in his session
如果用户scott成功地在其会话中删除一个或多个表,则将为整个会话创建一个审核记录。

D. One audit record is created for every session of any other user in which a table owned by SCOTT is dropped successfully
E. One audit record is created for every successful DROP TABLE command executed by any user to drop tables owned by SCOTT
Answer: C
答案解析:
指定审计选项
SQL 语句审计:AUDIT table;
上面显示的语句可审计影响表的任何数据定义语言(DDL) 语句,包括CREATE TABLE、DROP TABLE和TRUNCATE TABLE等。

也可按用户名或者按成功或失败来设置SQL 语句审计的重点:
SQL> AUDIT TABLE BY hr WHENEVER NOT SUCCESSFUL;
系统权限审计:可用来审计行使的任何系统权限(如DROP ANY TABLE)。

可按用户名或者成功或失败设置审计的重点。

默认情况下,审计设置为BY ACCESS。

每次行使经审计的系统权限时,都会生成一条审计记录。

可选择使用BY SESSION子句将这些记录组成一组,以便每个会话只生成一条记录。

(这样,如果一个用户针对另一个用户的表发出了多条更新语句,则只收集一条审计记录。

)使用BY SESSION子句来限制由于审计系统权限而对性能和存储产生的影响。

系统权限审计(非重点和重点):
AUDIT select any table, create any trigger;
AUDIT select any table BY hr BY SESSION;
对象权限审计:可用来审计关于表、视图、过程、序列、目录和用户定义数据类型的操作。

这种审计类型可按成功或失败设置审计的重点,而且可以按会话或访问权限分组。

与系统权限审计不同,默认情况下,对象权限审计按会话分组。

如果要为每个操作分别生成一条审计线索记录,必须显式指定BY ACCESS。

对象权限审计(非重点和重点):
AUDIT ALL on hr.employees;
AUDIT UPDATE,DELETE on hr.employees BY ACCESS;
29.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?。

相关文档
最新文档