OCP課程45:管理II之備份設定

stonebox1122發表於2016-03-09

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章