大佬教程收集整理的这篇文章主要介绍了oracle11g OCP 认证 1Z0-053考试笔记4,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
302.You issue the following command:
RMAN>CONfigURE
BACKUP OPTIMIZATION ON;
what is the result of this command on your
BACkups? B. Read-only
DATAFILEs will not be
BACked up as long as
BACkups of those files already exist
and those
BACkups meet established retention criteria. 只读文件只要存储在备份 就不在备份 这些备份集 符合建立的 保留标准 303.
what is the purpose of the
RMAN recovery catalog? (Choose all that apply.) B. It provIDes a convenIEnt,optional,repository of
BACkup- and recovery-related Metadata. C. It provIDes the ability to store
RMAN scripts for global use by any database that has access to the repository. E. It provIDes the ability to store
BACkup records for more than a year. Answer: BCE A,不是必须,也可以使用控制文件来记录备份和恢复的信息。 B,它提供了一个方
便,可选的备份和恢复相关的元数据存储库。正确 C,可以存储
RMAN全局脚本,可以让任何注册的数据库访问。正确 D,..它提供了一种存储
在Oracle数据库服务器所有
RMAN物理备份集,错误,个人认为存在目录数据库,不是存在目标数据库服务器上。 E,可以提供长达一年多的备份记录,正确
RMAN Recovery Catalog,各种翻译的都有,有叫“恢复目录”,也有叫“知识库”等等。“恢复目录”叫的多一些,姑且先
用这个翻译吧。 你可能从其他人或书上听过
RMAN恢复目录,旁人的表达或书中模糊不清的描述,导致很多朋友一直对其实际意义和作用感到疑惑。你可以将其视作存储
RMAN备份恢复相关信息的数据库(在物理形式上可以对应成
Oracle中的一个
scheR_982_11845@A)。 关于
Oracle设置恢复目录目的,
Oracle官方文档给出了说明: 当没有恢复目录时,
RMAN相关的备份信息(比如归档文件路径、备份集路径等)均存储在目标数据库的控制文件中,不过
考虑到控制文件并不能无限增长,而且控制文件也不仅仅是用来存储与备份相关的信息,因此
RMAN也有一个专门的备份信息存储地,这就是恢复目录了。当待备份的数据库注册到恢复目录之后,
RMAN相关的信息除了保存在控制文件中外(控制文件实际上只保存一部分),更加详细的信息就都被存储在恢复目录中 nocatalog nocatalog方式就是用control file作为catalog,每一次备份都要往控制文件里面写好多备份信息,控制文件里面会有越来越多的备份信息,即
RMAN的备份信息写
在本地控制文件里面。因此,当使用
RMAN nocatalog方式备份数据库时,一定要记得备份
CONTROLFILE。 当使用
RMAN nocatalog恢复时,数据库必须是处于“mount”状态的。而
Oracle startup mount的前提条件是control必须存在。因此,你必须在恢复
DATAFILE之前先恢复
CONTROLFILE。使用
RMAN catalog方式时,可以startup nomount然后restore
CONTROLFILE;但使用
RMAN nocatalog时,必须先用文件方式恢复
CONTROLFILE。 nocatalog or catalog ? 如果DBA要管理的
Oracle数据库较多,那么对于这些数据库的备份,建议使用恢复目录统一管理,这样既方
便备份和恢复操作,而且安全性也相对比较高(执行完备份操作后,单独备份恢复目录数据库即可,无须担心被备份的数据库控制文件丢失可能造成的影响)。不过如果DBA仅管理一个或者数个
Oracle数据库,那么我想NOCATALOG模式操作起来会更加方
便。
Oracle官方推荐是什么?- 使用恢复目录 Recovery Catalog都存储了什么信息 The catalog includes the following types of Metadata:
DATAFILE and archived redo log
BACkup sets and
BACkup pIEces
DATAFILE copIEs Archived redo logs
and their copIEs Database structure (tablespaces and
DATAFILEs) Stored scripts,which are named user-created sequences of
RMAN commands Persistent
RMAN configuration set
Tings 304.
what privileges must be granted to allow an account to create the recovery catalog? (Choose all that apply.) A. RECOVERY_CATALOG_
owneR B. DBA C.
resourcE D.
SELECT ANY
DicTIONARY E. CONNECT Answer: AC 305.Which command do you use to create a recovery-catalog
scheR_982_11845@a? B. create catalog 306.If you
BACk up a database without connec
Ting to the recovery catalog,which operations will cause the recovery catalog to be
updated? (Choose all that apply.) A. The next time you
BACk up the database when you are also connected to the recovery catalog
and the target database B. The next time you are connected to the target database
and the recovery catalog database and issue the resync command 307.You have created a script in the recovery catalog called
BACkup_database. Which of the following commands would
successfully execute that script? D. Run
{ execute script
BACkup_database; } 308.In
what order would you execute the following steps to create a recovery catalog? A. Issue the create catalog command. B. Create the recovery-catalog database. C. Create the recovery-catalog user. D. Grant the recovery_catalog_
owner privilege to the recovery-catalog user. E. Issue the register database command from the target database. F. a,b,c,d,e G. b,a,e H. b,e I. b,e,a J. b,e Answer: C 309.How would you grant the RVPC user access to specific
RMAN database records in the
RMAN virtual private catalog? D. Issue the grant command from
RMAN when connected to the recovery catalog-owning
scheR_982_11845@a. 310.The RVPC user can do which of the following? (Choose all that apply.) A. Register databases if granted the register database privilege B. See all databases in the recovery-catalog
scheR_982_11845@a C. See all database-related Metadata in the recovery catalog if they are granted access to that database D. Unregister databases from the RVPC catalog that were not granted to the RVPC catalog
owner with the grant command E. Not be connected to with the
RMAN command-line catalog parameter for
BACkup or recovery purposes Answer: AC 311.Given the script create script db_
BACkup_
DATAFILE_script
{BACkup
DATAFILE and 1,and2 plus archivelog
delete input;}
what is the result of running this command? Run
{execute script db_
BACkup_
DATAFILE_script using 2;} D. The execute script command will prompt for the value of and2 since it's not included in the command. 312.Which is the correct way to connect to both the target database
and the recovery catalog from the
RMAN command line? Assume that the target database is called ORCL
and that the recovery catalog database is called RCAT. Also assume that the recovery-catalog
owner is called RCAT_OWN. Assume the environment is configured for the ORCL database. (Choose all that apply.) C.
RMAN target=/ catalog=rcat_own/rcat_own@RCAT D.
RMAN target=sys/robert@orcl catalog=rcat_own/rcat_own@RCAT 连接目标库和恢复目录库 313.
what command would you issue to enable automated
BACkups of control files? 自动备份控制文件 C. configure
CONTROLFILE auto
BACkup on 314.Given the following
RMAN commands,choose the option that reflects the order
required to restore your currently operational ARCHIVELOG-mode database. a. restore database; b. recover database; c. shutdown immediate d. startup e. restore archivelog all; f. alter database open A. a,f B. c,f C. c,f D. c,d E. c,f 答案:(E) 解析: A(X),c一定是第一步 B(X),C(X),b不能是下一个步骤 都已经startup,为什么还要alter database open; 315.Which commands are used for
RMAN database recovery? (Choose all that apply.) A. restore B. repair C. copy D. recover E.
replace Answer: AD 316.Given a complete loss of your database,in
what order would you need to perform the following
RMAN operations to restore it? A. restore
CONTROLFILE B. restore database C. restore spfile D. recover database E. alter database open F. alter database open resetlogs G. b,e H. a,f I. c,e D. c,f K. e,c Answer: D c a b d f 317.If you lost your entire database,including the database spfile,control files,online redo logs,and database
DATAFILEs,
what kind of recovery would be
required with
RMAN? B. Incomplete database recovery. 318.Which command will restore all
DATAFILEs to the date 9/30/2008 at 18:00 hours? C. restore database until time '09/28/2008
:18:00:00'; 319.
what is the end result of
these commands if they are
successful?
RMAN> show retention policy;
RMAN configuration parameters for database with db_unique_name ORCL are: CONfigURE RETENTION POliCY TO REDUNDANCY 1; # default
BACkup database tag=gold_copy plus archivelog tag=gold_copy
delete input;
BACkup database tag=silver_copy plus archivelog tag=silver_copy
delete input; D. Attemp
Ting to restore gold_copy may or may not succeed. 因为配置的保留策略为REDUNDANCY 1,故这里有两个备份,其中第一次备份的即gold_copy就会显示为obsolete。 obsolete状态的备份机在用来恢复时,可能成功,可能不成功。 320.You are using
RMAN to
BACkup your ARCHIVELOG mode database. You have enabled control-file auto
BACkup
s. Which files are not
BACked up during the
RMAN BACkup? C. Online redo logs 321.True or
false:
RMAN offers the equivalent of the sql command alter database
BACkup
CONTROLFILE to trace. B.
false Answer: B )You need to restore your database
BACk to 9/30/2008 at 18:00. In
what order would you run the following commands to compete this task? a. restore
CONTROLFILE until time '09/30/2008
:18:00:00'; b. restore database until time '09/30/2008
:18:00:00'; c. restore spfile until time '09/30/2008
:18:00:00'; d. recover database until time '09/30/2008
:18:00:00'; e. alter database open resetlogs; f. alter database open; A. b,e B. b,f E. a,e 答案:(A) 解析: 没提到
参数文件和控制文件损坏,所以不必还原
参数文件和控制文件 Answer: A 答案解析: 题目要求数据返回到指定日期。 通过restore-recover-open resetlogs来执行 (323)
what is the correct order of the following commands if
you wanted to restore
DATAFILE 4,which was accIDentally removed from the file system? a. sql 'alter database
DATAFILE 4 online'; b. restore
DATAFILE 4; c. recover
DATAFILE 4; d. sql 'alter database
DATAFILE 4 offline'; e. startup f. shutdown A. a,d B. d,a C. f,e 答案:(B) 解析: 不需要关闭数据库实例 (324)Your database is up and running and one of your three control files is accIDentally erased. You start
RMAN and run the following command: RESTORE
CONTROLFILE FROM auto
BACKUP; Which of the following statements is true? (Choose all that apply.) C. The command fails because the database is running. E. This is not the correct way to address this proble
m. Answer: CE 325.Which of the following are valID until command options when attemp
Ting point-in-time recovery in
RMAN? (Choose all that apply.) A. until time C. until sequence D. until SCN (326)Which of the following does the recover command not do? A. Restore archived redo log
s. 327.You have a database with the following tablespaces: SYstem,SYSAUX,UNDO,USERS,TEMP.
you want to"roll
BACk" the data in the USERS tablespace to the way it looked yesterday. Which tablespaces do you need to perform a point-in-time restore operation on in order to complete this task? (Choose all that apply.) A. SYstem B. SYSAUX C. UNDO D. USERS E. TEMP 答案:(A、B、C、D、E) TSPITR(
表空间时间点恢复)用于将一个或多个
表空间恢复到过去某个时间点的状态,而其他
表空间仍然保持现有状态。 TSPITR 相关的概念和术语:
(1) TSPITR (tablespace Point-In-Time Recover)。TSPITR 是
表空间时间点恢复的英文缩写格式,它表示将一个或多个
表空间恢复到过去时间点的状态,而其他
表空间仍然保持现有状态。 328.You have
BACked up your database using image copIE
s. You have lost the SYstem tablespace and need to restart your database as quickly as possible.
what is the correct solution? C. Use the switch
DATAFILE command to instantly立即 switch to the
DATAFILE copy,recover the tablespace,and open the database. 329.If you find errors in the vIEw
v$DATABASE_BLOCK_CORRUPTION with a status of MEDIA_CORRUPT,
what RMAN command would you run to correct the problem? E. recover corruption List; Answer: E 还可以通过
RMAN> blockrecover corruption List进行块的恢复,这是在大量块损坏时或全部块损坏时使用, 前提是先执行
RMAN>
BACkup valIDate database,在
v$DATABASE_BLOCK_CORRUPTION里有对应的坏块的列表。 330.
what will be the end result of this set of
RMAN commands? shutdown abort startup mount restore
DATAFILE 4 until time,09/30/2008
:15:00:00; recover
DATAFILE 4 until time,09/29/2008
:15:00:00; alter database open resetlogs; A.
DATAFILE 4 will be recovered until 9/30/2008 at 15:00
and the database will open. B. The restore command will fai
l. C. The recover command will fai
l. D. The alter database open resetlogs command will fai
l. E. All
these commands will fail because they must be in the confi
nes of a run block. Answer: D 注意,restore和recover的时间不一致 331.Which of the following represents代表 the correct way to perform an online recovery of
DATAFILE 4,which is assigned to a tablespace called USERS? 在线恢复数据文件4的正确方式 E. sql alter database
DATAFILE 4 offline; restore
DATAFILE 4; recover
DATAFILE 4; sql alter database
DATAFILE 4 online; Answer: E 332.DavID managed to accIDentally
delete the
DATAFILEs for database called DS
l. He called Heber and Heber trIEd to
Help but he managed to
delete the control files of the database. Heber called Bill and Bill saved the day. They are using a recovery catalog for this database.
what steps dID Bill perform to recover the database and in
what order? A. Restored the control file with the
RMAN restore
CONTROLFILE command. B. Mounted the DSL instance with the alter database mount command. C. Restored the
DATAFILEs for the DSL database with the
RMAN restore command. D. Opened the DSL database with the alter database open resetlogs command. E. Recovered the
DATAFILEs for the DSL database with the
RMAN recover command. F. Started the DSL instance. G. Connected to the recovery catalog with
RMAN. H. a,f,g I. b,g,a J. g,d K. c,g
l. g,d Answer: C 答案解析: 题中说,在avID不小心删除的数据库和heber删除了控制文件后,怎么使用恢复目录来
恢复数据库,数据库
实例名:DSL 1,连接到目录数据库 2,启动DSL数据库实例 3,恢复控制文件 4,启动到mount状态 5,恢复数据文件 6,recover数据文件 7,因为是重新恢复的控制文件,所有用open resetlogs打开数据库 333.Which command would you use to determine
what database
BACkups are currently available for restore? C. List
BACkup of database; 334.
what command would you use to ensure that
BACkup records in the control file are poin
Ting to actual physical files on the
BACkup media? A.
crosscheck 在用
deletE OBSolETE 命令删除废弃的备份文件,如果出现如下错误(
RMAN-06207 &
RMAN-06208),那么
需要用crosscheck命令来解决:
RMAN-06207: WARNING: 2 ob
jects Could not be
deleted for disK ch
Annel(s) due
RMAN-06208: to mi
smatched statu
s. Use
crosscheck command to fix status
crosscheck命令用户核对备份文件,以确保
RMAN资料库与备份文件保持同步。当执行该命令时,如果
RMAN资料库记录的状态与实际备份文件不匹配,则会更新资料库里的状态使其与实际备份文件状态一致;若备份文件处于expired状态,那么说明该备份已失效,可以删除之; 常用命令介绍: 1.
crosscheck BACKUP 用于核
对数据库、
表空间、数据文件、控制文件、归档日志、SPfile的备份集。
crosscheck BACKUP ; --核对所有备份(包括有效和失效的备份)
crosscheck BACKUP of database; --核对除控制文件、归档文件外的备份文件
crosscheck BACKUP of tablespace system;
crosscheck BACKUP of
DATAFILE 1;
crosscheck BACKUP of
CONTROLFILE;
crosscheck BACKUP of archivelog all;
crosscheck BACKUP of archivelog sequence 3;
crosscheck BACKUP of spfile; 2.
crosscheck BACKUPPIECE 用于 核对特定备份片,该命令需要制定备份片的BP值或备份片名称;
crosscheck BACKUPPIECE 24;
crosscheck BACKUPPIECE '/u01/app/
Oracle/
RMAN_
BACkup/OcpyJG_28'; 3.
crosscheck BACKUPSET 用于核对特定的备份集,该命令需要制定备份集的BP值;
crosscheck BACKUPSET 24; 4.
crosscheck copY 用于核
对数据库、
表空间、数据文件、控制文件、归档文件的映像副本(即备份是用copY
DATAFILE ...... 或
BACKUP AS copY ......
DATAFILE......命令备份数据文件的映像)
crosscheck copY;
crosscheck copY of database;
crosscheck copY of tablespace system;
crosscheck copY of
DATAFILE 1;
crosscheck copY of
CONTROLFILE;
crosscheck copY of archivelog all;
crosscheck copY of archivelog from sequence 24 until sequence 32; 5.
crosscheck DTAfilecopY 用于核对特定的数据文件映像副本,该命令需要指定映像副本的文件名或KEY值;
crosscheck DATAFILEcopY 2;
crosscheck DATAFILEcopY '/u01/app/
Oracle/
RMAN_
BACkup/tp9.dbf'; 6.
crosscheck CONTROLFILEcopY 用于核对特定的控制文件映像副本,该命令需要指定控制文件映像副本的文件名或KEY值;
crosscheck CONTROLFILEcopY 3;
crosscheck CONTROLFILEcopY '/u01/app/
Oracle/
RMAN_
BACkup/
CONTROLFILE01.ctl; 7.
crosscheck ARCHIVELOG 用于核对特定的归档日志,该命令需要指定归档日志的文件名或KEY值或SEQUENCE值;
crosscheck ARCHIVELOG 36;
crosscheck ARCHIVELOG '
crosscheck archivelog '/u01/app/
Oracle/product/11g/dbs/arch1_6_8131
61833.dbf';
crosscheck ARCHIVELOG sequence 7; 335.You have
BACked up your database twice without connec
Ting to the recovery catalog.
what command do you issue to transfer the control-file Metadata to the recovery catalog? B. resync catalog 336.
you want to make sure that your database
BACkup does not exceed超过 10 hours in length.
what command would you issue that would meet this condition? 限制备份时间不超过10小时 D.
BACkup database plus archivelog duration 10:00; 为了帮助减少
RMAN备份对其他进程的整体I/0影响,
RMAN提供了
BACkup命令的duration 参数。 Duration 参数类似与闹钟,如果备份运行时间超过指定的持续时间,
RMAN将取消备份。 如:
BACkup duration 00:30 database; 337.You have lost all your
RMAN BACkup set pIEces due to a disk failure. Unfortunately,you have an automated cross-
check script that also does a
delete expired
BACkupset command. You have restored all the
BACkup set pIEces from tape.
what command would you use to get those
BACkup set pIEces registered in the recovery catalog
and the control file of the database again? catalog start with 将
RMAN备份集恢复到另一台机器
Oracle10g 中
RMAN的增强功能catalog start with 将备份集注册到控制文件 catalog start with 是一个很好的命令.
有了这个命令后,基本上可以不再使用catalog数据库了 . 因为可以通过这个命令将以前的备份集信息
重新导入到当前控制文件中,一般应用于使用
RMAN恢复,控制文件又是旧的或者是手工创建的(这样的控制文件当然没有最新的备份集的信息),通过catalog start with 可以将最新的备份集以及归档日志文件列表导入到控制文中,然后就可以进行
RMAN的恢复了. 338.You run the following commands:
RMAN> List expired
BACkup;
RMAN>
delete expired
BACkup;
what will happen to the
BACkup set pIEces associated with the
BACkups that appear in the List expired
BACkup command? B. nothing will happen to the
m. The
BACkup set pIEces do not exist. 339.Why would you run the
delete obsolete废弃的老式的 command? (Choose all that apply.) C. To mark as
deleted records in the control file
and the recovery catalog associated with obsolete
BACkup sets D. To
delete
BACkup set pIEces associated with
BACkups that are no longer needed due to retention criteria
delete expired删除的是那些
本来RMAN以为存在
但是实际上在磁盘或者磁带上已经被删除了的信息,删除的只是
RMAN资料库中的记录;
delete obsolete则删除旧于备份保留策略定义的备份数据
同时也更新
RMAN资料库以及控制文件。
delete expired If you run
crosscheck,and if
RMAN c
Annot locate the files,then it
updates
their records in the
RMAN repository to EXPIRED statu
s. You can then use the
deletE EXPIRED command to remove records of expired
BACkups and copIEs from the
RMAN repository.
delete obsolete The
RMAN deletE command supports an OBSolETE option,which
deletes
BACkups that are no longer needed to satisfy specifIEd recoverability
requirement
s. You can
delete files obsolete according to the configured default retention policy,or another retention policy that you specify as an option to the
deletE OBSolETE command. As with other forms of the
deletE command,the files
deleted are removed from
BACkup media,
deleted from the recovery catalog,and marked as
deletED in the control file. 340.
what does it mean if a
BACkup is expired失效的? D. The
BACkup set contains one or more missing
BACkup set pIEce
s. 341.If a
BACkup set is expired,
what can you do to correct the problem? B. Make the lost
BACkup set pIEces available to
RMAN again. 342.How long will this
BACkup be allowed to run?
BACkup as compressed
BACkupset duration 2:00 minimize load database ; B. 2 hours 343.
what is the impact of the following
BACkup if it exceeds超出 the duration allowance允许 ? (Choose all that apply.)
BACkup as compressed
BACkupset duration 2:00 partial minimize load database ; B. The entire
BACkup will fail,but any
DATAFILE successfully
BACked up will be usable for recovery. 344.In
what vIEw are you likely to see the following output? SID
serial# EVENT
seconds_in_wait 121 269
RMAN BACkup & recovery I/O 2 129 415 sql*Net
message from clIEnt 63 130 270 sql*Net
message from clIEnt B.
v$sesSION
SELECT SID,
serial#,EVENT,
seconds_in_wait from
v$sesSION;rom
v$sesSION; SID
serial# EVENT
seconds_in_wait ---------- ---------- ---------------------------------------------------------------- --------------- 1 1 DIAG IDle wait 0 2 1 rdbms ipc
message 0 3 85 rdbms ipc
message 59 7 2723 wait for unread
message on b
roadcast ch
Annel 1 9 205 sql*Net
message to clIEnt 0 345.
what vIEw might you use to try to determine how long a particular
BACkup will take? E.
v$sesSION_LONGOPS Answer: E
v$sesSION_LONGOPS视图记录了执行时间长于6秒的某个操作(这些操作可能是备份,恢复,Hash Join,Sort,
nested loop,table Scan,Index Scan 等等)。 要想
v$sesSION_LONGOPS视图中有记录 1.必须将初始化参数 timed_statistics设置为true或者开启sql_trace 2.必须用ANALYZE或者
DBMS_STATS对对象收集过统计信息 要理解的就是:比如某个
sql语句执行时间比较长,但是每个操作都没有超过6秒钟,那么你在
v$sesSION_LONGOPS这个视图中就无法查询到该信息。
还有一点就是,即使某个操作完成了,你在该视图中也可能查询到该操作依然记录在视图中。 这个视图通常用来分析sql运行缓慢的原因,配合
v$sesSION视图。 (346)
what is the impact of the results of the output of the following command?
RMAN> report unrecoverable database; Report of files that need
BACkup due to unrecoverable operations file Type of
BACkup
required name 4 full or incremental C:\
OracLE\ORADATA\ORCL\USERS01.DBF A. There are no
BACkup sets with any
BACkups of the users01.dbf
DATAFILE. B. The users01.dbf
DATAFILE has had unrecoverable operations occur in it. It will need to be
BACked up or some data loss is possible during a recovery. C. The users01.dbf
DATAFILE is corrupted. D. The users01.dbf
DATAFILE BACkup exceeds the retention criteria. E. The last
BACkup of the users01.dbf
DATAFILE Failed and must be rerun. 答案:(B) 解析: 列出所有unrecoverable的数据文件. 一个数据文件被认为是unrecoverable的,从这个数据文件的上次备份后,
对数据文件中存储的对象执行了unrecoverable操作. 在unrecoverable操作中,不会产生redo数据. 例如表数据的直接加载;
使用NolOGGING选项更新数据 注意:数据文件不存在任何备份不是认为该数据文件是unrecoverable的充分条件.例如数据文件可以使用CREATE
DATAFILE 命令创建,如果从数据文件
创建后,所有的redo log都存在. (347)
what does the output on this report in
Dicate?
RMAN> report need
BACkup;
RMAN retention policy will be applIEd to the command
RMAN retention policy is set to redundancy 1 Report of files with less than 1 redundant
BACkups file #bkps name 5 0 C:\
OracLE\ORADATA\ORCL\MY_DATA_01.DBF A. The my_data_01.dbf
DATAFILE is corrupted and needs to be restored. B. The my_data_01.dbf
DATAFILE has not yet been
BACked up. This report does not imply that the data in the
DATAFILE can not be recovered. C. The my_data_01.dbf
DATAFILE has not yet been
BACked up. This report implIEs that the data in the
DATAFILE can not be recovered. D. The my_data_01.dbf
DATAFILE no longer meets the retention criteria for
BACkup
s. E.
DATAFILE 5 is missing. 答案:(B) 解析: C(X),从结果来看,这个文件目前没有备份,但没用备份的文件,也可以使用redo日志来恢复 348.
what does the minimize load database parameter mean when
BACking up a database? C.
RMAN will spread the
BACkup IO over the @R_161_1
0586@l duration stated in the
BACkup command 控制
RMAN操作的整体影响 有些时候,我们需要减低
RMAN 读写数据的速度。 在10g之前,我们可以使用
RMAN 的rate 和 readrate 来抑制
RMAN读写数据的速度,释放系统资源以用于其他操作。 在10g之后,可以在
BACkup命令中使用duration参数来控制备份的持续时间。 Duration 参数有一个额外的关键字 minimize load,该关键字用于指示
RMAN 最小化在给定持续时间内备份数据库所需的I/O负载。 如,如果一个备份需要花费5个小时,占用90%的I/O,则可以指示
RMAN,使用10个小时持续时间。 当minimize load 参数指示这一点时,就可以使用45%到50%的可用I/O。
BACkup as copy database duration 10:00 minimize load database; 该命令让备份运行10个小时。 当然使用duration 参数的实际备份时间可能超过10个小时。 任何完整的备份集都可以用于恢复,即使备份进程由于持续时间导致的问题而失败。 在超出持续时间并且备份失败时,我们可以使用partial 关键字取消
RMAN 错误。 使用duration 参数时,包含最老备份的数据文件比包含日期最新
RMAN备份的数据文件具有更高的优先级。 比如,备份20个数据文件,若在备份完10个后失败,那么下次备份从没有备份的那10个数据文件开始备份。 349.
what is the result of this command?
RMAN> Report need
BACkup days 3; E. Lists all
DATAFILEs not
BACked up in the last three day
s. It does not imply暗示,意指 that the
DATAFILE is not recoverable可恢复的. Answer: E 350.Why would you execute the report obsolete过时的 command? B. To List all
BACkups that had aged beyond the
RMAN retention criteria 超出有效期 351.
what information does the report
scheR_982_11845@a command not provIDe? (Choose all that apply.) A. Size of the
DATAFILEs B. Size of the tempfiles C. Date of last
BACkup for
DATAFILEs and tempfiles D. fil
enames for each
DATAFILE E.
checkpoint SCN associated with the last
RMAN BACkup Answer: CE 352.If a
BACkup is expired,which of the following is true? E. The physical
BACkup set pIEces are missing from the media. Answer: E 353.True or
false: tablespace point-in-time recovery is possible only with
RMAN. A. True B.
false Answer: B 354.Which command is used to begin a tablespace point-in-time recovery? B. Recover tablespace TSPITR(
表空间时间点恢复)用于将一个或多个
表空间恢复到过去某个时间点的状态,而其他
表空间仍然保持现有状态。 TSPITR 相关的概念和术语:
(1) TSPITR (tablespace Point-In-Time Recover)。TSPITR 是
表空间时间点恢复的英文缩写格式,它表示将一个或多个
表空间恢复到过去时间点的状态,而其他
表空间仍然保持现有状态。 (2) TSPITR 实现方法。当实现
表空间时间点恢复时,既可以使用用户管理的
表空间时间点恢复方法,也可以使用
RMAN 管理的
表空间时间点恢复。 (3) DBPITR (Database Point-In-Time Recovery)。DBPITR 是数据库时间点恢复的英文缩写格式,它表示将数据库的所有
表空间恢复到过去时间点的状态。注意,DBPITR 只适用于ARCHIVELOG 模式。 (4) 主数据库(Pri
Mary Databas
E)。主数据库是指用于存放应用系统数据的
Oracle 数据库,也被称为产品数据库或目标数据库。当执行TSPITR 时,主数据库是指包含被恢复
表空间的数据库。 (5) 恢复集(Recovery Set)。恢复集是指在主数据库上需要执行 TSPITR 的
表空间集合。注意,当在恢复集的
表空间上执行TSPITR 时,要求这些
表空间必须是自包含的。 (6) 辅助数据库(Auxiliary Databas
E)。辅助数据库是主数据库的一个副本数据库。当执行TSPITR 时,辅助数据库用于将恢复集
表空间恢复到过去时间点。注意,辅助数据库的所有物理文件都是从主数据库备份中取得,并且辅助数据库必须包含SYstem
表空间、UNDO
表空间以及恢复集
表空间的备份文件。 (7) 辅助集(Auxiliary Set)。辅助集是指辅助数据库所需要的、除了恢复集
表空间文件之外的其他文件集合。当执行 TSPITR 时,辅助数据库除了需要恢复集
表空间的备份文件之外,还需要备份控制文件、SYstem
表空间的备份文件、UNDO
表空间的备分文件 RECOVER tableSPACE AA UNTIL time "to_date('2015-05-24 19
:41:00','YYYY-MM-DD HH24:mi:ss')" auxiliary des
Tination '/u01/auxdest'; 355.When youre performing active database duplication,a
BACkup of
what kind is
required? B. No
BACkup is
required. 356.Which of the following commands will perform an active database duplication of the ORCL database to the ORCL2 database? E. Set
oracle_sid=orcl
RMAN target=sys/robert auxname=sys/Robert@orcl2 duplicate target database to neworcl from active database nofil
enamecheck spfile set control_files 'c:\
Oracle\oradata\neworcl\control01.ctl','c:\
Oracle\oradata\neworcl\control02.ctl' set db_
file_name_convert 'c:\
Oracle\oradata\orcl','c:\
Oracle\oradata\neworcl' set log_
file_name_convert 'c:\
Oracle\oradata\orcl','c:\
Oracle\oradata\neworcl'; Answer: E For active database duplication,you must connect to the
source database as TARGET and to the auxiliary instance as AUXIliARY. You must use the same SYSDBA
password for both instances and must supply the net
service name to connect to the AUXIliARY instance. A recovery catalog connection is optiona
l. Example 24-1 Duplica
Ting to a Host with the Same Directory Structure (Activ
E) DUPliCATE TARGET DATABASE TO dupdb FROM ACTIVE DATABASE
passworD file SPfile NOfil
enamechecK; 指定下列参数来显式控制辅助数据库的文件命名: • CONTRol_fileS • DB_
file_name_CONVERT • LOG_
file_name_CONVERT CONTRol_fileS='/u01/app/
Oracle/oradata/aux/control01.ctl','/u01/app/
Oracle/oradata/aux/control02.ctl','/u01/app/
Oracle/oradata/aux/control03.ctl' DB_
file_name_CONVERT='/u01/app/
Oracle/oradata/orcl','/u01/app/
Oracle/oradata/aux' LOG_
file_name_CONVERT='/u01/app/
Oracle/oradata/orcl','/u01/app/
Oracle/oradata/aux 357.How many database instances are used during a database-duplication process? B. Two 358.
what command is used to reset a database to a prevIoUs incarnation前身? C. reset database to incarnation reset incarnation的分析之一 --实体5中有备份,现在需要将数据库恢复到实体5的数据中,首先重置实体
RMAN> reset database to incarnation
5; 将数据库重置为原型 5 --在重置实体后,restore和recover都会针对重置设置的实体进行,
RMAN自动选择重置到的实体5所对应的备份进行恢复
RMAN> restore database; 启动 restore 于 26-3月 -08 359.
what vIEw would you use to determine if a given tablespace is fully self-contained独立自包含的 for the execution of a tablespace point-in-time recovery? C. TS_PITR_
checK 使用TS_PITR_
checK 视图来确保恢复集是完整的,并且标识所有可能要用到的其他
表空间。 首先需要检查TS_PITR_
checK 视图来确保没有其他相关的
表空间。 比如我们检查DAVE
表空间,
示例代码如下: TS_PITR_
checK This vIEw,created by catpitr.sql,provIDes information on any dependencIEs依赖性 or re
Strictions限制 that might prevent tablespace point-in-time recovery from proceeding. This vIEw applIEs only to the tablespace point-in-time recovery feature. 360.When performing a full database disaster recovery with
RMAN,in
what order would you execute
these steps? 360.When performing a full database disaster recovery with
RMAN,in
what order would you execute
these steps? A. Restore the control file from auto
BACkup
s. B. Run the
RMAN restore and recover command. C. Restore the database spfile from auto
BACkup
s. D. Make the
RMAN BACkup set pIEces available. E. Open the database with the alter database open resetlogs command. F. Open the database with the alter database open command. G. a,f H. c,f I. d,f J. d,e K. d,e Answer: E 是备份集可用--》还原spfile --> 还原控制文件--》》使用
RMAN 还原和恢复---》》 restlog日志打开数据库 361.When performing a database duplication,which duplicate database parameter would you set to ensure that the online redo logs are created in the correct
LOCATIOn? A. log_
file_name_convert 362.Which command would correctly start a TSPITR of the USERS tablespace? E. recover tablespace users until time,10/06/2008:22
:42:00 auxiliary des
Tination,c:\
Oracle\auxiliary; Answer: E 363.True or
false: you can perform an active database duplication when the database is in NOARCHIVELOG mode. A. True B.
false Answer: B 364.When running the tablespace point-in-time command recover tablespace users until time,10/06/2008:22
:42:00 auxiliary des
Tination,c:\
Oracle\auxiliary; you receive the following error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR
messaGE STACK FolLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/08/2008 16:00:30
RMAN-20202: tablespace not found in the recovery catalog
RMAN-06019: Could not translate tablespace name "USERS"
what is the likely cause of the error? B. There is not a current
BACkup of the database available 365.Which of the following re
Strictions限制条件 are not true with respect to关于 tablespace point-in-time recovery? (Choose all that apply.) 那些不是真的 ,那些事错误的 A. The target database must be in NOARCHIVELOG mode. B. No
BACkup is
required of the database before you perform a TSPITR. C.
you must have all archived redo logs generated since the last
BACkup up to the point to which
you want to restore the transport set. D. If you r
ename a tablespace,you can not perform a TSPITR to any point in time before that r
ename operation occurred. E. If you have tables in tablespace_1 that have associated cons
Traints in tablespace_2,then you must transport both tablespace
s. Answer: AB 366.If you are going to run a TSPITR recovery,which vIEw will
Help you to determine which ob
jects will be lost during the TSPITR? C. TS_PITR_OB
jeCTS_TO_BE_DROPPED 在执行TSPITR后 确定丢失的对象 367.Youre performing tablespace point-in-time recovery on a tablespace called USER
s. If an ob
ject in that tablespace has a foreign key cons
Traint
owned by another ob
ject in the INDEX_TBS,which statement is true? 包含外键 B. You must perform the TSPITR recovery of both tablespaces for it to be
successfu
l. 必须两个
表空间都恢复 368.When issuing the duplicate database command,you use the parameter DB_
file_name_CONVERT. For
what purpose do you use this parameter? D. To in
Dicate指示指出 the
LOCATIOn of the auxiliary-instance database
DATAFILEs. db_
file_name_convert和log_
file_name_convert
从库通过主库的备份恢复控制文件--->恢复控制文件时,
Oracle查看
从库参数文件中的db_
file_name_convert和log_
file_name_convert参数---->将主库保存数据文件、
联机日志的路径转换成
从库保存数据文件、
联机日志的路径---->生成
从库的控制文件 369.Which of the following IDentifIEs识别 and creates an index to minimize最小化时间 the DB time for a particular特定的 sql statement? C. The sql Tuning Advisor 下列哪项识别和创建索引,以尽量减少DB时间为特定的
sql语句? sql优化指导:分析各个 sql 语句,并建议 sql 概要文件,统计信息,索引和重构的 sql 以改善 sql 性能。 sql访问指导:评估 sql 的全部工作量,并建议索引,分区和实体化视图,它们将改善 sql 工作量的总体性能。 370.Why should you
BACk up a duplicated 复制的 tablespace after a TSPITR is complete? 在TSPITR完成后 备份一个复制的
表空间 B. The tablespace c
Annot be duplicated复制 or restored to the point in time before the duplication.在副本之前 执行TSPITR后,这个
表空间之前的备份就不可以使用的 371.In
what state are the
DATAFILEs of a tablespace after a TSPITR has been
successfully completed? A. The
DATAFILEs have an ONliNE statu
s. 基于时间点的
表空间恢复成功完成后,数据文件都时在线状态 执行完全自动执行的TSPITR 1. 配置在目标实例上执行TSPITR 所需的通道。 2. 使用AUXIliARY DES
TinATION选项指定辅助目标。
RMAN> CONNECT TARGET
RMAN> RECOVER tableSPACE users,example > UNTIL TIME '2007-06-29:08:00:00' > AUXIliARY DES
TinATION > '/u01/app/
Oracle/oradata/aux'; 3. 备份恢复的
表空间并使它们联机。
RMAN>
BACKUP tableSPACE users,example;
RMAN> sql "
alter tableSPACE users,example ONliNE"; 执行完全自动执行的TSPITR 时,
还必须: • 配置在目标实例上执行TSPITR 所需的任何通道 • 指定
RMAN 用于数据文件辅助集和其它辅助实例文件的目标 在TSPITR 完成之后,备份恢复的
表空间并使它们联机。执行TSPITR 之后,不能使用TSPITR 之前创建的参与执行TSPITR 的
表空间的备份 372.Which command do you use to generate a report of database incarnations? A. List incarnation of database 373.Which of the following
Oracle features utilize利用 the undo tablespace? (Choose all that apply) A.
Flashback Query 闪回查询 B.
Flashback DROP C. Flash
BACk table
闪回表 D. Flash
BACk Database E.
transaction Processing 事务处理 F. Recycle Bin Answer: ACE
transaction Processing事务处理会在undo和redo产生数据。
Flashback DROP:利用recyelebin 回收站原理 flash
BACk table TEST10 to before drop [r
ename to test11];可以重命名
Flashback Query ,依赖undo数据,先查询,在做insert insert into test10
SELEct
* FROM test10 as of
timestamp to_
timestamp('2013-09-23 11:52:06','yyyy-mm-dd hh24:mi:ss'
); flash
BACk table 依赖undo块 flash
BACk table scott.test10 to scn 1952615 insert into test10
SELEct * from scott.test10 as of scn 195261
5; flash
BACk database DDL语句,依赖闪回区的闪回日志 flash
BACk database to
timestamp to_
timestamp('2013-09-23 15:09:52','yyyy-mm-dd hh24:mi:ss'
);时间减一秒。 374.Which of the following statements are true regarding the Recycle Bin? (Choose all that apply.) A. The Recycle Bin is a physical storage area for dropped ob
ject
s. B. The Recycle Bin is a logical container for dropped ob
ject
s. C. The Recycle Bin stores the results of a
Flashback DROP operation. D. The ob
jects in the Recycle Bin are stored in the tablespace in which they were created. Answer: BD 如果不启用回收站,则
删除表时,与该表及其从属对象关联的空间会立即变为可回收(也就是说,该空间可用于其它对象)。 如果启用了回收站,则
删除表时,与该表及其从属对象关联的空间不会立即变为可回收,即使该空间确实显示在DBA_FREE_SPACE中。 相反,会在回收站中引用删除的对象,这些对象仍属于其各自的所有者。在空间不紧张时,绝不会把回收站对象使用的空间自动回收。 这样,你就能在尽可能长的期限内恢复回收站对象。 将删除的表“移动”到回收站时,将使用系统生成的名称对该表及其关联对象和约束条件进行重命名。重命名惯例如下:BIN$unique_ID$version。 其中,unique_ID是该对象的全局唯一标识符,包含26 个字符,用于在所有数据库之间唯一地标识回收站名称,而version是数据库分配的版本号。 回收站本身是一个数据字典表,用于维护已删除对象的原始名称与各自系统生成名称之间的关系。可使用DBA_RECYCLEBIN视图查询回收站。 3
Flashback DROP Flashback DROP 是从
Oracle 10g 开始出现的,用于恢复用户误删除的对象(
包括表,索引等), 这个技术依赖于tablespace Recycle Bin(
表空间回收站),这个功能和windows的回收站
非常类似。 Flash
BACk 不支持sys用户. system
表空间下的对象,也不能从回收站里拿到。 故使用SYS 或者SYstem用户登陆时, show recyclebin 为空。
Flashback DROP 是基于tablespace RecycleBin 来实现恢复的。 它只支持闪回与table 相关连的对象,比如表,索引,约束,触发器等。 如果是函数或者存储过程等,就需要使用
Flashback Query来实现。 3.1 tablespace Recycle Bin 从
Oracle 10g 开始, 每个
表空间都会有一个叫作回收站的逻辑区域,当用户执行drop命令时, 被删除的表和表的关联对象( 包括索引, 约束,触发器,LOB段,LOB index 段) 不会被物理删除, 这些对象先转移到回收站中,这就给用户提供了一个恢复的可能。 初始化参数recyclebin 用于控制是否启用recyclebin功能,缺省是ON, 可以使用OFF关闭。 TEST@orcl2> show parameter recycle; name TYPE VALUE ------------------------------------ ----------- ------------------------------ buffer_pool_recycle
String db_recycle_cache_size big
Integer 0 recyclebin
String on 禁用该功能: sql> alter system set recyclebin=off; sql> alter system set recyclebin=on; sql> alter session set recyclebin=off; sql> alter session set recyclebin=on;
表空间的Recycle Bin 区域只是一个逻辑区域,而不是从
表空间上物理的划出一块区域固定用于回收站, 因此Recycle Bin是和普通对象共用
表空间的存储区域, 或者说是Recycle Bin的对象要和普通对象抢夺存储空间。 当发生空间不够时,
Oracle会按照先入先出的顺序覆盖Recycle Bin中的对象。 如果
表空间的数据文件打开了自动扩展,则
在数据文件扩展之前,不会清除recyclebin中的内容。 每次扩展的时候,
Oracle实际上是执行了alter database
DATAFILE resize命令。 也可以手动的删除Recycle Bin占用的空间: 1). Purge tablespace
tablespace_name: 用于
清空表空间的Recycle Bin 2). Purge tablespace
tablespace_name user
user_name: 清空指定
表空间的Recycle Bin中指定用户的对象 3). Purge recyclebin: 删除当前用户的Recycle Bin中的对象 4). Purge dba_recyclebin: 删除所有用户的Recycle Bin中的对象,该命令要sysdba权限 5).
drop table table_name purge: 删除对象并且不放在Recycle Bin中, 即永久的删除,不能用Flash
BACk恢复。 6). Purge index recycle_bin_
object_name: 当想释放Recycle bin的空间, 又想能恢复表时,可以通过释放该对象的index所占用的空间来缓解空间压力。 因为索引是可以重建的。 375
.over the course of a day,a department performed multiple DML statements (inserts,
updates,
deletes) on multiple rows of data in multiple table
s. The manager would like a report showing the time,table name,and DML type for all changes that were made. Which Flash
BACk technology would be the best choice to produce the List? C. Flash
BACk
transaction query Flash
BACk
transaction query也是使用UNDO信息来实现。利
用这个功能可以查看某个事务执行的所有变化,它需要访问flash
BACk_
transaction_query 视图,这个视图的XID列代表事务ID,利
用这个ID可以区分特定事务发生的所有数据变化。 376.A user named Arren is execu
Ting this query:
SELEct table_name,operation,undo_sql from flash
BACk_
transaction_query t,
(SELEct versions_xID as xID from
employees versions
between scn minvalue and maxvalue where
employee_ID = 123) e where t.xID = e.xID; When the query runs,he receives an ORA-01031: insufficIEnt privileges error. Since the user owns the
employees table,you kNow that
it is not the proble
m. Which of the following sql statements will correct this problem? A. GRANT
SELECT ANY
transaCTION TO ARREN; Answer: A 此题为用户没有足够的权限来查询flash
BACk_
transaction_query这张表。 实验验证: sys@TEST1107> conn scott/tiger Connected. scott@TEST1107>
SELEct xID from flash
BACk_
transaction_query where rownum<
5; SELEct xID from flash
BACk_
transaction_query where rownum<5 * ERROR at line 1: ORA-01031: insufficIEnt privileges scott@TEST1107> conn /as sysdba Connected. sys@TEST1107> grant
SELEct any
transaction to scott; Grant succeeded. sys@TEST1107> conn scott/tiger Connected. scott@TEST1107>
SELEct xID from flash
BACk_
transaction_query where rownum<
5; XID ---------------- 01000900DA0A0000 01000900DA0A0000 01000900DA0A0000 01000900DA0A0000 [
Oracle@rtest ~]$ oerr ora 01031 01031,00000,"insufficIEnt privileges" // *Cause: An attempt was made to change the current username or
password // without the appropriate privilege. This error also oc
curs if // attemp
Ting to install a database without the necessary opera
Ting // system privilege
s. // When Trusted
Oracle is configure in DBMS MAC,this error may occur // if the user was granted the necessary privilege at a higher label // than the current login. // *Action: Ask the database administrator to perform the operation or grant // the
required privilege
s. // For Trusted
Oracle users get
Ting this error although granted the // the appropriate privilege at a higher label,ask the database // administrator to regrant the privilege at the appropriate labe
l. [
Oracle@rtest ~]$ 377.AUM has been retaining about 15
minutes worth of undo.
you want to double the retention period,but not at the expense of new
transactions failing. 但是不能以新事物失败为代价 You decIDe to alter the system to set the parameter UNDO_RETENTION=18000. However,AUM still retains only about 15
minutes worth of undo.
what is the problem? (Choose the best answer.) 保留时间延长到18000 C. The undo tablespace is not set to auto-extend. 题中说希望把保留时间变为30分钟,但是不能让新的事务失败为代价。 如果想把时间变为30分钟,有两个方法,一个是
设置rETENTION GUaraNTEE,确保保留时间为30分钟。 一个是让undo
表空间自动增长。 而
设置rETENTION GUaraNTEE,但undo
表空间是固定尺寸的情况下,会让新的事务失败。 故最好的办法就是让undo
表空间自动增长。 378.In order to perform Flash
BACk
transaction query operations,which of
these steps are
required? (Choose all that apply.) A. Ensure that database is running with version 10.1 compatibility. B. Enable Flash
BACk Logging. C. Enable Supplemental Logging. D. Ensure that the database is running with version 10.0 compatibility. E. Ensure that the database is in ARCHIVELOG mode Answer: CD supplemental logging作用 全库级别的supplemental logging和表级别的supplemental logging 各种组合的效果总结如下: (1)、当全库supplemental logging以minimal模式开启时(此时IMU会被禁掉): (a) 如果不对目标表单独开启supplemental logging,则
Oracle在redo中并不会额外的记录主键列和其他列的值; (b) 如果对目标表单独开启主键模式的supplemental logging,则又细分为如下两种情况: (b1)如果目标表有主键,则
Oracle会在redo中额外的记录主键列的值; (b2)如果目标表没有主键,则
Oracle会在redo中额外的记录所有列的值; (2)、当全库supplemental logging以主键模式开启(此时IMU会被禁掉)且目标表并没有单独开启任何模式的supplemental logging时: (a) 如果目标表有主键,则
Oracle会在redo中额外的记录主键列的值; (b) 如果目标表没有主键,则
Oracle会在redo中额外的记录所有列的值; (3)、当把全库supplemental log禁掉后(此时IMU会被开启),不管目标表是否单独开启主键模式的supplemental logging,
Oracle在redo中都并不会额外的记录主键列和其他列的值。 Configuring Your Database for
Oracle Flash
BACk
transaction query To configure your database for the
Oracle Flash
BACk
transaction query feature,you or your database administrator must: Ensure that
Oracle Database is running with version 10.0 compatibility. Enable supplemental logging: ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; 379.Users notify you that
their application is failing every time they try to add new record
s. Because of poor application design,the actual ORA error
message is unavailable.
what might be the problem? (Choose the best answer
s.) A. The application user has exceeded
their undo quota. 超出undo配额 E. The RETENTION GUaraNTEE option is set on the undo tablespace. undo
表空间上设置了 保留参数 Answer: AE 380.Which of the following statements best describes Flash
BACk Versions query? D. Flash
BACk Versions query is used to vIEw all version changes on rows that existed
between two points in time. Answer: D 闪回版本查询,允许查看一个行所有提交的版本,包括创建和结束每个版本的时间戳
SELEct versions_xID,versions_starttime,versions_endtime.. from emp versions
between
timestamp (sys
timestamp- 1/2
4) And sys
timestamp where
empno=8000 在最近一个小时内存在的员工编号为8000 的所有版本 381.Which pseudo
column伪列 Could you use to IDentify a unique row in a Flash
BACk Versions query? C. VERSIONS_XID 创建此版本的行的事务的唯一标识符 382.Which of the following can be used in conjunction with a Flash
BACk Versions query to filter the results? (Choose all that apply.) 过滤条件 A. A range of SCN values SCN范围 C. A star
Ting and ending
timestamp 时间戳范围 383.At the
request of a user,you issue the following command to restore a dropped table: flash
BACk table "BIN$F2JFfMq8Q5unbC0ceE9eJg==$0" to before drop; Later,the user notifIEs you that the data in the table seems to be very old and out of date.
what might be the problem? C. A prevIoUs
Flashback DROP operation had been performed,resul
Ting in multiple versions of the table being stored in the Recycle Bin. 先前执行了闪回删除操作,在回收站中有多个表版本
SELEct
object_name,
original_name,type from
user_recyclebin (384)Which of the following statements is true regarding the VERSIONS
betweeN clause? A. The VERSIONS
betweeN clause may be used in DML statement
s. B. The VERSIONS
betweeN clause may be used in DDL statement
s. C. The VERSIONS
betweeN clause may not be used to query past DDL changes to table
s. D. The VERSIONS
betweeN clause may not be used to query past DML statements to table
s. 答案:(C) 解析: A(X),B(X),VERSIONS
betweeN子句只能用于
SELECT语句,查询过去对表的DML操作 385.Which of the following statements is true regarding implemen
Ting a Flash
BACk table recovery? D. Flash
BACk table recovery is completely dependent on the availability of undo data in the undo tablespace. Answer: D A(X),SCN肯定会用到,即使没显式使用,
Oracle
自己也会使用 B(X),任何情况下都需要开启行移动 386.You have just performed a FLASH
BACK table operation using the following command: flash
BACk table
employees to scn 123456; The
employees table has
triggers associated with it. Which of the following statements is true regarding the state of the
triggers during the Flash
BACk table operation? A. All the
triggers are Disabled. FLASH
BACK table语句 (387)Which method Could be utilized to IDentify both DML operations
and the sql statements needed to undo those operations for a specific
scheR_982_11845@a
owner?(Choose all that apply.) B. query FLASH
BACK_
transaCTION_query for table_name,OPERATION,and UNDO_sq
l.limit rows by START_SCN and table_
owneR. C. query FLASH
BACK_
transaCTION_query for table_name,and UNDO_sq
l.limit rows by START_
timestAMP and table_
owneR. 答案:(B、C) 解析: 根本没有DBA_
transaCTION_query这个视图,A,D答案完全一样 START_SCN和START_
timestAMP都是指一个时间点。 FLASH
BACK_
transaCTION_query 388.Flash
BACk Database relIEs on which technologIEs to recover to a point in time? 闪回数据库依赖于哪一项技术恢复到固定时间点 B. Flash
BACk logs in the flash recovery area 闪回区的闪回日志 389.The _______ writes the Flash
BACk Database logs in the flash recovery area. D. RVRW 配置闪回数据库步骤如下: (1)配置快速恢复区。 (2)使用初始化参数DB_FLASH
BACK_RETENTION_TARGET设置保留时间目标,指定可以闪回数据库的时间上限,单位为分钟。上图例子中指定2880分钟,2天。这个参数仅仅是一个目标值,而不保证一定可以达到,闪回时间间隔取决于快速恢复区保留了多少闪回数据。 (3)使用以下命令启用闪回数据库: ALTER DATABASE FLASH
BACK ON; 在启用闪回数据库之前,数据库必须配置为归档模式。 使用下面语句查询是否启用了闪回数据库:
SELECT
flashback_on FROM
v$database; 使用ALTER DATABASE FLASH
BACK OFF命令禁用闪回数据库,同时自动删除闪回日志。 注意:数据库只能在mount in exclusive模式下启用闪回数据库。 例子:配置闪回数据库 sql>
SELEct
flashback_on from
v$database; 当启用闪回数据库,RVWR(Flash
BACk Write)后台进程启动。这个后台程序从闪回缓冲区按顺序将闪回数据库数据写到闪回日志,闪回日志循环使用。当发出FLASH
BACK DATABASE命令,使用闪回日志将数据块还原到之前的映像,使用重做数据前滚到指定的时间点。 启用闪回数据库的开销取决于读/写的混合数据库负载。由于查询不需要记录任何闪回数据,写密集型的负载越大,打开闪回数据库的开销越高。 390.Which of
these are valID Flash
BACk Database recovery point parameters? (Choose all that apply.) A. SCN B.
timestamp C. named recovery point 391.When set
Ting up the Flash
BACk Data Archive,which of
these key parameters are
required? (Choose all that apply.) A. tablespace name
表空间名字 C. Retention 保留期限 392.To clean up old records that are in a Flash
BACk Data Archive and are past the retention period,
what must the DBA do? C. nothing; expired rows are automatically removed. 393.Which of the following initialization parameters have been deprecated
In Oracle 11g because of the introduction of the automatic Workload Repository? (Choose all that apply.) A.
BACKGROUND_DUMP_DEST B. FOREGROUND_DUMP_DEST C. CORE_DUMP_DEST D.
user_DUMP_DEST E. DIAGNOSTIC_DEST F. All of the above Answer: ACD 394.Which of the following statements is true regarding the initialization parameter DIAGNOSTIC_DEST? The default value is the value of the environment variable $
OracLE_HOME; if $
OracLE_HOME isn't set,z B. then
it is set to $
OracLE_HOME
Oracle Database 11g的FDI(Fault Diagnosability Infrastructure)是自动化诊断方面的又一增强。 FDI的一个关键组件是自动诊断库(automatic Diagnostic Repository-ADR)。 在
Oracle Database 11g之前,
Oracle的各类跟踪文件、日志
文件等诊断文件的存储位置并不统一,现在在FDI的基础架构之上,
Oracle开始统一规划这些文件的存储,ADR之于诊断文件,就类似于OFA(Optimal Flexible Architecture )之于
数据库文件,FRA(Flash Recovery Area)之于备份文件。 ADR的路径被称为ADR BASE,这个位置由
一个新的初始化参数DIAGNOSTIC_DEST决定。 sql> show parameter diagnostic_dest name TYPE VALUE ------------------------------------ ----------- ------------------------------ diagnostic_dest
String /opt/
Oracle 这个参数的
缺省值和环境变量
OracLE_BASE有关: ■ 如果设置了
OracLE_BASE 则 DIAGNOSTIC_DEST =
OracLE_BASE ■ 如果未设置
OracLE_BASE ,则 DIAGNOSTIC_DEST =
OracLE_HOME/log 我们可以简单看一下ADR BASE的目录结构 395.Which of
these formats represents the correct hIErarchy for the ADR? C. <diagnostic_dest>/diag/rdbms/<dbname>/<instname> 现在一目了然,包括ASM、CRS等组件日志都被ADR囊括其中。 对于FRA,通过
v$FLASH_RECOVERY_AREA_USAGE视图,
Oracle
可以知道闪回区的使用情况. 现在对于ADR,
Oracle可以通过
一个新的视图
v$diag_info来查询自动诊断库的信息: sql>
SELEct * from
v$diag_info; INST_ID name VALUE ---------- ------------------------- ------------------------------------------------------------ 1 Diag Enabled TRUE 1 ADR Base /opt/
Oracle 1 ADR Home /opt/
Oracle/diag/rdbms/eygle/eygle 396.Which of the following are not fundamental tasks of the Support Workbench? (Choose all that apply.) A. VIEw long-running sql workloads B. VIEw problem details C. Gather additional diagnostic information D. Create a
service
request E. Clean up incIDent data after upload to
Oracle Support Answer: AE 397.Which of the following tasks does the tool IncIDent Packaging
service (IPS) perform? B. IDentifIEs all files associated with a critical error and adds them to a zip file to be sent to
Oracle Support. 事件打包服务( IPS) 工具执行以下哪一个任务? B.标识与严重错误相关的所有文件,并将它们添加到一个zip文件后发送到
Oracle支持网站 398.Choose the correct order to package and upload data for an incIDent to
Oracle Support. D. Create new package,vIEw contents,vIEw manifest清单,
schedule计划表 399.Which of the following is not an advantage of block media recovery (BMR)? 不正确的是 B.
DATAFILEs remain offline while corrupt blocks are repaired. 400.Which of the following methods can be used to detect block corruption? A. ANALYZE operations B. dbv C. sql querIEs that access the potentially corrupt block D.
RMAN E. All of the above Answer: E DBV工具的使用 DBV是一个外部命令,能够执行物理数据结构的完整性检查。DBV只能检查可缓存管理的块(数据
块),所以只能用于数据文件,不支持控制文件和
重做日志文件的块检查。DBV使用于offline或者online的数据文件,也可也验证备份文件,但是备份文件只能是
RMAN的copy命令
或者操作系统的cp(win下是copy)命令备份的数据文件。控制文件和
重做日志文件的检查可以用
DBMS_HM包完成。 DBV有两种命令行接口,一是验证数据文件的数据块,二是验证段。下面分别做测试: DBV除了能检查有内容的数据块,可以检查空数据块,这充分证明了dbv是从物理层面上验证数据块的完整性。 401.Which of the following are correct about block media recovery? (Choose all that apply.) A. Physical and logical block corruption is recorded automatically in
v$DATABASE_BLOCK_ CORRUPTION. C. Physical corruptions are repairable by BMR. 关于
RMAN的块恢复。Block是
Oracle数据库最小恢复单位。
鉴于此,BMR可以大大缩短恢复的时间,另外,在进行BMR时不需要停掉数据库,
可以直接在数据库open状态
对数据文件进行恢复,只
是需要恢复的块被锁定无法访问,可以说对应用的影响非常小。 何时需要进行BMR? Block media recovery 不适合用在丢失数据的起点的情况,比如数据文件丢失了,这种情况下做数据文件的介质恢复会是最好的选择。BMR并不是用来取代传统方法的,而是有益的补充。 大多数情况下,数据库将一个block打上坏块的标记,那么对整个数据库来说这个块都是不可以用的,数据库会offline该坏块,阻止用户对该块进行访问。而在
随后对该块的读取都
会出现错误,大部分会报I/O错误,直到该坏块被修复。这个时候你只能使用BMR对坏块进行修复(之所以说你只能
是因为
你的数据库不能因为这个而停止服务)。一般我们会在以下文件中发现坏块报告: 1.Error
messages in standard output; 2.Alert.log文件中 3.用户的trace文件 4.在使用 analyze table 和 analyze index时可能
会出现 5.在使用 dbverify工具
对数据文件进行检查时 6.第三方的介质管理软件中 以下是user trace文件中出现的坏块错误: ORA-01578:
OracLE data block corrupted (file # 7,block # 3) ORA-01110: data file 7: '/
Oracle/oradata/trgt/tools01.dbf' ORA-01578:
OracLE data block corrupted (file # 2,block # 235) ORA-01110: data file 2: '/
Oracle/oradata/trgt/undotbs01.dbf' 一旦发现有坏块的存在,就可以使用blockrecover对坏块进行恢复 Blockrecover
DATAFILE 7 block 3
DATAFILE 2 block 23
5; Blockrecover是基于redo的,如果在恢复时,发现找不到redo,则恢复不一定会成功。这里说不一定
是因为在blockrecover过程中,所有的block在blockrecover过程中都是独立的,不会去与其他文件的文件进行比较的,所以blockrecover都是成功的。但在blockrecover之后,
RMAN会将进行后续的检查工作,这个时候,如果
RMAN发现该块的ckp与其他不一致,则
RMAN会自动查找相关的redo,如果该block有被format过,那么则会主动忽略丢失的redo,则恢复成功,如果不是这样则会恢复失败。
大佬总结
以上是大佬教程为你收集整理的oracle11g OCP 认证 1Z0-053考试笔记4全部内容,希望文章能够帮你解决oracle11g OCP 认证 1Z0-053考试笔记4所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。