oracle imp 3135,Data guard archive GAP 故障处理案例

1、主库服务器日志报错如下:

Thu Jun 17 10:47:30 2010

Error 12541 received logging on to the standby

Check whether the listener is up and running.

Thu Jun 17 10:48:30 2010

Error 12541 received logging on to the standby

Check whether the listener is up and running.

Thu Jun 17 10:49:31 2010

Error 12541 received logging on to the standby

Check whether the listener is up and running.

查找Oracle alertlog 日志,发现故障发生时间的日志信息:

Mon Jun 14 11:03:39 2010

Thread 1 advanced to log sequence 154816

Current log# 8 seq# 154816 mem# 0: /oradata/boss/redo08.log

Mon Jun 14 11:20:52 2010

Thread 1 advanced to log sequence 154817

Current log# 9 seq# 154817 mem# 0: /oradata/boss/redo09.log

Mon Jun 14 11:44:53 2010

ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3135)[@more@]

ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

PING[ARC0]: Error 3135 when pinging standby standby.

Mon Jun 14 11:44:53 2010

ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3135)

ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

PING[ARC0]: Error 3135 when pinging standby standby.

Mon Jun 14 11:45:53 2010

ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (1041)

ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

PING[ARC0]: Error 1041 when pinging standby standby.

Mon Jun 14 11:46:53 2010

ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (1041)

ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

PING[ARC0]: Error 1041 when pinging standby standby.

Mon Jun 14 11:46:59 2010

Thread 1 advanced to log sequence 154818

Current log# 6 seq# 154818 mem# 0: /oradata/boss/redo06.log

Mon Jun 14 11:50:49 2010

Error 12170 received logging on to the standby

Mon Jun 14 11:50:49 2010

Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:

ORA-12170: TNS:Connect timeout occurred

FAL[server, ARC0]: Error 12170 creating remote archivelog file 'standby'

FAL[server, ARC0]: FAL archive failed, see trace file.

Mon Jun 14 11:50:49 2010

Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:

ORA-16055: FAL request rejected

ARCH: FAL archive failed. Archiver continuing

Mon Jun 14 11:50:49 2010

ORACLE Instance boss - Archival Error. Archiver continuing.

Mon Jun 14 11:55:33 2010

Error 12170 received logging on to the standby

Mon Jun 14 11:55:33 2010

Errors in file /oracle/admin/boss/bdump/boss_arc0_13050.trc:

ORA-12170: TNS:Connect timeout occurred

PING[ARC0]: Heartbeat failed to connect to standby 'standby'. Error is 12170.

Mon Jun 14 12:00:18 2010

Error 12170 received logging on to the standby

查看主库上的archived log 文件所在目录,发现文件1_154816_657664567.dbf还在

对未传送过去的所有archived log 文件进行压缩:

tar -cvf archive14_17.tar /backup/archlog

将文件传输到备用服务器:

将archive14_17.tar通过ftp下载到备库,在备库通过FTP方式登录到主库:

ftp192.168.1.5

get archive14_17.tar

解压archive14_17.tar

tar –xvf archive14_17.tar

GAP处理:在备库检查是否有日志缺失

SQL> select * from V$ARCHIVE_GAP;

在备库上手工注册上一步中从主库拷贝来的日志(要求备库在mount状态)

SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154816_657664567.dbf';

SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154817_657664567.dbf';

SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154818_657664567.dbf';

SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154819_657664567.dbf';

SQL>ALTER DATABASE REGISTER LOGFILE'/backup/archlog14_17/1_154820_657664567.dbf';

按照以上语句一个一个注册完即可;

另外,除了以上的一个一个注册方式外,Oracle提供了另外一种自动注册方式,该方式中将从主库拷过来的以上归档日志移到LOG_ARCHIVE_DEST_2后执行如下语句(要求备库在mount状态):

SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;

当该语句执行完毕之后重新登录SQL*plus后执行了如下语句:

$sqlplus “/as sysdba”

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

如下是像是原文解释:

$sqlplus “/as sysdba”

SQL>startup mount

To apply the archived redo log files in the archive gap

Start up and mount the standby database (if it is not already mounted). For example, enter:

SQL> STARTUP MOUNT PFILE=/oracle/admin/pfile/initSTBY.ora

Recover the database using the AUTOMATIC option:

SQL> ALTER DATABASE RECOVER AUTOMATIC STANDBY DATABASE;

The AUTOMATIC option automatically generates the name of the next archived redo log file needed to continue the recovery operation.

After recovering the available log files, the Oracle database prompts for the name of a log file that does not exist. For example, you might see:

ORA-00308: cannot open archived log '/oracle/standby/standby_logs/arcr_1_540.arc'

ORA-27037: unable to obtain file status

SVR4 Error: 2: No such file or directory

Additional information: 3

Specify log: {=suggested | filename | AUTO | CANCEL}

Cancel recovery after the Oracle database applies the available log files by typing CTRL/C:

SQL>

Media recovery cancelled.

本人操作时,没有出现以上提示,而直接推出了SQL Plus,当时在alert log 中提示如下:

Thu Jun 17 16:43:09 2010

*************************************************************

Warning: Recovery session ended without issuing ALTER DATABASE RECOVER CANCEL

*************************************************************

The following error messages are acceptable after recovery cancellation and do not indicate a problem:

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: 'some_filename'

ORA-01112: media recovery not started

After you finish manually applying the missing log file, you can restart log apply services on the standby database, as follows:

重新登录后执行了如下语句:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值