20151123 ocp 052(10-30)

12.the database instance is currently using spfile,view the exhibit and examain the error that you reseived while runing the DB strunctre integrity check


given below are the steps to recover from the error in random order:

a.shutdown the instance,if not already alone.

b.copy one of the remaining control files to a new location.

c.start up the database instance to the nomount stage.

d.change the value of the control_files initialization parameter to correspond to the new location of the control files;

e.recover the database to the point of failure of the control file.

f.open the database

个人理解:数据库运行时数据库控制文件无法打开

此时的步骤,先关闭数据库,备份现有的控制文件到一个新的路径,启动数据库到nomount阶段,更改控制文件的参数文件,

在将数据库恢复到error的时间点,打开数据库

13.view the exhibit and examine the parameters.


user a executes the following command to update the trans table;

sql>update b.trans set tr_amt=tr_amt+500 where c_code='c005';

before user a issues a commit or rollback command ,user b executes the following command on 

the trans table;

sql>alter table trans modify (tr_type varchar2(3));

what would happen in thsi scenario?

d.the altertable commant fails after waiting for 60 seconds due to the resource being busy.

每个dml事务处理时必须获得两个锁:

针对正在更新的一行或多行的exclusive行锁

针对包含这些行的表的row exclusive(rx)模式下的表锁(TM)

这可避免在进行更改时另一会话锁定整个表(可能会删除或截断表)。这种模式也可称为子排它锁(SX)

对表执行row exclusice锁定是,会禁止ddl命令再未提交的事务进行处理到一半时更改数据原字典。这样便可在事务处理的有效期内保持数据字典完整性和读取一致性

14.view the exhibit to examine the details for an incident.


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

使用enterprise manager 支持工作台,可以通过执行以下常规步骤来调查报告并解决问题

-----

1.在enterprise manager的database(数据库)主页上,复查严重错误预警,选择一个预警查看详细信息

2.分析问题详细信息并查看针对问题所记录的所有意外事件的列表。可显式自动运行的素所有健康状况检查的查找结果

3.(可选)运行附加健康状况价检查并调用sql test case builder,改程序将手机与sql问题相关的所有鄙俗数据,并且以oracle技术支持能够再现该问题的方式对这些信息进行打包

4.使用my oracle support创建一个服务请求并随问题信息一起记录服务请求号

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

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

6.可以在支持工作台中维护一份服务请求的活动日志。可运行oracle知道以帮助修复sql故障或者损坏的数据

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

----

15. user a executes the following command to drop a large table in your database'

sql>drop table trans;

while the drop table operation is in progress,user b executes the flowing command on the same table

sql>delete from trans where tr_type='SL';

c.it fials to delete the rows successfully because the table is locked in exclusive mode;

执行drop table的过程中,该会话已经获得了excusive锁,防止其他DDL或者DML的操作

16.which is the correct description of a pinned buffer in the database buffer cache?

a. the buffer is currently being accessed

pinned buffer:当前的buffer被某个进程正在读取或者正在修改时

Every buffer has an access mode: pinnedor free(unpinned). A buffer is "pinned" in the cache so that it does not age out of memory while a user session accesses it. Multiple sessions cannot modify a pinned buffer at the same time.

buffer cache中的buffer根据不同的状态可以分为以下4种类型:

free buffer/unused buffer:buffer cache初始化时或者在执行alter system flush buffer_cache以后的buffer,该buffer中没有存放任何内容。

clean buffer:server process从数据文件中读入的block且还没有被其他进程所修改或者又dbwr将dirt buffer刚刚写入到数据文件中的buffer,该buffer中的内容与数据文件中的block一致。

dirt buffer:该buffer的内容与数据文件中block的内容不一致。

pinned buffer:当前的buffer被某个进程正在读取或者正在修改时。

16.you are working on a new oracle database 11g server,where only the software is installed and no database is created ,you

plan to create a database on this server using 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 dataase instance.(配置一个命名方法,以帮助远程用户连接到数据库)

4.using 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;(配置企业管理器数据库控制来管理数据库)

配置远程连接并不在DBCA的配置范围之内

20.view the exhibit to examine the error that occurred during the database startup


you opened an rman session for the database.to repaire the failure,you executes the following command

as the first rman command

rman>repair failure

which statement describrs the consequence of this command?

d.the command produces an error because the advise failure command was not executed beforre;

在试图没有进行advise failure命令时使用repaire failure,则报错。

主要原因是:在repaire failure之前,要先运行advise fialure,让rman给出修复的建议,并给出修复的脚本,之后在运行repaire failure

22.what can you achive by implementing reverse key index?

c.prevent contention on the highest leaf block when using sequences to generate keys

通过反向索引可以实现什么

于降低索引叶子块的争用,减少热点块 ,防止热点快的争用

23.which two statements are true regarding undo tablespace?

a.the database can have more than one undo tablespace

c.undo segments automatically grow and shrink as needed,acting as circuler bufer for their assigned transactions.

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 user to accomplish this task?

d.remap_schema

remap_schema提供原有的fromuser/to user功能,可用于更改对象所有权。实现不同用户之间的数据迁移

25.for which database operation would you need the database to be in the mount state?

e.configuring the database instance to operation in the archivelog or noarchivelog modes

mount过程包括以下执行任务

将数据库与以前启动的实例关联

定位并打开参数文件中指定的控制文件

通过读取控制文件来获取数据文件和联机重做日志文件的名称和状态(但是此时,不会执行检查验证是否存在数据文件和联机重做日志文件)

要执行特定的维护操作,则启动实例,然后状态数据库,但不打开数据库,即mount阶段

重命名数据文件

启用和禁用联机重做日志文件归档选项

执行完整的数据库恢复

26.identity the two situations in which you use the alert log file in your database to check the details

a.running aquery on a table returns 'ora-600:internal error'

e.inserting a row in a table returns 'ora-00060':deadlock detected while waiting for resource

每个数据库都有一个alter_<sid>.log文件。此文件位于数据库所在的服务器中,如果设置了$ORACLE_BASE,则此文件默认

存储在$ORACLE_BASE/diag/rdbms/<db_name>/<SID>/trace中

数据库预警文件是按时间顺序列出消息的日志文件,例如

启动时使用的任何非默认初始化参数

已发生的所有内部错误(ORA-600)、块损坏错误(ORA-1578)和死锁错误(ORA-60)

27.which two statements are true regarding oracle data pump?

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

28.which two statements are true about the automatic database diagnostic monitor(ADDM)?

b.the addm runs after each awr snapshot is collected automatically by mmon

c.the results of the addm analysis are stored  in the automatic workload repasitory(AWR)

ADDM 在记录每个AWR 快照之后会自动运行。每次记录快照后,ADDM 会分析与最后两个快照对应的时段ADDM 会预先监视实例,以便在大多数瓶颈问题成为严重问题之前检测到这些问题。多数情况下,ADDM 为检测到的问题提供建议解决方案,甚至可以量化这些建议的优势。

每次ADDM 分析的结果都存储在AWR 中,并可通过Enterprise Manager 进行访问。

 

ADDM 将考虑对系统的各种更改。其建议可以包括:

• 硬件更改:添加CPU 或更改I/O 子系统配置

• 数据库配置:更改初始化参数设置

• 方案更改:对表或索引进行散列分区,或者使用自动段空间管理(ASSM)

• 应用程序更改:对序列使用高速缓存选项,或使用绑定变量

• 使用其它指导:在高负载SQL 上运行SQL 优化指导或在热对象上运行段指导

30.you notice that the performance of the database has degraded because of frequent checkpoints

which two actions resolve the issue?
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 parmameter as per the advice given by the mttr adviser

解决因频繁的发生检查点而降低了数据库的性能

b.检查重做日志的大小,如果小则增大

c.根据mttr建议指导来设置fast_start_mttr_target的值

每隔三秒(或更加频繁),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来设置推荐的值。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值