1
32.You perform differential incremental level 1 backups of your database on each working day and level 0 backup on Sundays. Which two statements are true about the 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
A D
incremental备份:每次备份上一次0级备份以来发生的变化.
differential incremental:每次备份是从上一次0级或是1级备份以来发生变化的内容.
累计备份:同级别的备份可以覆盖,而差异是不能覆盖的
Q2.
A. The database instance is running with manual PGA management.
B.The database instance is running with manual shared memory management.
C.The database instance has the MEMORY_TARGET value set to a nonzero value.
D.All sessions are connected to the database instance in dedicated mode, and no RMAN or parallel
query operations have been performed.
MM is set to 100 MB.
Answer: C
答案解析:
参考:053-162题:http://blog.csdn.net/rlhua/article/details/12761583
参考:http://blog.csdn.net/rlhua/article/details/12493791
动态性能视图V$MEMORY_DYNAMIC_COMPONENTS显示所有动态优化的内存组件的当前大小,其中包括SGA 和实例PGA 的总大小。
三次启动的SGA的各个组件大小都一样,是动态变化的,PGA也是动态变化的,所以此数据库是处于自动内存管理即AMM,也即是说MEMORY_TARGET设定为非零值。
Q3.
88. Identify two situations in which you can use Data Recovery Advisor for recovery. (Choose two.)
A.The database files are corrupted when the database is open.
B.The user has dropped an important table that needs to be recovered.
C.The archived redo log files are missing for which the backup is not available.
D.The database is not opening because the required database files are missing.
Answer: AD
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12622415
数据恢复指导可处理以下两种情况:一种是因必需的数据库文件缺失、不一致或损坏而无法启动数据库,另一种是在运行时发现文件损坏。
Q4.
A.Set the constraint to deferred before starting the transaction.
B.Alter the constraint to NOVALIDATE state before starting the transaction.
C.Enable the resumable mode for the session before starting the transaction.
D.Set the COMMIT_WAIT parameter to FORCE_WAIT for the session before starting the transaction.
Answer: A
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_10003.htm#SQLRF55408
你有两个表,它们之间有参照完整性的约束。在同一个事务中,你需要先在子表中插入数据,然后再使父表变为可用。
从图上可知,orders表是子表,它的item_code列参照items表的iitem_code,但是题中是先在子表中插入数据,然后再让父表变为可用,在有外键约束的情况下,这样是不能插入的,所以,可以在执行事务前,设置约束延迟生效,即在事务提交时生效,即可。
Specify DEFERRED to indicate that the conditions specified by the deferrable constraint are checked when the transaction is committed.
The following statement checks three deferred constraints when the transaction is committed. This example fails if the constraints were specified to be NOTDEFERRABLE.
SET CONSTRAINTS emp_job_nn, emp_salary_min ,
hr.jhist_dept_fk@remote DEFERRED;
Q5.
39. Your database is open and users are connected using the LISTENER listener. The new DBA of the system stops the listener by using the following command:
LSNRCTL> STOP
What would happen 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 active transactions are rolled back and the sessions get terminated.
D) The sessions are not allowed to perform any operations till the listener is started.
答案:B
已连接的会话,当停止监听时不会中断
Q6.
176. 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.
Answer: A
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/13015519
下列子句控制着行的生存期:
? ON COMMIT DELETE ROWS :指定插入行的生存期仅为事务处理的持续时间
? ON COMMIT PRESERVE(维持,持续) ROWS :指定插入行的生存期为会话的持续时间
Q7.
scenarios 情节,脚本 corrupted adj. 腐败的;毁坏的;崩溃的
will the DBA perform recovery? (Choose all
B.A tablespace is accidentally dropped
E.The hard disk on which the data file is stored is corrupted.
Q8.
哪个选项的正确安排这些结构从最小到最大?
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?
2 5 1 4 3
如图:Oracle存储模型,逻辑结构在左,物理结构在右。
逻辑结构由大到小
database-->tablespace-->segment-->extent-->oracle data bloc
3 4 1 5 2
可以看出,数据库中的数据都存储在表空间中。表空间即是管理将逻辑数据库设计映射到操作系统物理存储中的一个数据库对象,用于指明数据的物理位置。关于表空间,以后再讨论。
Oracle数据库磁盘存储的逻辑结构为:一个数据库(Database)对应多个表空间(Tablespace),一个表空间对应多个段(Segment),一个段对应多个区(Extent),一个区对应多个数据块(Data Block),真正的数据就保存在数据块中。这里有以下几点需要说明:
1.Oracle中一个数据块的大小默认是2KB(支持2KB,4KB,8KB,16KB,32KB),而DB2中则默认是4KB(支持4KB,8KB,16KB,32KB);
2.Oracle中有段(Segment)的概念,而DB2中没有这一概念,表空间直接是各个容器(数据文件)中的区(Extent)组成,不过也还是有一个很弱化的Extent组概念。下面提到的关于Segment的内容则全部是针对Oracle的;
3.Oracle中的数据块称为Oracle Block,而DB2中则直接称为Data Page(数据页)。
4.Oracle中的Extent称为区,而DB2中则称为扩展数据块。为方便阅读,本文中统称为区。
Q9.
改变FRA
2 1 4 3 5 6 (改变归档地址,关闭实例,打开实例挂载数据库,执行关闭fra,执行打开fra, 打开数据库)
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.
Q10.
34. 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.
Answer: C
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12277557
限制远程数据库验证:默认情况下,REMOTE_OS_AUTHENT参数设置为FALSE。一定不要更改这个设置,除非可确保所有客户机都能适当地验证用户。在引入了安全外部口令存储(在Oracle Database 10g发行版2 中提供)后,允许远程操作系统验证就有了令人信服的理由。
在远程验证过程中:
? 数据库用户通过外部方式来进行验证
? 远程系统验证用户
? 用户登录数据库,不必接受另外的验证
Q11.
SCOPE 中 SPFILE、MEMORY、BOTH 的小小区别
ALTER SYSTEM 中 SCOPE=SPFILE/MEMORY/BOTH 的区别:
SCOPE = SPFILE
The change is applied in theserverparameter file only. The effect is as follows:
■ For dynamic parameters, the change is effective at the next startup and is persistent.
■ For static parameters, the behavior. is the same as for dynamic parameters. This is the only SCOPE specification allowed for static parameters.
(此更改写入初始化参数文件,更改将在下次启动时生效。动态参数与静态参数都一样可以。也是静态参数唯一可以使用的方式。)
SCOPE = MEMORY
The change is applied in memory only. The effect is as follows:
■ For dynamic parameters, the effect is immediate, but it is not persistent because the server parameter file is not updated.
■ For static parameters, this specification is not allowed.
(只在内存上修改,立即生效,但重启后将不再生效,因为并没有写入到初始化参数文件。只适用于动态参数,静态参数则不允许。)
SCOPE = BOTH
The change is applied in both the server parameter file and memory. The effect is as follows:
■ For dynamic parameters, the effect is immediate and persistent.
■ For static parameters, this specification is not allowed.
(既写入到初始化参数文件,也在内存上修改,立即生效。同样也只适用于动态参数,静态参数则不允许。)
C.The command returns an error because the size of the redo log buffer cannot be changed
dynamically.
Q12.
数据库正在运行中控制文件损坏。
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.
A
1,2,4,3,5,6
Q13.
更新的时候改变表结构,失败,等待60秒
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+500WHERE 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?
D.The ALTER TABLE command fails after waiting for 60 seconds due to the resource being busy.
SQL> UPDATE B.trans SET tr_amt=tr_amt+500WHERE c_code='C005';
SQL> ALTER TABLE trans MODIFY (tr_type VARCHAR2(3));
Q14.
Which statement is true regarding the status of the incident?
D.The data collection for the incident is complete and the incident can be packaged and sent to
Oracle Support.
Q15.
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 transWHERE tr_type='SL';
Which statement is true regarding the DELETE command?
C.It fails to delete the records because the table is locked in EXCLUSIVE mode
Q16.
Which is the correct description of a pinned buffer in the database buffer cache?
16:Which is the correct description of a pinned buffer in the database buffer cache?
A.The buffer is currently being accessed.
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.
Answer: A
答案解析:
问题是哪个是正确描述数据库缓冲区高速缓存中的一个固定缓存区(pinned)。
在高速缓存中的缓冲区可以被“钉”在一个固定缓存区中,使之不被老化。
8i以前,db_cache_size,buffer_pool_keep, buffer_pool_recycle这三种buffer cache是独立指定的,互不制约。而8i以后,这三种buffer cache是有相互制约关系的。如果指定了keep和recycle的buffer cache,则default类型的buffer cache的大小就是db_cache_size - buffer_pool_keep - buffer_pool_recycle。
通常将经常访问的对象放入keep类型的buffer cache里,而将不常访问的大表放入recycle类型的buffer cache里。其他没有指定buffer cache类型的对象都将进入default类型的buffer cache里。为对象指定buffer cache类型的方法如下:
Sql>alter system set db_keep_cache_size=500m scope=both;先设置,然后再keep
SQL> create table test (n number) storage (buffer_pool keep) ;
SQL> create table test (n number) storage (buffer_pool keep) cache;
SQL> alter table test storage (buffer_pool recycle);
但事实上,它们之间在管理和内部机制上没有任何的区别。它们仅仅是为DBA们提供了一个选择,就是能够将数据库对象分成“非常热的”、“比较热的”和“不热的”这三种类型。
识别热点对象
select object_type mytype, object_name myname , blocks, count(1) buffers, avg(tch) avg_touches
from sys.x$bh a, dba_objects b, dba_segments s
where a.obj=b.object_id and b.object_name=s.segment_name and b.owner not in('SYS','SYSTEM')
GROUP BY object_name,object_type, blocks,obj
having avg(tch)>5 and count(1)>20;
识别出热点对象后,可以决定将对象隔离放入keep池中
Q17.
Which statements are true regarding the USERS tablespace? (Choose all that apply.)
A.A bitmap is used to record free extents.
B.Free extents information is managed within the tablespace.
C.Free extents information is managed in the SYSAUX tablespace.
D.The data dictionary tables are updated when extents are allocated or deallocated.
Answer: AB
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12572003
SEGMENT SPACE MANAGEMENT AUTO:
段空间管理:本地管理的表空间中的段空间管理方式可指定为:
? 自动:Oracle DB 使用位图管理段中的空闲空间。位图描述了段中每个数据块的状态,该状态与可插入行的块中的空间量有关。当数据块中可用空间增多或减少时,位图中会反映数据块的新状态。通过使用位图,Oracle DB 可以提高管理空闲空间的自动化程度。因此,这种空间管理方式称为“自动段空间管理(ASSM)”。
USERS表空间的SEGMENT MANAGEMENT 为AUTO,也即是说users表空间使用ASSM管理方式,是使用位图管理段中的空闲空间。
? 手动:此方法指定要使用空闲列表来管理段中的空闲空间。空闲列表是由一些数据块组成的列表,这些数据块中有可插入行的空间。由于这种管理段空间的方式需要为在表空间中创建的方案对象指定并优化PCTUSED、FREELISTS和FREELIST GROUPS存储参数,因此这种方式称为“手动段空间管理”。支持使用此方法是为了向后兼容,建议使用ASSM。
Q18.
通过DBCA创建数据库
Which of these requirements can be met while creating the database?
创建数据库时,这些要求中哪一类可以满足?
Configuration Assistant (DBCA).
Some of the requirements set for your database creation task are:
1. Configure the database to operate in shared server mode.
2. Disable automatic maintenance tasks such as optimizer statistics collection.
3. Configure a naming method to help the remote user connect to the database instance.
4. Use Automatic Storage Management (ASM) for storing the database files.
5. Configure daily database backup to flash recovery area.
6. Configure Enterprise Manager Database Control to manage the database.
C.1, 2, 4, 5, and 6
Q19.
72.Examine the following output:
SQL> SELECT index_name,status
FROM dba_indexes
WHERE status='UNUSABLE';
INDEX_NAME STATUS
EIND UNUSABLE
Which two statements about the above index are true? (Choose two.)
A. It is ignored by the query optimizer.
B. It is not used while the index is being rebuilt.
C. The index cannot be rebuilt, and has to be re-created.
D. The index is automatically rebuilt when used the next time.
Answer: AB
dml不维护不可用索引,在进行大量dml操作前可以把索引设为不可用,以增加dml速度,待操作完成再对索引rebult
Q20.
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;
D.The command produces an error because the ADVISE FAILURE command was not executed
before the REPAIR FAILURE command.
要原因是:在运行repairfailure之前,要先运行advise failure,让rman列出错误,并且生成修复脚本,之后运行repair failure修复错误。
Q21.
examine the output for the CROSSCHECK BACKUP command.
. View the Exhibit to examine the output for the CROSSCHECK BACKUP command.
Which statement is true about the output of the command?
B.The backup piece is expired because the operating-system file was not found.
Answer: B
答案解析:CROSSCHECK命令:校验备份信息 EXPIRED. 过期。
参考:http://blog.csdn.net/rlhua/article/details/12617847
Crosscheck (交叉检验):RMAN 可自动删除过时备份,但用户也可使用操作系统命令删除这些备份。如果备份不是使用RMAN 删除的,那么在目录与目录实际内容之间执行交叉检验之前,目录并不知道备份是否缺失。
Q22.
22:What can you achieve by implementing reverse key index?
C.Prevent contention on the highest leaf block when using sequences to generate keys.
反向索引就是将正常的键值头尾调换后再进行存储,比如原值是“1234”,将会以“4321”形式进行存储,这样做可以高效地打散正常的索引键值在索引叶块中的分布位置。
1.反向索引应用场合
1)发现索引叶块成为热点块时使用
通常,使用数据时(常见于批量插入操作)都比较集中在一个连续的数据范围内,那么在使用正常的索引时就很容易发生索引叶子块过热的现象,严重时将会导致系统性能下降。
2)在RAC环境中使用
当RAC环境中几个节点访问数据的特点是集中和密集,索引热点块发生的几率就会很高。如果系统对范围检索要求不是很高的情况下可以考虑使用反向索引技术来提高系统的性能。因此该技术多见于RAC环境,它可以显著的降低索引块的争用。
2.使用反向索引的优点
最大的优点莫过于降低索引叶子块的争用,减少热点块,提高系统性能。
Reversing the key solves the problem of contention for leaf blocks in the right side of a B-tree index
Q23.
23:Which two statements are true regarding undo tablespaces? (Choose two.)
选项
A.The database can have more than one undo tablespace.
C.Undo segments automatically grow and shrink as needed, acting as circular storage buffer for their assigned transactions.
A答案:可以有一个或多个undo表空间,A答案正确。
C答案:原段根据需要可自动增长和收缩,它充当所分配的事务处理的循环存储缓冲区。故正确
Q24.
24: You want to move all objects of the APPS user in the test database to the DB_USER schema of the production database.Which option of IMPDP would you use to accomplish this task?
D.REMAP_SCHEMA
迁移所有对象
Q25.
25: For which database operation would you need the database to be in the MOUNT state?
E.configuring the database instance to operate in the ARCHIVELOG or NOARCHIVELOG
modes
更改归档模式,需要数据库在mount 状态
Q26.
127. 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."
E.Rebuilding an index using ALTER INDEX ...REBUILD fails with an error "ORA-01578: ORACLE data block corrupted (file # 14, block # 50)."
Answer: AE
答案解析:
每个数据库都有一个alert_.log文件。此文件位于数据库所在的服务器中,如果设置了$ORACLE_BASE,则此文件默认存储在$ORACLE_BASE/diag/rdbms///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(已完成)”消息和一个时间戳写入预警日志中。
Q27.
Oracle Data Pump (oracle 数据泵)
从10g开始,Oracle提供更高效的Data Pump(即expdp/impdp)来进行数据的导入和导出,老的exp/imp还可以用,但已经不建议使用。注意:expdp/impdp和exp/imp之间互不兼容,也就是说exp导出的文件只能用imp导入,expdp导出的文件只能用impdp导入。
A.EXPDP and IMPDP are the client components of Oracle Data Pump.
B.DBMS_DATAPUMP PL/SQL packages can be used independently of the Data Pump clients.
Data Pump Components
Oracle Data Pump is made up of three distinct parts:
The command-line clients, expdp and impdp
The DBMS_DATAPUMP PL/SQL package (also known as the Data Pump API)
The DBMS_METADATA PL/SQL package (also known as the Metadata API)
The Data Pump clients, expdp and impdp, invoke the Data Pump Export utility and Data Pump Import utility, respectively.
The expdp and impdp clients use the procedures provided in the DBMS_DATAPUMP PL/SQL package to execute export and import commands, using the parameters entered at the command line. These parameters enable the exporting and importing of data and metadata for a complete database or for subsets of a database.
When metadata is moved, Data Pump uses functionality provided by the DBMS_METADATA PL/SQL package. The DBMS_METADATA package provides a centralized facility for the extraction, manipulation, and re-creation of dictionary metadata.
The DBMS_DATAPUMP and DBMS_METADATA PL/SQL packages can be used independently of the Data Pump clients.
Q28.
. Which two statements are true about the Automatic Database Diagnostic Monitor (ADDM)? (Choosetwo.)
B.The ADDM runs after each AWR snapshot is collected automatically by MMON.
C.The results of the ADDM analysis are stored in the AutomaticWorkload Repository (AWR).
ADDM 在记录每个AWR 快照之后会自动运行(B)。每次记录快照后,ADDM 会分析与最后两个快照对应的时段。ADDM 会预先监视实例,以便在大多数瓶颈问题成为严重问题之前检测到这些问题。多数情况下,ADDM 会为检测到的问题提供建议解决方案,甚至可以量化这些建议的优势。
每次ADDM 分析的结果都存储在AWR (C)中,并可通过Enterprise Manager 进行访问。
ADDM 将考虑对系统的各种更改。其建议可以包括:
? 硬件更改:添加CPU 或更改I/O 子系统配置
? 数据库配置:更改初始化参数设置
? 方案更改:对表或索引进行散列分区,或者使用自动段空间管理(ASSM)
? 应用程序更改:对序列使用高速缓存选项,或使用绑定变量
? 使用其它指导:在高负载SQL 上运行SQL 优化指导或在热对象上运行段指导
Q29.
SQL> ALTER USER skd ACCOUNT LOCK; 锁定用户
A.The SKD user cannot log in to the database instance. 用户不能登录
C.The other users can access the objects owned by the SKD user, on which they have access. 其他用户可以访问,他们有访问权限
Q30.
30: You notice that the performance of the database has degraded because of frequent checkpoints.
Which two actions resolve the issue? (Choose two.)
题意问,怎么解决因频繁的发生检查点而降低了数据库的性能
B.Check the size of the redo log file size and increase the size if it is small.
C.Set the FAST_START_MTTR_TARGET parameter as per the advice given by the MTTR
Advisor.
每隔三秒(或更加频繁),CKPT 进程就会在控制文件中存储一次数据,以记而快速启动检查点功能是通过指定所需的非零恢复平均时间(MTTR)值来启用的,该值将用于设置FAST_START_MTTR_TARGET初始化参数。此参数控制数据库对单个实例执行崩溃恢复所花费的时间量。启用快速启动检查点功能时,oracle将自动保持检查点的速度,已便达到请求的MTTR.如果将该值设置为0,将禁用此功能录DBWn已将哪些修改的数据块从SGA 写到磁盘。这称为“增量检查点”。检查点的用途是标识联机重做日志文件开始进行实例恢复的位置(这个位置称为“检查点位置”)。如果发生日志切换,则CKPT 进程还会将此检查点信息写入数据文件头。
存在检查点是由于下列原因:
? 确保内存中已修改的数据块能够定期写入到磁盘,这样在系统或数据库出现故障时就不会丢失数据
? 减少实例恢复所需的时间(只需要处理上一个检查点之后的联机重做日志文件条目,即可进行恢复。)
? 确保所有已提交的数据在关闭期间会被写入数据文件
CKPT 进程写入的检查点信息包括检查点位置、系统更改编号(SCN)、联机重做日志文件中恢复开始的位置、有关日志的信息等等。
注:CKPT 进程不会将数据块写入磁盘或将重做数据块写入联机重做日志文件。
实例恢复所需的时间指的是将数据文件的最后一个检查点推进到控制文件中记录的最新SCN 所需的时间。管理员通过设置MTTR 目标(以秒为单位)以及调整重做日志组的大小来控制该时间。例如,对于两个重做组,检查点位置与重做日志组末尾之间的距离不能大于最小重做日志组的90%。
从以上可知,如果重做日志文件的size太小,就会频繁切换日志,即会频繁发生检查点,故可以增大重做日志文件的size。
而FAST_START_MTTR_TARGET如果设置的太小,根据要控制数据库对单个实例执行崩溃恢复所花费的时间量,则必须频繁发生检查点,来确保内存中已修改的数据块能够定期写入到磁盘,故可以使用MTTR Advisor来设置推荐的值。
Q31.
In a system, large online transaction processing (OLTP) jobs run during the daytime that
require a large database buffer cache. In the night, the system supports batch jobs that require a higher value to be set for the large pool. You must simultaneously configure the memory components to accommodate the peak requirement. What would you do to automate this
configuration for the memory components with change in mode of working?
在一个系统,大型联机事务处理(OLTP)工作在白天运行
需要一个大型数据库缓冲区缓存。在夜里,系统需要支持批处理作业
更高的值被设置为大池。你必须同时配置内存
组件,以满足高峰需求。自动化这个你会做什么
配置内存组件模式变化的工作吗?
自动配置内存管理
D.Set the SGA_TARGET initialization parameter to a nonzero value.
SGA_TARGET 设置为非0值后,会进入assm模式,这是10G的考题了。在11G是amm用的是memory_targe】
Q32.
答案解析:
SQL> ALTER SYSTEM SET DB_CACHE_SIZE=2516582;
A.because 4194304 is the granule size
本题考得是最小内存管理的颗粒度。
我们可以查询动态系能视图表V$SGAINFO获取最小内存管理的颗粒度。
如果指定的size不是granule size(粒度)的整数倍,则rounds到整数倍,例如,如果granule size为4M,指定DB_CACHE_SIZE as 10 MB,不是4的整数倍,则实际上DB_CACHE_SIZE as 为12M。
Q33.
140. Identify two situations in which the block header grows in a data block. (Choose two.)
A.when row directories need more row entries
B.when there is row migration in the data block
C.when there is an increase in the PCTFREE value for the data block
D.when more transaction slots are required than are initially configured(初始配置)
Answer: AD
block header
A part of a data block that includes information about the type of block, the address of the block, and sometimes transaction information.
data block
Smallest logical unit of data storage in Oracle Database. Other names for data blocks include Oracle blocks or pages. One data block corresponds to a specific number of bytes of physical space on disk.
块头:块头包含段类型(如表或索引)、数据块地址、表目录、行目录和事务处理插槽。每个插槽的大小约为23 字节,修改块中的行时会使用这些插槽。块头自上
而下进行增长。
? 行数据:这是块中行的实际数据。行数据空间自下而上进行增长。
? 空闲空间:空闲空间位于块的中部,允许头和行数据空间在必要时进行增长。当插入新行或用更大的值更新现有行的列时,行数据会占用空闲空间。
导致块头增长的事件的示例包括:
- 行目录需要更多的行条目
- 需要的事务处理插槽数多于最初配置的数目
起初,块中的空闲空间是相邻的。但是,删除和更新操作可能会使块中的空闲空间变成碎片。需要时Oracle 服务器会接合块中的空闲空间。
Q34.
4: 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.
B.Create the role as a secure application role.
《Security Guide》 Glossary
secure application role, 是授予给应用程序用户的数据库角色,通过调用者权限存储过程从数据库表获取角色的口令。
secure application role的口令不是嵌在应用程序中的
Q35.
35: You are installing Oracle Database 11g on your server. During the installation Oracle Universal Installer (OUI) prompts you to enter the path of the inventory directory and also prompts you to specify an operating system group name. Which statement is true in this case?
E.The operating system group that will be specified must have permission to write to the inventory directory.
用户组有写权限
Q36.
Problem: The system does not have the required swap space.
A.It can be continued.
Q37.
SQL> DBMS_STATS.SET_TABLE_PREFS('SH', 'CUSTOMERS', 'PUBLISH', 'false');
D.Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics.
Oracle 11g新特性之统计信息收集
在以前的数据库版本中,当收集到新的优化器统计信息时会自动发布。在11g中,这仍然是默认的动作,但你多了一个选择,
你可以将最新的统计信息挂起,直到人为地发布它们。DBMS_STATS.GET_PREFS函数运行 你检查“PUBLISH”属性,查看统计信息
是否已经自动发布。默认返回的值为TRUE,意味着已经自动发布了,而FALSE表示它还处于挂起状态,等待发布。
检查当前数据库的PUBLISH”属性:
[html] view plain copy
gyj@OCM> col get_prefs for a50
gyj@OCM> SELECT DBMS_STATS.get_prefs('PUBLISH','SH','CUSTOMERS') get_prefs FROM dual;
GET_PREFS
--------------------------------------------------
TRUE
使用存储过程DBMS_STATS.SET_TABLE_PREFS可以重新设置“PUBLISH”属性,设为FALSE表示它还处于挂起状态,等待发布:
[html] view plain copy
gyj@OCM> BEGIN
2 DBMS_STATS.SET_TABLE_PREFS('SH', 'CUSTOMERS', 'PUBLISH', 'false');
3 END;
4 /
PL/SQL procedure successfully completed.
gyj@OCM> SELECT DBMS_STATS.get_prefs('PUBLISH','SH','CUSTOMERS') get_prefs FROM dual;
GET_PREFS
--------------------------------------------------
FALSE
Q38.
38:Which two statements are true regarding the usage of the SQL*Loader utility? (Choose two.)
选项
A.You can load data into multiple tables during the same load session.
B.You can load data from multiple files to a table during the same load session.
Q39.
39: The instance abnormally terminates because of a power outage. Which statement is true about redo log files during instance recovery?
掉电之后的redolog
C.All redo log entries after the last checkpoint are applied from redo log files to data files.
检查点之后的redolog都要使用到数据文件
Q40:
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 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.
A 7 1 5 2 3 6 4
Q41.
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?
更改block size 为16KB
设置参数DB_16k为非零值
D.setting the DB_16K_CACHE_SIZE parameter for the database instance to a nonzero value
Q42.
SQL> ALTER SYSTEM SETAUDIT_TRAIL=DB,EXTENDED SCOPE=SPFILE;
Which statement is true regarding the audit record generated when auditing starts after restarting the database?
重启数据库后,生成审计记录的内容
B.It contains the SQL text executed by the user and the bind variables used with it.
何为审计
数据库审计,就是对数据库的活动做跟踪记录,主要包括数据库连接,SQL语句执行,数据库对象访问这些方面的跟踪记录。
SQL> show parameter?audit_trail
NAME?????????????????????????????????TYPE????????VALUE
------------------------------------ ----------- ------
audit_trail??????????????????????????string??????NONE
??NONE:不开启审计功能。?
?DB:开启审计功能,并将审计记录保存在数据库系统提供的审计视图,要求用于审计功能的视图已创建。?
DB,Extended:这样审计结果里面除了连接信息还包含了当时执行的具体语句;
??OS:审计记录写入一个操作系统文件。?
TRUE:与参数DB效果等同。?
.FALSE:不开启审计功能。
SQL> alter system set?audit_trail=db,extended?scope=spfile; --审计管理用户(以sysdba/sysoper角色登陆)
SQL> alter system set?audit_trail?='DB' scope=spfile;
系统已更改。
SQL>startup force;
Q43.
43: 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.
在检查点发生后,写入脏数据
Q44.
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.
A.using the MERGE command
Q45.
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?
B.The database is in NOARCHIVELOG mode.
Q46.
Which two statements are true regarding a PL/SQL package body? (Choose two.)
A) It cannot be created without a package specification.
D) It can be changed and recompiled without making the package specification invalid.
答案:AD
Invoke 调用
程序包是由函数和过程组成的集合。每个程序包应由两个对象组成:
程序包说明:这个对象(有时称为程序包头)的对象类型为 PACKAGE,其中只包含程序包中的过程、函数和变量的定义。
程序包体:这个对象的对象类型为PACKAGE BODY,包含程序包说明中定义的子程序的实际代码。
只有在编译了程序包说明之后才能编译程序包体。可以在没有程序包体的情况下创建程序包说明,但不能在没有程序包说明的情况下创建程序包体。与程序包说明是分开的。因此,可以更改并重新编译程序包体代码,此时不会将与程序包说明相关的其它对象标记为无效。
Q47.
. Note the following points describing various utilities in Oracle Database 11g:
1: It enables the high-speed 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 an Oracle database.
4: It provides a tape backup management for the Oracle ecosystem.
Which point describes Oracle Secure Backup?
A.1
B.2
C.3
D.4
E.1, 2, and 4
F.1, 2, 3, and 4
Answer: D
答案解析:
与107题类似:http://blog.csdn.net/rlhua/article/details/12751045
参考:http://blog.csdn.net/rlhua/article/details/12617847
Oracle Secure Backup 增加了备份到磁带功能和操作系统文件备份。
? Oracle Secure Backup 和RMAN 一起为Oracle 环境提供端到端备份解决方案:
– 对文件系统数据和Oracle DB 使用集中式磁带备份管理
– 对RMAN 备份提供最佳集成介质管理层
– 可备份网络上任意位置的任意数据
? 由一个技术支持资源来支持整个备份解决方案,可加快解决问题的速度。
? 确保以较低的成本和复杂性提供可靠的数据保护。
Oracle Secure Backup 通过以下方式对现有功能提供补充:
? 完整的备份解决方案:Oracle Secure Backup 为数据库和非数据库的数据提供数据保护,可保护整个Oracle 环境。
? 介质管理:Oracle Secure Backup 为RMAN 数据库磁带备份提供了介质管理层。在Oracle Secure Backup 推出以前,客户需要购买价格昂贵、集成有RMAN 磁带备份功能的第三方介质管理产品。
? 备份网络上任何位置的数据:Oracle Secure Backup 可备份从多台连接到网络的计算机系统至网络上的三级存储资源中的所有数据。Oracle Secure Backup 支持对服务器、客户机、网络连接存储(NAS) 服务器和三级存储设备的各种配置,并保护网络存储环境。
RMAN 和Oracle Secure Backup 的组合提供了一个纯粹以Oracle 产品堆栈实现的端到端备份解决方案。因为由Oracle Corporation 负责整个备份解决方案,因此该解决方案可提供更好的客户支持服务
Q48.
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.
How would you accomplish the above?
A.by assigning profiles for the users
用户配置文件
Q49.
49: Identify the memory component from which memory may be allocated for:
1. Session memory for the shared server
2. Buffers for I/O slaves
3. Oracle Database Recovery Manager (RMAN) backup and restore operations
大型池(Large Pool)
在SGA中大型池是可选的缓冲区。它可以根据需要有管理权进行配置。它可以提供一个大的区以供象数据库的备份与恢复等操作。
详细信息:
在Oracle数据库中,是SGA的可选部分,在以下几种情形下会启用:
一,backup 和 restore 操作的时候
二,当启动UGA, I/O slaves的时候
三,设置MTS服务器的时候,用户信息的存放也使用到Large Pool
可以使用以下命令进行更改Large Pool的大小:
ALTER SYSTEM SET Large_Pool_Size = 64m;
50:Which two statements are true about alerts? (Choose two.)
A.Clearing an alert sends the alert to the alert history. 清理警告产生警告
D.Server-generated alerts notify the problems that cannot be resolved automatically and require
administrators to be notified. 不能自动解决和需要管理员注意的问题系统生成警告
Q51:
Observe the information in the columns:
1. The SGA a. Text and parsed forms of all SQL statements 文本和解析形式的所有SQL语句
2. The cursor state 游标状态 b. Run-time memory values for the SQL statement, such as rows retrieved(恢复) SQL声明的实时内存值
3. User-session data 用户会话数据 c. Security and resource usage information 安全和资源使用信息
4. The stack space 用户栈空间 d. Local variables for the process 程序的本地变量
Which option has the correct match between the memory areas and their contents?
C.1-a, 2-b, 3-c, 4-d
Q52.
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 is an important table having various integrity constraints (各种各样的完整性约束)defined on it. Which constraints will remain enabled by default during this operation? (Choose all that apply.)
哪几个约束能直接使用/
B.UNIQUE 唯一
C.NOT NULL 非空
D.PRIMARY KEY 主键
Q53.
Note the points about data dictionary views and dynamic performance views:
1) These are stored in the SYSTEM tablespace. 存储在system表空间
2) These are the based on the virtual tables.
3) These are owned by the SYS user. sys用户所属
4) These can be queried by a normal user only if O7_DICTIONARY_ACCESSIBILTY parameter is set to
TRUE.
5) The V$FIXED_TABLE view can be queried to list the names of these views.
Which statements listed describe the data dictionary views?
A.1 and 3
B.2, 3, and 5
C.1, 2, and 3
D.2, 3, 4, and 5
Answer: A
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12710613
1,3.他们都被存在system表空间以及owned是sys用户。
2.动态性能视图以基于数据库服务器内部的内存结构构建的虚拟表为基础。
4.启用数据字典保护使用 O7_DICTIONARY_ACCESSIBILTY参数设置为false,则阻止普通用户访问数据字典。
5.V$FIXED_TABLE只能查询动能性能视图所有的名称
Q54.
SQL> AUDIT DROPANY TABLE BY scott BY SESSIONWHENEVER SUCCESSFUL
审计用户scott删除的表
C.One audit record is created for the whole session if user SCOTT successfully drops one or more
tables in his session.
Q55.
In your database instance, the STATISTICS_LEVEL initialization parameter is set to BASIC.
What is the impact of this setting?
STATISTICS_LEVEL 参数设置为BASIC
C.The snapshots for the Automatic Workload Repository (AWR) are not generated automatically.
参考《References》中STATISTICS_LEVEL初始化参数
STATISTICS_LEVEL = BASIC会禁用许多重要的统计信息的收集:
1. AWR快照
2. ADDM (Automatic Database Diagnostic Monitor) 是植入Oracle数据库的一个自诊断引擎.ADDM 通过检查和分析AWR获取的数据来判断Oracle数据库中可能的问题.
3. 所有server-generated预警
4. 自动SGA内存管理
5. 对象层次的统计信息
6. 端到端的应用程序跟踪(v$CLIENT_STATS)
7. 数据库时间分布统计(V$SESS_TIME_MODEL和V$SYS_TIME_MODEL)
8. 服务层次的统计
9. Buffer cache advisor
10. MTTR advisor 顾问 MTTR(mean time to restoration, 平均恢复前时间),源自于IEC 61508中的平均维护时间(mean time to repair),目的是为了清楚界定术语中的时间的概念,MTTR是随机变量恢复时间得期望值
11. Shared Pool size advisor
12. 段层次的统计信息
13. PGA Target advisor
14. Timed statistics
15. 统计的监控
Q56.
You are using Enterprise Manager to schedule backups for your database. Which type of script
would be generated by the backup scheduler?
EM调度数据库备份,调度备份生成什么类型的脚本。
D.Recovery Manager (RMAN) script
RMAN脚本
Q57.
57: Note the following functionalities of various background processes:
后台进程的功能。
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. 监控session过期时间
C.Process Monitor Process (PMON): 4, 5, 6
Q58.
58: In which situation would you use static database registration for a listener?
使用静态注册的条件, 远程启动数据库实例
B.when DBAs need to connect remotely to start up the database instance
59: 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 type would
you use for the new column?
file,FlatFile是一种包含没有相对关系结构的记录的文件。这个类型通常用来描述文字处理、其他结构字符或标记被移除了的文本。在使用上,有一些模糊点,如像换行标记是否可...一种包含没有相对关系记录的文件 如做用逗号分隔数值(CSV)的文件
C.BFILE
BFILE 二进制文件,存储在数据库外的操作系统文件,只读的。把此文件当二进制处理。(类似于long类型)
BLOB 二进制大对象。存储在数据库里的大对象,一般是图像声音等文件。 (类似于row和long row)
CLOB 字符型大对象。一般存储大数量文本信息。存储单字节,固定宽度的数据。
NCLOB 字节字符大对象。存储单字节大块,多字节固定宽度
Bfile和clob,nclob,blob是不同的。Bfile是外部的lob类型,其他三个是oracle内部的lob类型,它们至少有三点主要不同的地方:
1. bfile的值是存在操作系统的文件中,而不是数据库中。
2.bfile不参与数据库事务操作。也就是改变bifle不能commit或rollback。但是改变bfile的locator可以commit或rollback。
3. bfile在plsql和oracle中是只读的,不允许写。
Q60:
View the Exhibit and examine the undo tablespace attributes.
A.The DML commands will fail.
默认还原行为是覆盖已提交、但尚未过期的事务处理的还原信息,而不是让活动事务处理因缺少还原空间而失败。
保证保留时间会改变此行为。有了保留时间保证,即使会导致事务处理失败,仍然会强制执行还原保留时间设置。
此题,设置了undo retention的时间为60分钟。
retention guarantee 设置为yes
并且auto_extensible设置为no
以上的设置,在undo表空间没有自动扩展,并且undo表空间已经满了,但是设置了retention guarantee即,保证保留时间为60分钟,新的事务不能覆盖旧的,所以后来的事务会失败。
解析:因为UNDO_RETENTION = 60分钟,Retention Guarantee = Yes,Auto-Extensible = fal
Q61.
此题考意,当 retention guarantee 没有设置时,UNDO_RETENTION 的情况。
当 retention guarantee 没有设置时,即undo数据 不强制保留UNDO_RETENTION 所设置的时间内,如果是undo表空间是自动增长,即在足够的空闲空间下,则可能会保留到UNDO_RETENTION 所设置的时间。如果undo表空间是固定的,则UNDO_RETENTION 可能会被忽略,undo数据可能被覆盖。
obsolete adj. 废弃的;老式的 vt. 淘汰;废弃
Which statement is true about the UNDO_RETENTION parameter when retention guarantee is not enabled?
C.It is the minimum time period up to which the committed undo data would be retained (保留)if free undo space is available.
C答案:如果有足够的空闲undo表空间,则undo数据会保留,保留的时间为UNDO_RETENTION所设置的时间。是正确的
Q62.
1. Shut down the instance.
2. Execute the ALTER DATABASE ARCHIVELOG command.
3. Start up the instance and mount the database.
4. Set the DB_RECOVERY_FILE_DEST initialization parameter to
$ORACLE_HOME/dest_1.
5. Open the database.
Which is the correct sequence of steps for accomplishing the task?
数据库改为归档模式步骤
C.1, 3, 2, 5; 4 not required
Q63.
undo_retention:指定事物commit后undo 将要保存的时间(秒),在ORACLE10g中默认的是900秒。
GUARANTEE : 保证undo_retention参数所设定的时间有效,这个是10g的新功能。
SQL> ALTER TABLESPACE undotbs1 RETENTION GUARANTEE;
SQL> ALTER TABLESPACE undotbs1 RETENTION NOGUARANTEE;
在没有guarantee的保证下,ORACLE并不能保证能够将undo信息存储900秒,如果undo表空间不足,那么ORACLE将忽略undo_retention的设置,直接覆盖掉以前的undo,这个时候有可能会产生ORA-01555错误。如果undo表空间空间足够,那么undo将会保存很长一段时间,直到undo表空间达到maxsize,这个时候才会覆盖undo信息,而且ORACLE会从最古老的undo信息开始覆盖。
ORACLE推荐我们将undo 表空间中的datafile 设定MAXSIZE ,不要让它一直自动扩展,如果ORACLE获得了自动扩展的能力,那么旧的undo不会被覆盖,到后来undo表空间会越来越大,越来越大,直到将磁盘空间耗尽。
在有guarantee的保证下,ORACLE将会保证undo信息能够保存到undo_retention设定的值之后才被覆盖,如果这个时候同时执行了很多事物,将undo表空间耗完了,那么那个事物会失败,会报ORA-30036 错误,所以使用guarantee一定要慎用,如果非要使用guarantee,那么尽量将undo 表空间设大 一点。
Oracle10g开始,如果你设置UNDO_RETENTION为0,那么Oracle启用自动调整以满足最长运行查询的需要。当然如果空间不足,那么Oracle满足最大允许的长时间查询。而不再需要用户手工调整。
B.The extents containing committed undo in the undo tablespace are not overwritten for at least 15 minutes.
Q64.
You used the IMMEDIATE option to shut down your database instance. Consider the steps
that may occur when a database instance is started and database is opened:
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?
C.7, 1, 5, 2, 3, 6; step 4 is not required
Q65.
创建密码文件
Usage: orapwd file= entries= force= ignorecase= nosysdba=
where
file - name of password file (required),
password - password for SYS will be prompted if not specified at command line,
entries - maximum number of distinct DBA (optional),
force - whether to overwrite existing file (optional),
ignorecase - passwords are case-insensitive (optional),
nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
There must be no spaces around the equal-to (=) character. characterorapwd命令可以有三个参数,file指生成的密码文件的名称,password指sys用户的密码,这两个参数是强制的,如果缺失任何参数都将输出orapwd的帮助信息。第三个参数是entries。从orapwd的帮助信息上理解,entries是可以保存的记录个数,每个具有sysdba或sysoper权限的用户算一个记录,如果一个用户同时具有sysdba和sysoper的权限,则只占一个记录。数据库启动后可以通过v$pwfile_users来查看密码文件中记录的情况。
You executed the 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?
C.It is used by Oracle to authenticate users for remote database administration.
[oracle@oracle ~]$ orapwd file=orapworcl entries=5 ignorecase=N
Enter password for SYS:
Q66.
角色授权 有角色没权利
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> GRANTMGR_ROLE TO SKDWITH ADMIN OPTION;
A.The user SKD can grant only the MGR_ROLE role to other users, but not the privileges in it.
Q67.
whole consistent database backup
一致性备份概述
B.The database must be shut down to accomplish the backup.
一致性备份必须关闭库
对数据库整体或部分进行的一致性备份(consistent backup)后,备份中所有数据文件(datafile)及控制文件(control file)都经历过检查点(checkpoint),拥有相同的 SCN。
.
进行一致性数据库完全备份(consistent whole database backup)的唯一方法是:首先使用 NORMAL,IMMEDIATE,或 TRANSACTIONAL 选项关闭数据库,并在数据库处于关闭状态时进行备份。如果数据库没有完全关闭,例如出现实例故障,或用户使用了 SHUTDOWN ABORT 语句,此时数据库的数据文件是非一致性的,除非此数据库为只读数据库(read-only database)。
Oracle 通过数据库检查点操作使数据文件和控制文件拥有相同的 SCN,即具备一致性。在一致性备份中,只有只读表空间(read-only tablespace)及脱机表空间(offline tablespace)的 SCN 可以比备份中其他文件的 SCN 滞后。这两种表空间内的数据不会被修改,因此她们也能满足一致性的要求。
一致性数据库完全备份的重要特点是,使用此种备份复原(restore)的数据库无须恢复(recovery)即可打开(open),这是因为复原的数据库具备一致性:复原的数据文件内的数据是正确的,无须用户进行任何 处理。用户可以使用一年前的一致性备份复原数据库,而无须进行介质恢复(media recovery),Oracle 也不必执行实例恢复(instance recovery)。但是,如果使用一致性备份复原数据库而没有应用重做日志(applying redo),备份之后产生的事务将全部丢失。
如果数据库运行在 NOARCHIVELOG(非归档)模式下,一致性数据库完全备份是唯一有效的备份方案,因为使用非一致性备份(inconsistent backup)复原数据库后需要执行恢复操作来确保数据一致性。在 NOARCHIVELOG 模式下,Oracle 不会对重做日志进行归档,因此恢复所需的重做日志可能已经不存在了。而运行在 ARCHIVELOG(归档)模式下的数据库,可以采用一致性数据库完全备份。当使用此种备份复原数据库后,用户可以立即打开数据库,使备份后发生的事务全部丢失;如果归档的重做日志存在,用户也可以应用这些日志从而恢复备份后发生的事务。
非一致性备份(inconsistent backup)的含义是,备份所包含的各个文件中的所有修改不具备相同的系统变化编号(system change number,SCN)。换句话说,有些修改在备份中不存在。这意味着备份所包含的各个文件中的所有数据来自不同的时间点。如果数据文件在备份的同时也在被修改就会出现上述情况。Oracle 的恢复(recovery)操作能够比较所有数据文件头(datafile headers)中的 SCN,之后以最早的 SCN 为起点读取归档及联机重做日志文件,并将其中出的所有修改应用到复原的数据文件中。
如果数据库必须 24*7 地工作,对这样的数据库只能进行非一致性数据库完全备份。联机数据文件的备份被称为联机备份(online backup)。需要进行联机备份的数据库必须运行在 ARCHIVELOG(归档)模式下。
如果数据库运行在 ARCHIVELOG 模式下,用户不必每次都进行数据库完全备份。例如,如果数据库包含七个表空间,用户每晚都备份控制文件及一个不同的表空间,那么一周后用户就已经备份了数据库的全部表空间及控制文件。用户可以把这个交错的备份作为数据库完全备份。如果需要使用这个交错的备份 恢复数据库,除了复原数据之外,用户还需应用最早备份时间之后的产生所有归档重做日志。
Q68.
用户角色授权
Which statement is true about the assignment of the SELECT_CATALOG_ROLE role to the SL_REP user?
A.The user must enable the role explicitly(明确的明白的).
elect_catalog_role 是一种角色,题中默认为N,需要重新登录或者显式的set role 来生效,所以选A
Q69.
FAST_START_MTTR_TARGET = 0
LOG_CHECKPOINT_INTERVAL = 0
Which two will be the implications of these values in your database? (Choose two.)
B.The MTTR advisor will be disabled.
C.Automatic checkpoint tuning will be disabled.
Q70.
Automatic Shared Memory Management is disabled for your database instance. You realize that there are cases of SQL statements performing poorly because of repeated parsing activity,resulting in degradation of performance.
What would be your next step to improve performance?
ASMM在数据库实例中被禁用, 你意识到SQL语句执行性能差,因为重复的活动语法解析导致性能降级。
使用的方法。
E.Run the MemoryAdvisor for the buffer cache.
题意说在ASMM禁用的情况下,sql运行语句情况不好,有很多重复的解析导致性能下降。sql是在共享池运行并解析的。
出现上述情况,原因是共享池的SHARED_POOL_SIZE参数设置太小,建议是执行内存指导来重新设置SHARED_POOL_SIZE参数的值
D.Run the Memory Advisor for the shared pool.