ORA-279 standby指定时间恢复时遇到报错解决

it2022-05-15  62

环境 rac+双standbystandbystandby2按时间恢复报找不到归档Media Recovery Log /home/oracle/oradata/rac/archive/3_59241_681301512.arcErrors with log /home/oracle/oradata/rac/archive/3_59241_681301512.arcORA-279 signalled during: alter database recover automatic standby database until time '2013-04-26 00:00:59'...*************************************************************Warning: Recovery session ended without issuing ALTER DATABASE RECOVER CANCEL登录standby2尝试手工执行SQL> alter database recover automatic standby database until time '2013-04-26 00:00:59';alter database recover automatic standby database until time '2013-04-26 00:00:59'*ERROR at line 1:ORA-00279: change 32513458385 generated at 04/25/2013 16:06:45 needed forthread 3ORA-00289: suggestion : /home/oracle/oradata/rac/archive/3_59247_681301512.arcORA-00280: change 32513458385 for thread 3 is in sequence #59247ORA-00278: log file '/home/oracle/oradata/rac/archive/3_59247_681301512.arc' nolonger needed for this recoveryORA-00308: cannot open archived log'/home/oracle/oradata/rac/archive/3_59247_681301512.arc'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3SQL> shutdown abort;ORACLE instance shut down.SQL> startup nomount;ORACLE instance started.Total System Global Area 6056574976 bytesFixed Size                  2092808 bytesVariable Size             671088888 bytesDatabase Buffers         5368709120 bytesRedo Buffers               14684160 bytesSQL> alter database mount standby database;Database altered.SQL> alter database open read only;Database altered.SQL> select open_mode from v$database;OPEN_MODE----------READ ONLYSQL> EXITDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options登录检查断点恢复到的数据时间:[oracle@autodb ~]$ sqlplus db1/passwordSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 09:53:18 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select to_char(max(log_time),'yyyy-mm-dd hh24:mi:ss') from log partition(RL_201304);TO_CHAR(MAX(LOG_TIM-------------------2013-04-25 16:55:48归档卡在了4月25日下午,当时rac节点有出现过负载过高被剔除集群重启的问题尝试拷贝报告缺失的归档过来后再指定时间恢复,可以恢复,但继续报缺失SQL> shutdown abort;ORACLE instance shut down.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@autodb ~]$ dbaSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 10:03:42 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to an idle instance.SQL> startup nomount;ORACLE instance started.Total System Global Area 6056574976 bytesFixed Size                  2092808 bytesVariable Size             671088888 bytesDatabase Buffers         5368709120 bytesRedo Buffers               14684160 bytesSQL> alter database mount standby database;Database altered.SQL> alter database recover automatic standby database until time '2013-04-26 00:00:59';alter database recover automatic standby database until time '2013-04-26 00:00:59'*ERROR at line 1:ORA-00279: change 32513835030 generated at 04/25/2013 16:55:49 needed forthread 3ORA-00289: suggestion : /home/oracle/oradata/rac/archive/3_59248_681301512.arcORA-00280: change 32513835030 for thread 3 is in sequence #59248ORA-00278: log file '/home/oracle/oradata/rac/archive/3_59248_681301512.arc' nolonger needed for this recoveryORA-00308: cannot open archived log'/home/oracle/oradata/rac/archive/3_59248_681301512.arc'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3SQL> shutdown abort;ORACLE instance shut down.SQL> startup nomount;ORACLE instance started.Total System Global Area 6056574976 bytesFixed Size                  2092808 bytesVariable Size             671088888 bytesDatabase Buffers         5368709120 bytesRedo Buffers               14684160 bytesSQL> alter database mount standby database;Database altered.SQL> alter database recover automatic standby database until time '2013-04-26 00:00:59';alter database recover automatic standby database until time '2013-04-26 00:00:59'*ERROR at line 1:ORA-00279: change 32514318200 generated at 04/25/2013 17:49:11 needed forthread 3ORA-00289: suggestion : /home/oracle/oradata/rac/archive/3_59249_681301512.arcORA-00280: change 32514318200 for thread 3 is in sequence #59249ORA-00278: log file '/home/oracle/oradata/rac/archive/3_59249_681301512.arc' nolonger needed for this recoveryORA-00308: cannot open archived log'/home/oracle/oradata/rac/archive/3_59249_681301512.arc'ORA-27037: unable to obtain file statusLinux-x86_64 Error: 2: No such file or directoryAdditional information: 3[oracle@autodb ~]$ ssh root@192.168.50.3root@192.168.50.53's password:[root@rac3 ~]#[root@rac3 ~]#[root@rac3 ~]# su - oracle[oracle@rac3 ~]$ dbaSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 10:33:37 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> show parameter log_archive_dest;NAME                                 TYPE                             VALUE------------------------------------ -------------------------------- ------------------------------log_archive_dest                     stringlog_archive_dest_1                   string                           LOCATION=/home/oracle/oradata/                                                                      newrac1/arch/rac3log_archive_dest_10                  stringlog_archive_dest_2                   string                           service=standbylog_archive_dest_3                   string                           ##原来的standby2不见了,原因为dest_3参数修改的时候没加both写到所有配置log_archive_dest_4                   stringSQL> show parameter pfile;NAME                                 TYPE                             VALUE------------------------------------ -------------------------------- ------------------------------spfile                               string                           /home/oracle/10.2.0.4/db/dbs/s                                                                      pfilerac3.oraSQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing options[oracle@rac3 ~]$ cat /home/oracle/10.2.0.4/db/dbs/initrac3.ora |grep log_archive_dest*.log_archive_dest_1=''rac3.log_archive_dest_1='LOCATION=/home/oracle/oradata/newrac1/arch/rac3'*.log_archive_dest_2='service=standby'*.log_archive_dest_state_2='ENABLE'[oracle@rac3 ~]$ dbaSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 10:37:02 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> ALTER SYSTEM SET log_archive_dest_3='SERVICE=standby2' SCOPE=BOTH SID='rac3';System altered.SQL> show parameter log_archive_dest;NAME                                 TYPE                             VALUE------------------------------------ -------------------------------- ------------------------------log_archive_dest                     stringlog_archive_dest_1                   string                           LOCATION=/home/oracle/oradata/                                                                      newrac1/arch/rac3log_archive_dest_10                  stringlog_archive_dest_2                   string                           service=standbylog_archive_dest_3                   string                           SERVICE=standby2SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing options[oracle@rac3 ~]$ bd[oracle@rac3 bdump]$ tail -100 alert_rac3.logALTER SYSTEM SET log_archive_dest_3='SERVICE=standby2' SCOPE=BOTH SID='rac3';[oracle@rac3 bdump]$ exitlogout修改后回到standby2检查日志进程RFS开始传送缺失日志[root@rac3 ~]# exitlogoutConnection to 192.168.50.53 closed.[oracle@autodb ~]$ bd[oracle@autodb bdump]$ tail -f alert_esal.logRFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59256_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59257_681301512.arc'Fri Apr 26 10:38:36 2013RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59258_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59259_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59260_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59261_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59262_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59263_681301512.arc'RFS[4]: Archived Log: '/home/oracle/oradata/rac/archive/3_59264_681301512.arc'[oracle@autodb bdump]$   dbaSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 10:45:21 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select open_mode from v$database;OPEN_MODE----------MOUNTED再次做手工指定时间点恢复SQL> alter database recover automatic standby database until time '2013-04-26 00:00:59'; Database altered.打开只读模式检查恢复到的时间点与指定时间点接近,恢复完成,故障解决SQL> alter database open read only;Database altered.SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@autodb bdump]$ sqlplus db1/passwordSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 10:56:08 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> select to_char(max(log_time),'yyyy-mm-dd hh24:mi:ss') from log partition(RL_201304);TO_CHAR(MAX(LOG_TIM-------------------2013-04-26 00:00:58SQL> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options检查rac1 rac2 rac4分别检查后,全部补全[oracle@rac1 dbs]$ dbaSQL*Plus: Release 10.2.0.4.0 - Production on Fri Apr 26 11:31:18 2013Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWith the Partitioning, Real Application Clusters, OLAP, Data Miningand Real Application Testing optionsSQL> ALTER SYSTEM SET log_archive_dest_3='SERVICE=standby2' SCOPE=BOTH SID='rac1';System altered.SQL> set linesize 200SQL> show parameter log_archive_dest;NAME                                 TYPE                             VALUE------------------------------------ -------------------------------- ------------------------------log_archive_dest                     stringlog_archive_dest_1                   string                           LOCATION=/home/oracle/oradata/                                                                      newrac1/arch/rac1log_archive_dest_10                  stringlog_archive_dest_2                   string                           service=standbylog_archive_dest_3                   string                           SERVICE=standby2log_archive_dest_4                   stringlog_archive_dest_5                   stringlog_archive_dest_6                   stringlog_archive_dest_7                   stringlog_archive_dest_8                   stringNAME                                 TYPE                             VALUE------------------------------------ -------------------------------- ------------------------------log_archive_dest_9                   stringlog_archive_dest_state_1             string                           enablelog_archive_dest_state_10            string                           enablelog_archive_dest_state_2             string                           ENABLElog_archive_dest_state_3             string                           enablelog_archive_dest_state_4             string                           enablelog_archive_dest_state_5             string                           enablelog_archive_dest_state_6             string                           enablelog_archive_dest_state_7             string                           enablelog_archive_dest_state_8             string                           enablelog_archive_dest_state_9             string                           enableSQL> create pfile from spfile;File created.

By cycsa http://www.cnblogs.com/cycsa

转载于:https://www.cnblogs.com/cycsa/archive/2013/04/26/3045416.html

相关资源:数据结构—成绩单生成器

最新回复(0)