原 【DB宝9】Oracle 2019 OCP题目解析
1、目前网上留传的题库都是假的。望大家擦亮眼睛,仔细辨别。
2、Oracle 12.1只是Oracle的一个过渡版本,我们工作中常用到的是12cR2、18c(12.2.0.2)和19c(12.2.0.3)。本次2019 OCP培训针对工作内容进行培训。详情请私聊麦老师,QQ:646634621,微信:db_bao
题1、有关控制文件自动备份的题目
1 2 3 4 5 6 7 | Which three are true about configuring CONTROLFILE AUTOBACKUP by using RMAN? A) It requires the use of fast recovery area (FRA). B) The control file is backed up whenever a new table is created. C) The server parameter file (SPFILE) is automatically backed up each time the control file is backed up. D) The control file is backed up automatically each time the SPFILE is backed up manually. E) The control file is backed up whenever a new tablespace is created. F) The control file is backed up whenever an RMAN backup is successfully recorded in the catalog. |
正确答案:CDE
关于控制文件自动备份内容的官网说明:https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/configuring-rman-client-basic.html#GUID-98BA7492-7108-4DF9-B5A2-21957072E308
https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/rman-backup-concepts.html#GUID-95840C84-1595-49AC-923D-310DA750676B
You can configure RMAN to automatically back up the control file and server parameter file. The autobackup occurs whenever a backup record is added.
If the database runs in ARCHIVELOG mode, then an autobackup is also taken whenever the database structure metadata in the control file changes. A control file autobackup enables RMAN to recover the database even if the current control file, recovery catalog, and server parameter file are lost.
By default, control file autobackups are turned on for CDBs and standalone databases that have the COMPATIBLE initialization parameter set to 12.2 or higher.
该题的环境为Oracle 19.3环境,归档模式,以下为rman实验默认配置:
1 2 3 4 5 | RMAN> show all; RMAN configuration parameters for database with db_unique_name LHRCDB2 are: CONFIGURE CONTROLFILE AUTOBACKUP ON; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default |
关于在RMAN中配置控制文件自动备份的说法,正确的3个选项是什么?
对于A选项,可以不用配置FRA,如果配置中不写路径的话会备份到默认路径闪回恢复区FRA,如果闪回恢复区没有设置的话,那么就在$ORACLE_HOME/dbs下,但是告警日志中都会有提示。所以,该选项错误。
对于B选项,在建表后会自动备份控制文件,很显然是错误的。
对于C选项,在备份控制文件时,spfile会自动备份。此说法正确。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | RMAN> backup current controlfile; Starting backup at 2020-07-08 09:48:30 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set channel ORA_DISK_1: starting piece 1 at 2020-07-08 09:48:32 channel ORA_DISK_1: finished piece 1 at 2020-07-08 09:48:33 piece handle=+FRA1/LHRCDB2/BACKUPSET/2020_07_08/ncnnf0_tag20200708t094831_0.264.1045216113 tag=TAG20200708T094831 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 2020-07-08 09:48:33 Starting Control File and SPFILE Autobackup at 2020-07-08 09:48:33 piece handle=+FRA1/LHRCDB2/AUTOBACKUP/2020_07_08/s_1045216114.263.1045216115 comment=NONE Finished Control File and SPFILE Autobackup at 2020-07-08 09:48:35 |
此时,告警日志文件会记录控制文件自动备份文件的位置:
1 2 3 4 | 2020-07-08T09:48:34.238169+08:00 Control autobackup written to DISK device handle '+FRA1/LHRCDB2/AUTOBACKUP/2020_07_08/s_1045216114.263.1045216115' |
对于D选项,在手动备份spfile时,控制文件会自动进行备份。此说法正确。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | RMAN> backup spfile; Starting backup at 2020-07-08 09:41:21 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 2020-07-08 09:41:21 channel ORA_DISK_1: finished piece 1 at 2020-07-08 09:41:22 piece handle=+FRA1/LHRCDB2/BACKUPSET/2020_07_08/nnsnf0_tag20200708t094121_0.267.1045215681 tag=TAG20200708T094121 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 2020-07-08 09:41:22 Starting Control File and SPFILE Autobackup at 2020-07-08 09:41:22 piece handle=+FRA1/LHRCDB2/AUTOBACKUP/2020_07_08/s_1045215683.266.1045215683 comment=NONE Finished Control File and SPFILE Autobackup at 2020-07-08 09:41:24 |
此时,告警日志文件会记录控制文件自动备份文件的位置:
1 2 3 4 | 2020-07-08T09:41:23.630391+08:00 Control autobackup written to DISK device handle '+FRA1/LHRCDB2/AUTOBACKUP/2020_07_08/s_1045215683.266.1045215683' |
对于E选项,创建表空间后,控制文件也会自动备份,但是会延迟备份,延迟备份的时间由隐含参数“_controlfile_autobackup_delay”控制,默认300秒,即5分钟。这是11g的新特性,10g不会延迟备份,综上所述,该选项说法正确:
1 2 3 4 5 6 7 8 9 10 11 | RMAN> list backup of controlfile ; specification does not match any backup in the repository RMAN> create tablespace lhrtest ; Statement processed RMAN> list backup of controlfile ; specification does not match any backup in the repository |
真实有效,考过的!!
很详细
good