使用DUPLICATE创建STANDBY遇到RMAN-05535、ORA-19804错误
Aug152015
最近搭建的DG比较多,在一次使用DUPLICATE创建备库的时候,遇到了ORA-19804错误。数据库版本11.2.0.4.0,信息如下:
[oracle@SL010M6-DB-HWEB1 dbs]$ rman target / auxiliary sys/"HcvB6^MdCviDQc"@hwebstd Recovery Manager: Release 11.2.0.4.0 - Production on Tue Aug 11 21:41:57 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: HWEB1 (DBID=443379933) connected to auxiliary database: HWEB1 (not mounted) RMAN> DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE nofilenamecheck; Starting Duplicate Db at 11-AUG-15 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=2267 device type=DISK contents of Memory Script: { backup as copy reuse targetfile '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwhweb1' auxiliary format '/u01/app/oracle/product/11.2.0/db_1/dbs/orapwhwebstd' ; } executing Memory Script Starting backup at 11-AUG-15 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1892 device type=DISK Finished backup at 11-AUG-15 contents of Memory Script: { backup as copy current controlfile for standby auxiliary format '/u01/app/oracle/oradata/hweb1/control01.ctl'; restore clone controlfile to '/u01/app/oracle/fast_recovery_area/hweb1/control02.ctl' from '/u01/app/oracle/oradata/hweb1/control01.ctl'; } executing Memory Script Starting backup at 11-AUG-15 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy copying standby control file output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_hweb1.f tag=TAG20150811T214215 RECID=4 STAMP=887492535 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 11-AUG-15 Starting restore at 11-AUG-15 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: copied control file copy Finished restore at 11-AUG-15 contents of Memory Script: { sql clone 'alter database mount standby database'; } executing Memory Script sql statement: alter database mount standby database contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/hweb1/temp01.dbf"; switch clone tempfile all; set newname for datafile 1 to "/u01/app/oracle/oradata/hweb1/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/hweb1/sysaux01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/hweb1/undotbs01.dbf"; set newname for datafile 4 to "/u01/app/oracle/oradata/hweb1/users01.dbf"; backup as copy reuse datafile 1 auxiliary format "/u01/app/oracle/oradata/hweb1/system01.dbf" datafile 2 auxiliary format "/u01/app/oracle/oradata/hweb1/sysaux01.dbf" datafile 3 auxiliary format "/u01/app/oracle/oradata/hweb1/undotbs01.dbf" datafile 4 auxiliary format "/u01/app/oracle/oradata/hweb1/users01.dbf" ; sql 'alter system archive log current'; } executing Memory Script executing command: SET NEWNAME renamed tempfile 1 to /u01/app/oracle/oradata/hweb1/temp01.dbf in control file executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting backup at 11-AUG-15 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=/u01/app/oracle/oradata/hweb1/undotbs01.dbf output file name=/u01/app/oracle/oradata/hweb1/undotbs01.dbf tag=TAG20150811T214222 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=/u01/app/oracle/oradata/hweb1/system01.dbf output file name=/u01/app/oracle/oradata/hweb1/system01.dbf tag=TAG20150811T214222 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00002 name=/u01/app/oracle/oradata/hweb1/sysaux01.dbf output file name=/u01/app/oracle/oradata/hweb1/sysaux01.dbf tag=TAG20150811T214222 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=/u01/app/oracle/oradata/hweb1/users01.dbf output file name=/u01/app/oracle/oradata/hweb1/users01.dbf tag=TAG20150811T214222 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 11-AUG-15 sql statement: alter system archive log current contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 1 switched to datafile copy input datafile copy RECID=4 STAMP=887521369 file name=/u01/app/oracle/oradata/hweb1/system01.dbf datafile 2 switched to datafile copy input datafile copy RECID=5 STAMP=887521369 file name=/u01/app/oracle/oradata/hweb1/sysaux01.dbf datafile 3 switched to datafile copy input datafile copy RECID=6 STAMP=887521369 file name=/u01/app/oracle/oradata/hweb1/undotbs01.dbf datafile 4 switched to datafile copy input datafile copy RECID=7 STAMP=887521369 file name=/u01/app/oracle/oradata/hweb1/users01.dbf ORACLE error from auxiliary database: ORA-19809: limit exceeded for recovery files ORA-19804: cannot reclaim 524288000 bytes disk space from 5218762752 limit RMAN-05535: WARNING: All redo log files were not defined properly. ORACLE error from auxiliary database: ORA-19809: limit exceeded for recovery files ORA-19804: cannot reclaim 524288000 bytes disk space from 5218762752 limit RMAN-05535: WARNING: All redo log files were not defined properly. Finished Duplicate Db at 11-AUG-15
观察告警日志发现,是快速恢复区满了导致的。
Wed Aug 12 05:42:59 2015 Completed: alter database clear logfile group 14 alter database clear logfile group 15 Clearing online log 15 of thread 0 sequence number 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-00313: open failed for members of log group 15 of thread 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-00313: open failed for members of log group 15 of thread 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-19815: WARNING: db_recovery_file_dest_size of 5218762752 bytes is 100.00% used, and has 0 remaining bytes available. ************************************************************************ You have following choices to free up space from recovery area: 1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard, then consider changing RMAN ARCHIVELOG DELETION POLICY. 2. Back up files to tertiary device such as tape using RMAN BACKUP RECOVERY AREA command. 3. Add disk space and increase db_recovery_file_dest_size parameter to reflect the new space. 4. Delete unnecessary files using RMAN DELETE command. If an operating system command was used to delete files, then use RMAN CROSSCHECK and DELETE EXPIRED commands. ************************************************************************ ORA-19809 signalled during: alter database clear logfile group 15... alter database clear logfile group 16 Clearing online log 16 of thread 0 sequence number 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-00313: open failed for members of log group 16 of thread 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-00313: open failed for members of log group 16 of thread 0 Errors in file /u01/app/oracle/diag/rdbms/hwebstd/hwebstd/trace/hwebstd_ora_19852.trc: ORA-19815: WARNING: db_recovery_file_dest_size of 5218762752 bytes is 100.00% used, and has 0 remaining bytes available. ************************************************************************ You have following choices to free up space from recovery area: 1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard, then consider changing RMAN ARCHIVELOG DELETION POLICY. 2. Back up files to tertiary device such as tape using RMAN BACKUP RECOVERY AREA command. 3. Add disk space and increase db_recovery_file_dest_size parameter to reflect the new space. 4. Delete unnecessary files using RMAN DELETE command. If an operating system command was used to delete files, then use RMAN CROSSCHECK and DELETE EXPIRED commands. ************************************************************************ ORA-19809 signalled during: alter database clear logfile group 16... RFS connections are allowed Wed Aug 12 05:47:20 2015 RFS[1]: Assigned to RFS process 19902 RFS[1]: Opened log for thread 1 sequence 133 dbid 443379933 branch 887207453 Wed Aug 12 05:47:20 2015 RFS[2]: Assigned to RFS process 19904 RFS[2]: Opened log for thread 1 sequence 132 dbid 443379933 branch 887207453 Archived Log entry 1 added for thread 1 sequence 133 rlc 887207453 ID 0x1a6db1dd dest 2: Archived Log entry 2 added for thread 1 sequence 132 rlc 887207453 ID 0x1a6db1dd dest 2: RFS[2]: Selected log 11 for thread 1 sequence 134 dbid 443379933 branch 887207453 Wed Aug 12 05:47:21 2015 Archived Log entry 3 added for thread 1 sequence 134 ID 0x1a6db1dd dest 1: Wed Aug 12 05:47:21 2015 Primary database is in MAXIMUM PERFORMANCE mode RFS[3]: Assigned to RFS process 19906 RFS[3]: Selected log 11 for thread 1 sequence 135 dbid 443379933 branch 887207453
在操作系统查询发现备库的online redo log和standby redo log都创建在了快速恢复区,正常配置了log_file_name_convert参数,会将redo文件创建在convert之后的目录,怎么会创建在快速恢复区呢?检查了一下log_file_name_convert参数,发现这个参数写错了,在配置这个参数的时候,一不小心,将主库的日志文件存放路径写成了主库的datafile存放路径,而主库是ASM文件系统,redo和datafile的路径不同,这就导致了log_file_name_convert参数无法生效,就把redo创建在了快速恢复区,而快速恢复区分配的空间有限,无法满足创建所有日志文件的需求,当快速恢复区已用光,就抛出了这个错误。重新修改log_file_name_convert参数后,问题解决。