不多说,直接上脚本。
RMAN> @validate_section.sql
RMAN> run2> {3> allocate channel c1 device type disk;4> allocate channel c2 device type disk;5> allocate channel c3 device type disk;6> validate datafile 4 section size 1G;7> release channel c1;8> release channel c2;9> release channel c3;10> }released channel: ORA_DISK_1released channel: ORA_DISK_2released channel: ORA_DISK_3released channel: ORA_DISK_4released channel: ORA_DISK_5allocated channel: c1channel c1: SID=138 device type=DISKallocated channel: c2channel c2: SID=199 device type=DISKallocated channel: c3channel c3: SID=73 device type=DISKStarting validate at 2017-03-05 18:04:08released channel: c1released channel: c2released channel: c3RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of validate command at 03/05/2017 18:04:08RMAN-06808: SECTION SIZE cannot be used when piece limit is in effectRMAN> **end-of-file**RMAN> show all;RMAN configuration parameters for database with db_unique_name ORCL2 are:CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;CONFIGURE BACKUP OPTIMIZATION ON;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defaultCONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # defaultCONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 5;CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET;CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # defaultCONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 5 G;CONFIGURE MAXSETSIZE TO 5 G;CONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM 'AES128'; # defaultCONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/Oracle/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl2.f'; # defaultRMAN> configure channel device type disk clear;old RMAN configuration parameters:CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 5 G;old RMAN configuration parameters are successfully deletedRMAN> show all;RMAN configuration parameters for database with db_unique_name ORCL2 are:CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;CONFIGURE BACKUP OPTIMIZATION ON;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defaultCONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # defaultCONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 5;CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET;CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # defaultCONFIGURE MAXSETSIZE TO 5 G;CONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM 'AES128'; # defaultCONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl2.f'; # defaultRMAN> @validate_section.sqlRMAN> run2> {3> allocate channel c1 device type disk;4> allocate channel c2 device type disk;5> allocate channel c3 device type disk;6> validate datafile 4 section size 1G;7> release channel c1;8> release channel c2;9> release channel c3;10> }allocated channel: c1channel c1: SID=138 device type=DISKallocated channel: c2channel c2: SID=199 device type=DISKallocated channel: c3channel c3: SID=73 device type=DISKStarting validate at 2017-03-05 18:05:01released channel: c1released channel: c2released channel: c3RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571: ===========================================================RMAN-03002: failure of validate command at 03/05/2017 18:05:01RMAN-06808: SECTION SIZE cannot be used when piece limit is in effectRMAN> **end-of-file**RMAN> exitRecovery Manager complete.[oracle@localhost scripts]$ rman target /Recovery Manager: Release 11.2.0.4.0 - Production on Sun Mar 5 18:05:07 2017Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.connected to target database: ORCL2 (DBID=1411348214)RMAN> @validate_section.sqlRMAN> run2> {3> allocate channel c1 device type disk;4> allocate channel c2 device type disk;5> allocate channel c3 device type disk;6> validate datafile 4 section size 1G;7> release channel c1;8> release channel c2;9> release channel c3;10> }using target database control file instead of recovery catalogallocated channel: c1channel c1: SID=136 device type=DISKallocated channel: c2channel c2: SID=199 device type=DISKallocated channel: c3channel c3: SID=71 device type=DISKStarting validate at 2017-03-05 18:05:11channel c1: starting validation of datafilechannel c1: specifying datafile(s) for validationinput datafile file number=00004 name=/home/oracle/app/oracle/oradata/orcl2/users01.dbfvalidating blocks 1 through 131072channel c2: starting validation of datafilechannel c2: specifying datafile(s) for validationinput datafile file number=00004 name=/home/oracle/app/oracle/oradata/orcl2/users01.dbfvalidating blocks 131073 through 262144channel c1: validation complete, elapsed time: 00:00:01channel c2: validation complete, elapsed time: 00:00:01List of Datafiles=================File Status Marked Corrupt Empty Blocks Blocks Examined High SCN---- ------ -------------- ------------ --------------- ----------4 OK 0 139 262170 103320276 File Name: /home/oracle/app/oracle/oradata/orcl2/users01.dbf Block Type Blocks Failing Blocks Processed ---------- -------------- ---------------- Data 0 260580 Index 0 44 Other 0 1380 Finished validate at 2017-03-05 18:05:12released channel: c1released channel: c2released channel: c3RMAN> **end-of-file**RMAN>新闻热点
疑难解答