ITPub博客

首页 > 数据库 > Oracle > OCP课程45:管理II之备份设置

OCP课程45:管理II之备份设置

原创 Oracle 作者:stonebox1122 时间:2016-03-09 16:58:16 0 删除 编辑

OCP课程45:管理II之备份设置

课程目标:

  • 使用EM进行备份设置
  • 启用控制文件自动备份
  • 配置备份位置
  • 分配通道
  • 备份优化配置
  • 创建压缩备份
  • 创建加密备份

1、为RMAN配置永久选项

clipboard

如果rman默认的永久选项不符合你的备和恢复策略,可以在rman中使用CONFIGURE命令对数据库的备份配置永久选项,包括:

  • 通道
  • 备份保留策略
  • 创建备份拷贝的数量
  • 默认备份类型,是备份集还是镜像拷贝
  • 备份片大小
  • 不需要备份的表空间
  • 启用和禁用备份优化
  • 定义归档删除策略
  • 为设备指定并行度
  • 指定加密和压缩参数

可以在会话中使用SET命令对以上选项进行修改,仅在当前会话有效。


2、查看永久设置

clipboard[1]

查看配置的2种方法:

RMAN> show all;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_stone.f'; # default

SQL> select * from v$rman_configuration;

     CONF# NAME                           VALUE

---------- ------------------------------ ------------------------------

         1 CONTROLFILE AUTOBACKUP         ON

         2 DEFAULT DEVICE TYPE TO         DISK

         3 BACKUP OPTIMIZATION            ON


3、控制文件自动备份

clipboard[2]

Oracle推荐启用控制文件自动备份。默认是禁用的,可以使用EM或者rman进行启用,启用后会在以下情况自动备份控制文件和启动数据库的服务器参数文件:

  • run块最后
  • 成功的备份被记录到rman记录库
  • 数据库结构改变(例如修改控制文件内容的DDL操作)

对于所有的设备类型,控制文件备份的名称使用默认的%F格式,可以直接指定控制文件位置进行恢复。%F格式显示为c-IIIIIIIIII-YYYYMMDD-QQ,其中:

  • IIIIIIIIII表示DBID
  • YYYYMMDD表示备份的时间
  • QQ表示序列化,2为16进制,从00到FF

可以使用CONFIGURE CONTROLFILE AUTOBACK FORMAT FOR DEVICE TYPE type TO 'string'修改默认格式。其中string必须包含%F,且不能包含其他格式变量。例如:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT

FOR DEVICE TYPE DISK TO '/u01/oradata/cf_ORCL_auto_%F';

如果不指定位置,控制文件自动备份到快速恢复区。

由于控制文件备份使用了固定格式的名称,即使当前控制文件,恢复目录以及服务器参数文件不可访问,rman也可以从自动备份中搜索和还原服务器参数文件和控制文件。

例子:配置控制文件自动备份

RMAN> configure controlfile autobackup on;

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters are successfully stored


4、管理永久设置

clipboard[3]

可以配置设备的并行度,并行度是读取或者写入设备的数据流的数量。例如有2个磁带驱动器,就可以配置并行度为2,这样2个磁带驱动器就可以同时进行备份。语法:

CONFIGURE DEVICE TYPE PARALLELISM 

例子:配置到磁带的并行度为2

RMAN> configure device type sbt parallelism 2;

new RMAN configuration parameters:

CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters are successfully stored

使用show命令查看配置,show all查看所有配置。

RMAN> show controlfile autobackup format;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defaul

RMAN> show device type;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

RMAN> show exclude;

using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name STONE are:

RMAN configuration has no stored or default parameters

使用clear选项将配置还原到默认值。

RMAN> configure default device type clear;

RMAN configuration parameters are successfully reset to default value

RMAN> show default device type;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default


5、使用介质管理器

clipboard[4]

rman需要使用Oracle Secure Backup(OSB)或者其他介质管理器才能将数据备份到磁带。Oracle数据库服务器调用介质管理库MML(Media Management Library)备份和恢复介质管理器管理的介质里面的数据文件。

当备份到磁盘的时候不需要连接到MML。

基本操作如下:

(1)安装和配置介质管理软件。

(2)备份操作系统的文件确保介质管理软件安装正确

(3)获取和安装第三方介质管理模块与Oracle数据库集成。

使用介质管理器进行备份和恢复操作

以下脚本将数据文件备份到磁带:

run {

# Allocating a channel of type 'sbt' for serial device

ALLOCATE CHANNEL ch1 DEVICE TYPE sbt;

BACKUP DATAFILE 3;

}

介质管理器对每个磁带的文件进行打标,执行恢复的步骤如下:

(1)Oracle数据库服务器请求恢复指定的文件。

(2)介质管理器定位包含文件的磁带并读取。

(3)介质管理器将数据传回给数据库会话。

(4)Oracle数据库服务器将文件写入磁盘。


6、指定备份位置

clipboard[5]

数据可以备份到磁盘目录,MML或者FRA。指定一个磁盘目录或FRA表示备份到硬盘媒体。通常情况下,备份通过介质管理接口定期移动到磁带上以保持磁盘空间的可用性。可以指定任何已经存在的磁盘目录作为备份的目的地。

MML可以用来复制文件到磁带设备,或进行代理复制。代理复制就是MML要求复制一个文件到磁盘或磁带设备。

如果设置了快速恢复区域,可以简化备份和恢复任务。数据库自动命名文件,在空间压力不足时删除已过时的文件。

备份到磁盘,使用上图的第一个命令。如果使用FORMAT关键字(指定备份的磁盘目录位置),则将该备份写入指定目录。如果配置了FRA,则写入到FRA;否则,将被写入到特定平台的默认位置。

RMAN> configure default device type to disk;

old RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO 'TAPE';

new RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO DISK;

new RMAN configuration parameters are successfully stored

备份到磁带,使用上图中的第二个命令。

RMAN> configure default device type to tape;

using target database control file instead of recovery catalog

new RMAN configuration parameters:

CONFIGURE DEFAULT DEVICE TYPE TO 'TAPE';

new RMAN configuration parameters are successfully stored


7、配置和分配通道

clipboard[6]

使用如下选择配置通道并执行备份:

  • 使用CONFIGURE命令配置自动通道,在RMAN提示符或者RUN块中使用BACKUP命令
  • 在RUN块中使用ALLOCATE CHANNEL命令手动分配通道并执行BACKUP命令

RMAN> configure channel device type disk format '/home/oracle/backup_%U';

new RMAN configuration parameters:

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

new RMAN configuration parameters are successfully stored

RMAN> configure channel 1 device type disk format '/home/oracle/backup_%U';

new RMAN configuration parameters:

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

new RMAN configuration parameters are successfully stored

RMAN> configure channel 2 device type disk format '/home/oracle/backup_%U';

new RMAN configuration parameters:

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

new RMAN configuration parameters are successfully stored

RMAN> show channel for device type disk;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

RMAN> configure channel device type disk clear;

old RMAN configuration parameters:

CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/home/oracle/backup_%U';

old RMAN configuration parameters are successfully deleted

RMAN> run{

2> allocate channel ch1 device type disk;

3> backup datafile 15;}

allocated channel: ch1

channel ch1: SID=23 device type=DISK

Starting backup at 10-JAN-16

channel ch1: starting full datafile backup set

channel ch1: specifying datafile(s) in backup set

input datafile file number=00015 name=+DATA/stone/datafile/tbs_03.277.900065973

channel ch1: starting piece 1 at 10-JAN-16

channel ch1: finished piece 1 at 10-JAN-16

piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t104758_0.354.900758879 tag=TAG20160110T104758 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=+FRA/stone/autobackup/2016_01_10/s_900758879.346.900758881 comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

released channel: ch1


8、创建冗余备份集

clipboard[7]

rman可以同时生成最多4份备份集,冗余备份集通常用于磁带备份,不能对FRA进行冗余备份集,也不能用于镜像拷贝。

冗余备份最简单的方式是使用BACKUP ... COPIES或者CONFIGURE ... BACKUP COPIES。对于DISK通道,通过FORMAT指定不同的备份位置,对于sbt通道,如果使用支持第二版的SBT API介质管理器,则自动备份到不同的介质去。

RMAN> backup copies 4 datafile 4 format '/home/oracle/backup_%U';

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/STONE/datafile/o1_mf_users_c06xczx2_.dbf

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16 with 4 copies and tag TAG20160110T110452

piece handle=/home/oracle/backup_0bqr10ak_1_1 comment=NONE

piece handle=/home/oracle/backup_0bqr10ak_1_2 comment=NONE

piece handle=/home/oracle/backup_0bqr10ak_1_3 comment=NONE

piece handle=/home/oracle/backup_0bqr10ak_1_4 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:17

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=/u01/app/oracle/fast_recovery_area/STONE/autobackup/2016_01_10/o1_mf_s_900759911_c93lm887_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

RMAN> run{

2> set backup copies 2;

3> backup datafile 4 format '/home/oracle/backup1/%U','/home/oracle/backup2/%U';}

executing command: SET BACKUP COPIES

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/STONE/datafile/o1_mf_users_c06xczx2_.dbf

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16 with 2 copies and tag TAG20160110T112004

piece handle=/home/oracle/backup1/0fqr1174_1_1 comment=NONE

piece handle=/home/oracle/backup2/0fqr1174_1_2 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=/u01/app/oracle/fast_recovery_area/STONE/autobackup/2016_01_10/o1_mf_s_900760805_c93mh625_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16


9、使用CONFIGURE BACKUP COPIES创建冗余备份集

clipboard[8]

使用CONFIGURE ... BACKUP COPIES命令设置特定设备类型的备份集数量,对控制文件自动备份以及使用BACKUP BACKUPSET命令无效。同时需要配置自动通道。

RMAN> configure datafile backup copies for device type disk to 2;

new RMAN configuration parameters:

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

new RMAN configuration parameters are successfully stored

RMAN> backup datafile 4 format '/home/oracle/backup_%U';

Starting backup at 10-JAN-16

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=45 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00004 name=/u01/app/oracle/oradata/STONE/datafile/o1_mf_users_c06xczx2_.dbf

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16 with 2 copies and tag TAG20160110T111536

piece handle=/home/oracle/backup_0dqr10uo_1_1 comment=NONE

piece handle=/home/oracle/backup_0dqr10uo_1_2 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=/u01/app/oracle/fast_recovery_area/STONE/autobackup/2016_01_10/o1_mf_s_900760537_c93m6sdb_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

使用BACKUP ... AS COPY命令不受COPIES配置的影响,只会创建一个拷贝。

RMAN> backup as copy datafile 4;

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=/u01/app/oracle/oradata/STONE/datafile/o1_mf_users_c06xczx2_.dbf

output file name=/u01/app/oracle/fast_recovery_area/STONE/datafile/o1_mf_users_c93n45kn_.dbf tag=TAG20160110T113117 RECID=2 STAMP=900761477

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=/u01/app/oracle/fast_recovery_area/STONE/autobackup/2016_01_10/o1_mf_s_900761478_c93n46py_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16


10、备份优化

clipboard[9]

如果配置了备份优化,则使用BACKUP DATABASE命令、BACKUP ARCHIVELOG命令带有ALL或LIKE选项以及BACKUP BACKUPSET ALL命令,且只分配了一种通道类型,则会跳过已经备份了的文件。一般用于跳过只读表空间或者Offline表空间以及已经备份过的归档文件。

同时会根据保留策略和冗余策略进行评估。备份优化默认是禁用的,通过EM或者CONFIGURE BACKUP OPTIMIZATION ON命令启用。对于BACKUP RECOVERY AREA|DB_RECOVERY_FILE_DEST以及BACKUP RECOVERY FILES命令自动启用备份优化。

通过在BACKUP命令中指定FORCE选项覆盖备份优化设置,备份所有文件。命令如下:

BACKUP DEVICE TYPE DISK BACKUPSET ALL FORCE;

注意FORCE选项不适用于恢复区中的文件 。

可以通过以下命令禁用备份优化:

CONFIGURE BACKUP OPTIMIZATION OFF;

RMAN> show backup optimization;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE BACKUP OPTIMIZATION OFF; # default

RMAN> configure backup optimization on;

new RMAN configuration parameters:

CONFIGURE BACKUP OPTIMIZATION ON;

new RMAN configuration parameters are successfully stored

RMAN> show backup optimization;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE BACKUP OPTIMIZATION ON;

RMAN> configure backup optimization off;

old RMAN configuration parameters:

CONFIGURE BACKUP OPTIMIZATION ON;

new RMAN configuration parameters:

CONFIGURE BACKUP OPTIMIZATION OFF;

new RMAN configuration parameters are successfully stored

RMAN> show backup optimization;

RMAN configuration parameters for database with db_unique_name STONE are:

CONFIGURE BACKUP OPTIMIZATION OFF;


11、使用压缩未使用的块节约备份空间

clipboard[10]

使用备份集时,高水位(HWM)上未分配的数据块可以跳过不备份,高水位下已分配但不再属于一个段的块也可以跳过不备份。但要满足以下条件:

  • 没有定义保证恢复点
  • 包含数据的数据文件属于本地管理表空间
  • 全备或者0级备份
  • 备份到磁盘或者使用OSB作为介质管理器

12、压缩备份

clipboard[11]

压缩备份可以减少写入到备份中的块,节约空间,有4种压缩算法:HIGH,MEDIUM,LOW和BASIC。可以通过CONFIGURE COMPRESSION ALGORITHM进行配置也可以在run块中使用SET COMPRESSION ALGORITHM进行配置。

对压缩的备份进行还原不需要手工进行额外的操作,系统会自动进行解压。压缩和解压缩会消耗CPU资源。


13、使用RMAN备份压缩

clipboard[12]

根据数据类型,网络环境,系统资源等,使用不同的压缩算法进行测试,选择最适合当前系统环境的压缩算法。


14、加密备份

clipboard[13]

有三种备份加密的方式:

透明加密(Transparent encryption):默认方式,使用钱夹(wallet),适用于本地恢复

密码加密(Password encryption):通过密码进行加密,不需要配置钱夹(wallet)

双重加密(Dual mode encryption):使用透明加密和密码加密,本地恢复使用透明模式,异机恢复使用密码模式。

例子:密码加密

RMAN> set encryption on identified by 'oracle' only;

executing command: SET encryption

RMAN> backup datafile 15;

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00015 name=+DATA/stone/datafile/tbs_03.277.900065973

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16

piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t210116_0.350.900795677 tag=TAG20160110T210116 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=+FRA/stone/autobackup/2016_01_10/s_900795678.333.900795679 comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm +DATA/stone/datafile/tbs_03.277.900065973

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=22 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900065973

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t210116_0.350.900795677

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 01/10/2016 21:05:21

ORA-19870: error while restoring backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t210116_0.350.900795677

ORA-19913: unable to decrypt backup

ORA-28365: wallet is not open

RMAN> set decryption identified by 'oracle';

executing command: SET decryption

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900065973

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t210116_0.350.900795677

channel ORA_DISK_1: piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t210116_0.350.900795677 tag=TAG20160110T210116

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 10-JAN-16

RMAN> recover datafile 15;

Starting recover at 10-JAN-16

using channel ORA_DISK_1

starting media recovery

media recovery complete, elapsed time: 00:00:00

Finished recover at 10-JAN-16

RMAN> alter database open;

database opened

例子:透明加密

需要先配置Wallet:

在sqlnet.ora中指定Wallet的地址

[ ~]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/

[ admin]$ vim sqlnet.ora

ENCRYPTION_WALLET_LOCATION=(SOURCE=(METHOD=FILE)(METHOD_DATA=(DIRECTORY=/u01/app/oracle/admin/stone/wallet/)))

[ admin]$ mkdir /u01/app/oracle/admin/stone/wallet/

SQL> alter system set encryption key identified by oracle;

System altered.

SQL> !ls /u01/app/oracle/admin/stone/wallet/

ewallet.p12

SQL> alter system set encryption wallet close identified by oracle;

System altered.

SQL> alter system set encryption wallet open identified by oracle;

System altered.

RMAN> configure encryption for database on;

new RMAN configuration parameters:

CONFIGURE ENCRYPTION FOR DATABASE ON;

new RMAN configuration parameters are successfully stored

RMAN> set encryption on;

executing command: SET encryption

RMAN> backup datafile 15;

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00015 name=+DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16

piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t213839_0.359.900797921 tag=TAG20160110T213839 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=+FRA/stone/autobackup/2016_01_10/s_900797922.337.900797923 comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

关闭钱夹进行还原报错。

SQL> alter system set encryption wallet close identified by oracle;

System altered.

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t213839_0.359.900797921

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 01/10/2016 21:39:24

ORA-19870: error while restoring backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t213839_0.359.900797921

ORA-19913: unable to decrypt backup

ORA-28365: wallet is not open

打开钱夹进行还原正常。

SQL> alter system set encryption wallet open identified by oracle;

System altered.

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t213839_0.359.900797921

channel ORA_DISK_1: piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t213839_0.359.900797921 tag=TAG20160110T213839

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 10-JAN-16

例子:双重加密

在进行备份时,即启用口令加密,又启动透明加密。在本地模式下,启用透明模式,在异地恢复时启用口令加密。

在设置加密密码时去掉后面的only即可。

RMAN> set encryption on identified by oracle;

executing command: SET encryption

SQL> alter system set encryption wallet open identified by oracle;

System altered.

RMAN> backup datafile 15;

Starting backup at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00015 name=+DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: starting piece 1 at 10-JAN-16

channel ORA_DISK_1: finished piece 1 at 10-JAN-16

piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t215448_0.331.900798889 tag=TAG20160110T215448 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 10-JAN-16

Starting Control File and SPFILE Autobackup at 10-JAN-16

piece handle=+FRA/stone/autobackup/2016_01_10/s_900798890.330.900798893 comment=NONE

Finished Control File and SPFILE Autobackup at 10-JAN-16

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm DATA/STONE/datafile/TBS_03.277.900795951

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             662702664 bytes

Database Buffers          218103808 bytes

Redo Buffers                6324224 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 15 - see DBWR trace file

ORA-01110: data file 15: '+DATA/stone/datafile/tbs_03.277.900795951'

直接进行还原报错。

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=27 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t215448_0.331.900798889

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 01/10/2016 22:00:51

ORA-19870: error while restoring backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t215448_0.331.900798889

ORA-19913: unable to decrypt backup

ORA-28365: wallet is not open

打开钱夹或通过口令都可以进行还原。

SQL> alter system set encryption wallet open identified by oracle;

System altered.

或者

RMAN> set decryption identified by oracle;

executing command: SET decryption

RMAN> restore datafile 15;

Starting restore at 10-JAN-16

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00015 to +DATA/stone/datafile/tbs_03.277.900795951

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t215448_0.331.900798889

channel ORA_DISK_1: piece handle=+FRA/stone/backupset/2016_01_10/nnndf0_tag20160110t215448_0.331.900798889 tag=TAG20160110T215448

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 10-JAN-16

RMAN> recover datafile 15;

Starting recover at 10-JAN-16

using channel ORA_DISK_1

starting media recovery

media recovery complete, elapsed time: 00:00:00

Finished recover at 10-JAN-16

RMAN> alter database open;

database opened


15、相关习题

(1)Consider the following scenario for your database:

-Backup optimization is enabled in RMAN.

The recovery window is set to 7 days in RMAN.

The most recent backup to disk for the TOOLS tablespace was taken on November 3, 2007.

The TOOLS tablespace is read-only since November 4, 2007.

On November 23, 2007, you issue the RMAN command to back up the database to disk.

Which statement is true regarding the backup of the TOOLS tablespace?

A.The RMAN backup fails because the TOOLS tablespace is read-only

B.The RMAN skips the backup of the tablespace because backup optimization is enabled

C.The RMAN makes backup because optimization can be enabled only for backups to disk

D.The RMAN makes the backup because no backup of the tablespace exists within the seven day window

答案:D

(2)You performed the RMAN database backup having a backupset key number 231 with the KEEP FOREVER option.

After some days, you want to change the status of the database backup and you issued the following command:

RMAN>CHANGE BACKUPSET 231 NOKEEP;

What is the implication of this command?

A.The backup is deleted.

B.The backup is marked unavailable.

C.The backup overrides the backup retention policy.

D.The backup becomes eligible for deletion according to the existing retention policy

答案;D

(3)You issue the following command on the RMAN prompt.

REPORT NEED BACKUP DAYS 5;

Which statement is true about executing this command?

A.

It will display a list of files that need incremental backup

B.

It will display a list of files that need backup after five days

C.

It will display a list of files that were backed up in the last five days

D.

It will display a list of files that have not been backed up in the last five days

E.

It will apply the current retention policy to determine the files that need to be backed up

答案:D

(4)You want to perform an RMAN backup of database as a copy. Which two factors will you consider while performing the backup operation? (Choose two).

A.

The backup as copy can only be taken to disk

B.

The backup as copy can only be taken to tape

C.

Backup can be performed only when the instance is shutdown

D.

Backup will constitute all used and unused blocks in the database

答案:AD

(5)In your database, the flash recovery area (FRA) is configured as the default for RMAN backups. You executed the following commands to configure the settings in RMAN:

jpg此主题相关图片如下:

clipboard[14]

Which statement is true about the outcome?

A.

Only one channel is allocated and the backup is created in the flash recovery area

B.

Only one channel is allocated and the backup is created in the destination specified for channel

C.

Two channels are allocated and backup sets are created in the destinations specified for channels 1

D.

Three channels are allocated and backup sets are created in the destinations specified for channels 1, 2, and FRA

答案:A

(6)Multiple RMAN sessions are connected to the database instance.

Examine the following output when backup commands are running in server sessions: What could have helped you to correlate server sessions with channels?

jpg[1]此主题相关图片如下:

clipboard[15]

A.

Implement RMAN multiplexing

B.

Set the DEBUG ON in the RMAN script

C.

Specify the command ID in the RMAN script

D.

Use a tag with the RMAN BACKUP command

答案:C

(7)You are managing an Oracle Database 11g database. You want to take the backup of

MULT_DATA, a big file tablespace of size 100 TB on tape drive, but you have tapedrives of only

10 GB each. Which method would accomplish the task quickly and efficiently?

A.  parallel image copy backup

B.  backup with MAXPIECESIZE configured for the channel

C.  parallel backup with MAXPIECESIZE configured for the channe

D.  intrafile parallel backup

答案:D

(8)You performed the RMAN database backup with the KEEP option. Which two statements are true regarding this backup? (Choose two.)

A.  The backup contains data files, the server parameter file, and the control file even if the  control file autobackup is disabled.

B.  The KEEP option overrides the configured retention policy.

C.  The backup contains only data files and archived redo log files.

D.  The KEEP option is an attribute of an individual backup piece.

答案:AB

(9)You are managing an Oracle Database 11g database. You want to take a backup on tape drives of the USERS tablespace that has a single data file of 900 MB. You have tape drives of 300 MB each. To accomplish the backup, you issued the following RMAN command:

RMAN>BACKUP

SECTION SIZE 300M

TABLESPACE users;

What configuration should be effected to accomplish faster and optimized backups by using the above command?

A.  The SBT channel must be configured, with the default parallelism setting for the SBT device set to 1.

B.  The COMPATIBLE initialization parameter for the database instance must be set to at least 10.0.

C.  The SBT channel must be configured, with the parallelism setting for the SBT device set to 3.

D.  The SBT channel must be configured, with the MAXPIECESIZE set to 300 MB.

答案:C

(10)You want to take the backup of the USERS tablespace. It has a single data file of 900 MB. You have tape drives of 300 MB each. The SBT channel is configured for the RMAN. To accomplish the backup, you issued the following RMAN command:

RMAN> BACKUP SECTION SIZE 300M TABLESPACE users;

Which two statements are true regarding the execution of the above command? (Choose two.)

A.  The RMAN parallelizes the backup although the parallelism is not set for a channel.

B.  The backup piece size will be limited to 300 MB.

C.  The operation is accomplished using the default channel available.

D.  Three channels for the tape drive must be configured by setting the parallelism to three.

答案:BC

(11)You perform a backup using the following BACKUP command:

RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;

Which statement is true of this command?

A.  A different procedure is required to restore a database from compressed backups

B.  The AS COMPRESSED clause of the BACKUP command provided by RMAN is used to create compressed backup sets and image copies.

C.  Using this command to create backups minimizes the bandwidth consumed

D.  Using this command to create backups improves the performance of the backup process

答案:C

(12)You have enabled backup optimization in RMAN. You issue the following RMAN command to configure a redundancy-based retention policy:

CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

Which statement is true?

A.  The command fails because you cannot configure a redundancy-based retention policy when backup optimization is enabled

B.  Backup optimization is performed, but RMAN considers the redundancy-based retention policy when it determines which datafiles should be backed up

C.  Backup optimization is permanently disabled

D.  Backup optimization is temporarily disabled because a redundancy-based retention policy is specified

答案:B

(13)Which two statements are true about the duplexing of the backups taken by RMAN? (Choose two.)

A.  It's only supported for the backups performed on the tape

B.  It is not supported for backup operations that produce image copies

C.  Duplex backups need a parallelism for the device to be equal to number of copies

D.  Duplex backups can be performed to either disk or tape, but cannot be performed on tape and disk simultaneously

答案:BD

(14)You are peer reviewing a fellow DBAs backup plan for his NOARCHIVELOG mode database, as shown here:

Put the tablespaces in backup mode.

Back up the datafiles for all tablespaces.

Take the tablespaces out of backup mode.

Back up all archived redo logs.

Your colleague asks for you to comment on his plan. Which response would be correct?

A. The plan will work as is.

B. The plan needs to be modified to allow for an archive-log switch after step 3.

C. The plan needs to be modified so that a backup of the archived redo logs occurs before step 1.

D. The plan needs to be adjusted to shut down the database after step 1 and to restart the database after step 2.

E. The plan cannot work as presented.

答案:E

(15)Which of the following statements is true when the database is in ARCHIVELOG mode and tablespaces are in hot backup mode?

A.  Archive log generation is suspended until the tablespaces are taken out of hot backup mode.

B.  Datafiles are not written to during hot backups.

C.  Changes to the database are cached during the backup and not written to the datafiles to ensure that the datafiles are consistent when recovered.

D.  The datafile headers are not updated during the backup.

E.  The way data is written to the online redo logs is unchanged during the backup.

答案:D

(16)When you create a backup control file, where is the resulting file written to?

A.  The database user dump destination directory

B.  The database diagnostic destination directory

C.  To $ORACLE_HOME/rdbms

D.  To $ORACLE_HOME/admin

E.  To the directory and filename you specify in the command

答案:E

(17)Which of the following files cannot be backed up by RMAN? (Choose all that apply.)

A.  Database datafiles

B.  Control files

C.  Online redo logs

D.  Database pfiles

E.  Archived redo logs

答案:CD

(18)

Which of the following RMAN structures can data from a datafile span?

A.  RMAN backup-set pieces spanning backup sets

B.  RMAN backup-set pieces within a given backup set

C.  RMAN backups

D.  RMAN channels

E.  None of the above

答案:B

(19)Which RMAN backup command is used to create the block-change tracking file?

A.  alter database create block change tracking file ;

B.  alter database enable block change file ;

C.  alter database enable block change tracking using file ‘/ora01/opt/ block_change_tracking.fil’ ;

D.  alter system enable block change tracking using file '/ora01/opt/block_ change_tracking.fil' ;

E.  alter system block change tracking on ;

答案:C

(20)What is an obsolete backup set?

A.  A backup set that is missing one or more backup set pieces

B.  A backup that has exceeded the retention criteria and is no longer needed

C.  A backup set that does not include archived redo logs

D.  A backup set that can not be recovered due to corruption

E.  A backup set superceded by a datafile copy

答案:B

(21)

What is the purpose of the list expired backup command?

A.  Lists all backups impacted by a resetlogs command

B.  Lists all backups that are subject to retention criteria

C.  Lists all backups that are missing associated physical backup set pieces

D.  Lists the status of datafile backup failures due to the use of the duration command

E.  Lists backups that cannot be used by the restore command because they have  been marked as disabled

答案:C

(22)Which of the following commands will fail?

A.  report schema;

B.  report need backup;

C.  report need backup days 3;

D.  report user;

E.  report obsolete;

答案:D

(23)

Which type of backup contains only the blocks that have changed since the last level 0 incremental backup?

A.  a cumulative level 1 backup

B.  a differential level 1 backup

C.  a full backup

D.  a whole backup

答案:A

(24)Your database is running in ARCHIVELOG mode, and the database is open. You execute an RMAN backup and specify the KEEP clause.

Which components are backed up when this option is specified?

A.  only the control file, the current SPFILE, and data files

B.  only the current SPFILE and data files if autobackup is disabled

C.  only the data files and the archived redo logs

D.  the control file, current SPFILE file, data files, and archived redo logs

答案:D

(25)Examine the following set of RMAN commands:

RMAN> CONFIGURE CHANNEL dc1 DEVICE TYPE DISK FORMAT ?/u02 /backup/ %U' ";

RMAN> RUN

(

ALLOCATE CHANNEL Chi DEVICE TYPE DISK;

EXECUTE SCRIPT full_backup;

)

Which statement is true when the RMAN RUN block is executed?

A.  The execution of the script fails because multiple channels cannot coexist.

B.  The script is executed and both the channels are used for the script execution.

C.  The new channel, CHI, is ignored because a channel has been configured already.

D.  Ration parameter DCI is overridden because a new channel is allocated in RMAN RUN block.

答案:D

(26)You issue the following RMAN command to set a retention policy on a database:

RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

What will be the outcome of issuing this command?

A.  After two days, a backup will be marked obsolete

B.  After two days, a backup will be deleted from the media

C.  If the RMAN repository has records of two or more recent backups of a file, and then older backups will be deleted from the media.

D.  If the RMAN repository has records of two or more recent backups of a file, then older backups will be marked obsolete.

答案:D

(27)The Oracle Database 11g database is running in the ARCHIVELOG mode. The archived redo log files are stored on three locations. The Flash Recovery Area is one of the locations. The details are given below:

LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'

LOG_ARCHIVE_DEST_2 = 'SERVICE = stdb1'

DB_RECOVERY_FILE_DEST = '/u01/oradata'

Examine the following RMAN command issued to set the deletion policy for archived log files:

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO sbt;

Which statement is true regarding what this command accomplishes?

A.  All archived redo log files backed up at least twice to tape are deleted.

B.  All archived redo log files backed up at least once to tape are eligible for deletion.

C.  All archived redo log files backed up at least twice to tape are deleted from the flash recovery area.

D.  All archived redo log files in local archiving destinations and the flash recovery area backed up at least twice to tape are eligible for deletion.

答案:D

(28)Which command is used to configure RMAN to perform a compressed backup for every backup executed?

A.  BACKUP AS COMPRESSED BACKUPSET DATABASE

B.  BACKUP AS COMPRESSED COPY OF DATABASE

C.  CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET

D.  CONFIGURE DEVICE TYPE DISK BACKUP TYPE COMPRESS

E.  BACKUP DATABASE COMPRESS

答案:C

(29)You issue the following command:

RMAN>CONFIGURE BACKUP OPTIMIZATION ON;

What is the result of this command on your backups?

A.  An incremental backup strategy will be used automatically.

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.

C.  RMAN will configure itself for maximum performance at the cost of CPU.

D.  RMAN will configure itself for minimal OS/CPU impact at the cost of time to back up the database.

E.  RMAN will automatically compress backups.

答案:B

(30)

What command would you issue to enable automated backups of control files?

A.  alter database controlfile autobackup on

B.  alter system controlfile autobackup on

C.  configure controlfile autobackup on

D.  enable controlfile autobackup

答案:C

(31)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;

A.  Attempting to restore silver_copy will fail.

B.  Attempting to restore gold_copy will fail.

C.  Both backups will be available for restore without question.

D.  Attempting to restore gold_copy may or may not succeed.

E.  You will not be able to restore either gold_copy or silver_copy.

答案:D

(32)You are using RMAN to backup your ARCHIVELOG mode database. You have enabled control-file autobackups. Which files are not backed up during the RMAN backup?

A.  Database Datafiles

B.  Database Control Files

C.  Online redo logs

D.  Archived redo logs

E.  The database SPFILE

F.  None of the above, all these files are backed up.

答案:C

(33)True or false: RMAN offers the equivalent of the SQL command alter database backup controlfile to trace.

A.  True

B.  False

答案:B

(34)Which command would you use to determine what database backups are currently available for restore?

A.  list database backup;

B.  report database backup;

C.  list backup of database;

D.  list summary backup;

E.  report backup of database;

答案:C

(35)What command would you use to ensure that backup records in the control file are pointing to actual physical files on the backup media?

A.  crosscheck

B.  list backup

C.  confirm

D.  resync

E.  backup validate

答案:A

(36)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?

A.  backup database plus archivelog;

B.  backup database plus arch ivlog until time 10:00;

C.  backup database plus archivelog timeout 10:00;

D.  backup database plus archivelog duration 10:00;

E.  backup database plus archivelog timeout 10:00;

答案:D

(37)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?

A.  They will be renamed.

B.  Nothing will happen to them. The backup set pieces do not exist.

C.  They will be deleted immediately since they are not in the flash recovery area.

D.  You will need to manually remove the physical files listed in the output of the commands.

E.  They will become hidden files and removed 10 days later.

答案:B

(38)Why would you run the delete obsolete command? (Choose all that apply.)

A.  To remove missing backup set pieces physically from disk

B.  To remove metadata related to backup set pieces in the control file and the recovery catalog

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

E.  To remove old versions of RMAN backups

答案:CD

(39)What does it mean if a backup is expired?

A.  The backup set has exceeded the retention criteria set in RMAN and is eligible for removal.

B.  The backup set has one or more invalid blocks in it and is not usable for recovery.

C.  The backup set contains one or more tablespaces no longer in the database.

D.  The backup set contains one or more missing backup set pieces.

E.  The backup set is from a previous version of RMAN and was not upgraded.

答案:D

(40)If a backup set is expired, what can you do to correct the problem?

A.  Change the retention criteria.

B.  Make the lost backup set pieces available to RMAN again.

C.  Run the crosscheck command to correct the location for the backup set piece contained in the metadata.

D.  Nothing. The backup set piece is lost forever.

E.  Call Oracle support, their assistance is required.

答案:B

(41)How long will this backup be allowed to run?

Backup as compressed backupset duration 2:00 minimize load database ;

A.  2 minutes

B.  2 hours

C.  2 days

D.  The command will generate an error.

E.  This backup is not constrained by any time limitation.

答案:B

(42)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 ;

A.  The entire backup will fail. It will not be usable for recovery.

B.  The entire backup will fail, but any datafile successfully backed up will be usable for recovery.

C.  If this backup fails, subsequent backups will prioritize datafiles not backed up.

D.  If this backup fails, an error will be raised and any other commands will not be executed.

E.  If this backup fails, no error will be raised and any other commands will be executed.

答案:B

(43)You want to back up your 100-GB database on a remote tape device. You are required to ensure that minimum network bandwidth is consumed while transferring the backups to the tape device.

The current consumption of your CPU is approximately 40 percent.

Which type of backup should you perform?

A.  standard backup set

B.  image copy

C.  compressed backup

D.  user-managed backup

答案:C

(44)You opened the encryption wallet and then issued the following command:

SQL>CREATE TABLESPACE securespace DATAFILE '/home/user/oradata/secure01.dbf' SIZE 150M

ENCRYPTION USING '3DES168' DEFAULT STORAGE(ENCRYPT);

Then you closed the wallet. Later, you issued the following command to create the EMPLOYEES table in the SECURESPACE tablespace and you use the NO SALT option for the EMPID column.

What is the outcome?

A. It creates the table and encrypts the data in it.

B. It generates an error because the wallet is closed.

C. It creates the table but does not encrypt the data in it.

D. It generates an error because the NO SALT option cannot be used with the ENCRYPT option.

答案:B

(45)You configured the default backup device type as disk for RMAN backups. In your database, because of business requirements, you have to take a simultaneous duplicate backup of the data files when the RMAN BACKUP command is used.

What must you set using the RMAN CONFIGURE command to achieve this?

A.  MAXSETSIZE TO 2;

B.  DEVICE TYPE DISK PARALLELISM 2;

C.  RETENTION POLICY TO REDUNDANCY 2;

D.  DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

答案:D

(46)Your database is in NOARCHIVELOG mode. You start to do a backup, but your users complain that they don’t want you to shut down the database to perform the backup. What options are available to you?

A.  Put the database in hot backup mode and perform an online backup, including backing up the archived redo logs.

B.  Just back up the database datafiles without shutting down the database.

C.  You will have to wait until you can shut down the database to perform the backup.

D.  Mark each datafile as backup in progress, back them up individually, and then mark them as backup not in progress. No archived redo logs will need to be backed up.

E.  Only back up the datafiles that the user will not be touching. Once the user has finished what they were doing, you can shut down the database and back up the datafiles the user changed during the course of the remaining backup

答案:C

(47)How is block-change tracking enabled?

A.  With alter database enable block change tracking

B.  With alter system enable block change tracking

C.  With an init.ora parameter change

D.  With a spfile parameter change

答案:A

(48)What type of backup is stored in a proprietary RMAN format?

A.  Backup set

B.  Image copy

C.  Backup section

D.  Backup group

答案:A

(49)Consider the following command:

Backup database plus archivelog delete input;

How many backup sets would be created by this command if the following were true:

Control-file auto backups were enabled.

The size of backup sets was not restricted.

One channel was allocated.

A.  1

B.  2

C.  3

D.  4

E.  5

答案:D

(50)Compressed backups work with which of the following commands?

A.  copy as backup

B.  backup as copy

C.  backup

D.  copy

答案:C

(51)Which dynamic view displays the status of block-change tracking?

A.  V$BLOCK_CHANGE

B.  V$BLOCK_CHANGE_TRACKING

C.  V$BLOCKCHANGE

D.  V$BLOCK_TRACKING

答案:B

(52)What feature comes into play to help ensure the completion of the backup should one of three backup devices fail during a backup that is using three different channels?

A.  Channel failover

B.  Restartable backups

C.  Rescheduable backups

D.  Automatic backup recovery

E.  Channel recovery

答案:A

(53)What command would you use to set a persistent setting in RMAN so that backups are all written to a tape device?

A.  CONFIGURE DEFAULT DEVICE TYPE TO TAPE MEDIA

B.  CONFIGURE DEFAULT DEVICE TYPE TO TAPE

C.  CONFIGURE DEFAULT DEVICE TYPE TO SBT

D.  CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE

答案:C

(54)Identify the channel settings that can be performed using the CONFIGURE CHANNEL or ALLOCATE CHANNEL commands in RMAN (choose all that apply)

A.  Limiting the input/output (I/O) bandwidth consumption

B.  Specifying the size of backup sets and backup pieces

C.  Specifying vendor-specific information for a media manager

D.  Specifying the parallelism for backup and restore operations

答案:AC

(55)You have enabled backup optimization for the RMAN environment. Identify two criteria on which RMAN will skip the file, if it has already been backed up. (Choose two.)

A.  The data file backup is done with multiple channels

B.  The data files is in the read-write mode after being backed up in the read only mode

C.  The backup was taken after the data files was taken offline-normal or is in the read only mode

D.  The data file backup complies with the back retention policy and the backup duplexing feture

答案:CD

(56)You issued the following commands to configure setting in RMAN;

RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 1;

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 2;

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

Then you issued the following command to take the backup:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Which statement is true about the execution of the above command?

A.  The backup will terminate because the FORMAT clause was not configured for the channel

B.  It backs up two copies of data files to tape and disk, and two copies of archived log file on tape

C.  It backs up the data files and archived log files to disk, making two copies of each data file and archived log file

D.  It backs up the data files and archived log files to tape, making two copies of each data file and archived log file

答案:D

(57)Which two statements are true about encrypting RMAN backup? (Choose two.)

A.  The transparent encryption of backups uses the encryption wallet

B.  The database uses the same encryption key for every encrypted backup

C.  The password encryption of backups only uses the password while creating and restoring backup

D.  If transparent encryption is configured, you cannot use the SET ENCRYPTION BY ASSWORD command to make password-protected backups.

答案:AC

(58)Identify the persistent configuration setting for the target database that can be set for the backup by using RMAN. (Choose all that apply.)

A.  Backup retention policy

B.  Default backup device type

C.  Default destinations for backups

D.  Multiple backup device types for single backup

E.  Default section size for backups

答案:ABC

(59)Tape streaming is not happening while performing RMAN tape backup. On investigation, you find that it is not because of the incremental backup or the empty file backup and that RMAN is sending data blocks to the tape drive fast enough.

What could be a solution to make tape streaming happen during the backup?

A.  Configure backup optimization

B.  Configure the channel to increase MAXOPENFILES

C.  Configure the channel to increase the capacity with the RATE parameter

D.  Configure the channel to adjust the tape buffer size with the BLKSIZE option

答案:C

(60)The BACKUP_TAPE_IO_SLAVES parameter is set to FALSE for the database instance. Which statement is true while performing a tape backup in an RMAN session?

A.  The tape I/O performed is asynchronous

B.  The tape buffer is allocated from the System Global Area (SGA)

C.  The tape buffer is allocated from the Program Global Area (PGA)

D.  Oracle I/O uses an interrupt mechanism to determine when each I/O completes

答案:C

(61)View the Exhibit and examine the output. You execute the following RMAN command to perform the backup operation:

RMAN> RUN {ALLOCATE CHANNEL c1 DEVICE TYPE disk MAXOPENFILES 8;

BACKUP DATABASE FILESPERSET 4 ;}

What is the multiplexing level in the preceding backup process?

A.  4

B.  8

C.  7

D.  0

答案:A

(62)You want to take a complete database backup using RMAN. The backup should consist only the used blocks from your database.

Which two statements are true about this backup operation? (Choose two.)

A.  Backup compression should be enabled

B.  Parallelism for the channel should be set to 2

C.  All the files must be backed up as backup sets

D.  The backup may be stored either on disk or on media with media manager

答案:CD

(63)Examine the following RMAN command:

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Which prerequisite must be met before accomplishing the backup?

A.  Provide a password for the encryption

B.  Set up an Oracle wallet for the encryption

C.  No setup is required as it is a default encryption method

D.  Both Oracle wallet and password must be set up for the encryption

答案:B

(64)Which two statements are true about the compressed backups in RMAN? (Choose two.)

A.Compressed backups can only be taken on the tape drives.

B.The binary compression creates some performance overhead during backup operation.

C.The ZLIB compression algorithm can be used only if the COMPATIBLE initialization parameter is set to 11.1.0.

D.The media manager compression for the tape drive should be enabled for taking compressed backups on the tape.

答案:BD

(65)Which two statements are true about an image copy backup? (Choose two.)

A. It may only be taken to disk.

B. It will contain only the used blocks.

C. It will contain all used and unused blocks.

D. It can be performed on disk as well as on tape.

答案:AC

(66)Given below are RMAN commands to enable backup optimization and set the retention policy:

png此主题相关图片如下:
clipboard[16]

The USERS tablespace has never been backed up. You take the USERS tablespace offline on Monday. View the Exhibit to examine the operations performed by using RMAN. Which two statements are true about the backup of the USERS tablespace? (Choose two.)

png[1]此主题相关图片如下:
clipboard[17]

A.It will be backed up as a part of database backup on Friday.

B.It will be backed up as a part of database backup on Tuesday.

C.It will not be backed up as a part of database backup on Wednesday.

D.The command on Sunday deletes the backup of the USERS tablespace taken on Tuesday.

答案:BD

(67)You execute the following command to set the redundancy retention policy in Recovery Manager(RMAN):

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;

Identify the statement that correctly describes the implications of this command.

A. when there are already three backups, for the fourth backup RMAN removes the oldest backup.

B. When there are already three backups, for the fourth backup RMAN marks the oldest backup as obsolete.

C. the number of backups that are retained is equal to three and it includes full, incremental, and cumulative backups.

D. when there are already three backup, one of the existing backups must be removed manually before taking the fourth backup.

答案:B

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28536251/viewspace-2051974/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-12-13

  • 博文量
    204
  • 访问量
    1121398