前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【DB宝9】甲骨人2019 OCP真题(082+083)

【DB宝9】甲骨人2019 OCP真题(082+083)

作者头像
AiDBA宝典
发布2020-07-16 15:11:10
2.5K0
发布2020-07-16 15:11:10
举报
文章被收录于专栏:小麦苗的DB宝专栏

注意事项

1、目前除了甲骨人公司外,还没有一个培训机构有2019 OCP的082和083完整真题,网上留传的题库都是假的。望大家擦亮眼睛,仔细辨别。 2、【甲骨人2019 OCP培训开班啦】 Oracle 12.1只是Oracle的一个过渡版本,我们工作中常用到的是12cR2、18c(12.2.0.2)和19c(12.2.0.3)。本次2019 OCP培训针对工作内容进行培训。详情请私聊麦老师,QQ:646634621,微信:db_bao

代码语言:javascript
复制
题1、有关控制文件自动备份的题目
题2、有关DBUA升级数据库的题目
题3、有关使用rman创建PDB的问题
题4、有关多重复制备份(Duplexed Backup Sets)的题目
题5、有关RPH的相关题目

有关2019 OCP的相关介绍请参考:【DB宝6】啥是2019 OCP?

题1、有关控制文件自动备份的题目

代码语言:javascript
复制
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实验默认配置:

代码语言:javascript
复制
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会自动备份。此说法正确。

代码语言:javascript
复制
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

此时,告警日志文件会记录控制文件自动备份文件的位置:

代码语言:javascript
复制
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时,控制文件会自动进行备份。此说法正确。

代码语言:javascript
复制
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

此时,告警日志文件会记录控制文件自动备份文件的位置:

代码语言:javascript
复制
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不会延迟备份,综上所述,该选项说法正确:

代码语言:javascript
复制
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

告警日志会记录表空间创建语句,控制文件自动备份会延迟进行:

代码语言:javascript
复制
2020-07-08T09:59:03.306008+08:00
create tablespace lhrtest 
Completed: create tablespace lhrtest 

2020-07-08T10:04:34.596339+08:00
Control autobackup written to DISK device

handle '+FRA1/LHRCDB2/AUTOBACKUP/2020_07_08/s_1045217074.263.1045217075'

查询隐含参数:

代码语言:javascript
复制
SYS@lhrcdb2> set line 9999
SYS@lhrcdb2> col NAME format a30
SYS@lhrcdb2> col KSPPDESC format a50
SYS@lhrcdb2> col KSPPSTVL format a20
SYS@lhrcdb2> SELECT a.INDX,
  2         a.KSPPINM NAME,
  3         a.KSPPDESC,
  4         b.KSPPSTVL 
  5  FROM   x$ksppi  a,
  6         x$ksppcv b
  7  WHERE  a.INDX = b.INDX
  8   and lower(a.KSPPINM) like  lower('_controlfile_autobackup_delay');

      INDX NAME                           KSPPDESC                                           KSPPSTVL
---------- ------------------------------ -------------------------------------------------- --------------------
      2292 _controlfile_autobackup_delay  time delay (in seconds) for performing controlfile 300
                                           autobackups

官网资料:

Note: Beginning with Oracle Database Release 11g Release 2, RMAN takes only one control file autobackup when multiple structural changes contained in a script (for example, adding tablespaces, altering the state of a tablespace or data file, adding a new online redo log, renaming a file, and so on) have been applied.

对于F选项,控制文件自动备份和catalog没有关系,F选项错误。

题2、有关DBUA升级数据库的题目

代码语言:javascript
复制
Which three are true about post upgrade activities when upgrading an Oracle database using Database Upgrade Assistant?
A) Time zone files must be upgraded manually using the DBMS_DST PL/SQL package.
B) The Oracle Application Express configuration should be updated after upgrading Oracle Database.
C) Any Recovery Manager (RMAN) recovery catalog must be upgraded manually.
D) After a manual upgrade, TNSNAMES.ORA entries must be updated to reflect the new ORACLE_HOME.
E) The new extended data type capabilty must be enabled by running the utlrp.sq1 script.

正确答案:BCE

Oracle 19c - 使用 DBUA 升级数据库到 Oracle Database 19c (19.x) 的完整核对清单 (Doc ID 2577574.1):http://blog.itpub.net/26736162/viewspace-2690457/

使用database upgrade Assistant升级Oracle数据库时,以下哪三项是正确的?

对于选项A,源库的timezone版本应当小于或等于目标数据库timezone版本。题目是must,所以错误。以下SQL可以查询时区文件的版本:

代码语言:javascript
复制
SELECT version FROM v$timezone_file;

对于选项B,Oracle Application Express即APEX组件,如果安装了APEX,则建议先升级源数据库中的APEX组件,然后再升级DB。也可以升级完DB后再升级APEX组件。所以,B选项正确。升级APEX组件可以参考:http://blog.itpub.net/26736162/viewspace-2222308/

对于选项D,TNSNAMES.ORA中不包含ORACLE_HOME变量,所以错误。

题3、有关使用rman复制PDB的问题

代码语言:javascript
复制
Which three are true about cloning databases into an existing CDB with RMAN?
A) A non-CDB can be cloned into a PDB.
B) A user with SYSDBA or SYSBKUP must be logged in with RMAN to the non-CDB being cloned when cloning a non-CDB.
C) Two or more PDBs can be cloned with the same command.
D) Only one PDB can be cloned at a time.
E) A user with SYSDBA or SYSBKUP must be logged in with RMAN to CDB$ROOT when cloning a PDB.
F) The target and auxiliary instance passwords must be the same.

正确答案:BDE

相关知识的官网连接:

https://docs.oracle.com/en/database/oracle/oracle-database/18/bradv/rman-duplicating-databases.html#GUID-F31F9FCE-B610-49EB-B9DB-44B9AA4E838F

https://docs.oracle.com/en/database/oracle/oracle-database/18/bradv/rman-duplicating-databases.html#GUID-EA6E8219-56BF-471C-AC5A-DFC55E760806

https://docs.oracle.com/en/database/oracle/oracle-database/18/bradv/rman-duplicating-databases.html#GUID-539E89F6-C0BC-49CB-8D8C-CD8FF88BAF32

https://docs.oracle.com/en/database/oracle/oracle-database/18/bradv/rman-duplicating-databases.html#GUID-23205E75-CFA8-4BCE-AC50-3D39DF040512

有关复制pdb到一个已经存在的cdb中的限制条件:

该题目需要注意,在rman中,克隆一个数据库到一个已经存在的cdb中:

对于选项A,duplicate不支持复制一个非cdb到一个pdb中。

对于选项C,一次不能复制多个pdb,但是可以一次克隆多个pdb到一个不存在的cdb中。

对于选项F,密码可以不用相同。

题4、有关多重复制备份(Duplexed Backup Sets)的题目

代码语言:javascript
复制
Which two are true about RMAN duplexed backup sets?
A) They can be written only to disk.
B) They can be created only by using the COPIES option of a BACKUP command.
C) They can be written to media.
D) They must be written to media.
E) They can be created by using the RMAN CONFIGURE command to specify duplexing before taking a backup.

正确答案:CE

官网说明:

https://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV107

Duplexed Backup Sets即多重复制备份。多重复制备份可以一次备份在不同路径生成最多4个完全一样的备份片,只能用于备份集,不能用于镜像.可以在磁盘或磁带上使用,但是不能同时在磁盘和磁带上进行多重备份.在磁带上使用时,注意备份集的个数不要超过磁驱的个数。

In RMAN, you can make multiple, identical copies of backups in the following ways: • Duplex backups with the BACKUP … COPIES command, in which case RMAN creates multiple copies of each backup set • Back up your files as backup sets or image copies, and then back up the backup sets or image copies with the RMAN BACKUP BACKUPSET or BACKUP COPY OF commands Duplexed Backup Sets When backing up datafiles, archived redo log files, server parameter files, and control files into backup pieces, RMAN can create a duplexed backup set, producing up to four identical copies of each backup piece in the backup set on different backup destinations with one BACKUP command. Duplexing is not supported for backup operations that produce image copies You can use the COPIES parameter in the CONFIGURE, SET, or BACKUP commands to specify duplexing of backup sets when using the BACKUP command. RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices The FORMAT parameter of the BACKUP command specifies the destinations for duplexed backups. The following example creates three copies of the backup of data file 7: BACKUP DEVICE TYPE DISK COPIES 3 DATAFILE 7 FORMAT '/disk1/%U','?/oradata/%U','?/%U'; RMAN places the first copy of each backup piece in /disk1, the second in ?/oradata, and the third in the Oracle home. RMAN does not produce three backup sets, each with a different unique backup set key. Rather, RMAN produces one backup set with a unique key, and generates three identical copies of each backup piece in the set.

题5、有关RPH的相关题目

代码语言:javascript
复制
Which three are true about Rapid Home Provisioning of Oracle software?
A) It can be used to create a single-instance Oracle Database in an already-installed Oracle home.
B) It can be used to deploy new homes without disrupting active databases.
C) It can be used to create templates of Oracle homes as gold images of only Oracle databases.
D) It can be used to upgrade only single-instance databases running on Oracle Restart.
E) It can be used to patch existing Oracle software installtions.
F) It can be used only on nodes with Oracle Grid Infrastructure installed.

正确答案:ABE

官网说明:

How To Setup a Rapid Home Provisioning (RHP) Server and Client (文档 ID 2097026.1)

http://www.oracle.com/technetwork/database/database-cloud/private/rapid-home-provisioning-2405191.pdf https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sprhp/what-can-i-do-rapid-home-provisioning.html

With Rapid Home Provisioning, you create, store,and manage templates of Oraclehomes as images (called gold images) of Oracle software, such as databases,middleware, and applications. You can make a working copy of any gold image and then you can provision that working copy to any node in the data center or cloudcomputing environment You can use Rapid Home Provisioning to provision, patch, and upgrade single instance databases running on clusters or on single, standalone nodes. However, Rapid Home Provisioning does not support single-instance databases for Oracle Restart configurations. Note: Rapid Home Provisioning is not supported on Microsoft Windows and HP-UX Itanium systems.

关于RHP的说法,正确的3个选项是什么?

对于C选项,不仅仅用于Oracle databases,而是middleware和applications都可以,所以C选项错误。

对于D选项,RHP不支持Restart环境的单实例数据库,所以D选项错误。

代码语言:javascript
复制
[root@lhr2019ocpasm /]# srvctl stop rhpserver
Usage: srvctl <command> <object> [<options>]
    commands: enable|disable|start|stop|status|add|remove|modify|update|getenv|setenv|unsetenv|config|upgrade|downgrade
    objects: database|service|asm|diskgroup|listener|home|ons|oraclehome
For detailed help on each command and object and its options use:
  srvctl <command> -help [-compatible] or
  srvctl <command> <object> -help [-compatible]
PRKO-2012 : rhpserver object is not supported in Oracle Restart

本文结束。

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2020-07-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DB宝 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 有关2019 OCP的相关介绍请参考:【DB宝6】啥是2019 OCP?
  • 题1、有关控制文件自动备份的题目
  • 题2、有关DBUA升级数据库的题目
  • 题3、有关使用rman复制PDB的问题
  • 题4、有关多重复制备份(Duplexed Backup Sets)的题目
  • 题5、有关RPH的相关题目
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档