ORA-02019的处理(转载于kasaur的个人空间http://space.itpub.net/25618347)

今天早上过来,查看测试库的告警日志发现,一直不断的报错:ORA-02019,具体如下:

alert输出如下:

Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:18:46 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:19:34 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:20:47 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:22:35 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 10:25:17 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found

对应的trace文件内容如下:

[oracle@testdb ~]$ more /oracle/admin/UAT/bdump/uat_reco_16233.trc
/oracle/admin/UAT/bdump/uat_reco_16233.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /oracle/product/10.2.0/db_1
System name:    Linux
Node name:      testdb
Release:        2.6.18-128.el5
Version:        #1 SMP Wed Dec 17 11:41:38 EST 2008
Machine:        x86_64
Instance name: UAT
Redo thread mounted by this instance: 1
Oracle process number: 5
Unix process pid: 16233, image:oracle@testdb(RECO)

*** SERVICE NAME:(SYS$BACKGROUND) 2012-02-13 10:18:13.429
*** SESSION ID:(1096.3) 2012-02-13 10:18:13.429
*** 2012-02-13 10:18:13.429
ERROR, tran=7.27.49932, session#=1, se=0:
ORA-02019: connection description for remote database not found
*** 2012-02-13 10:18:46.453
初步判断以为是db-link问题,到数据库里查询,并没有这个db-link,仔细观察trace文件可以发现,这是个oracle的后台进程(RECOVER进程),会话ID是1096,进一步观察不难发现,应该是oracle的RECOVER进程要恢复一个transaction,其事务号:7.27.49932,而需要被恢复的数据库连接名不正确,只要数据库开启状态,该进程就会一直尝试进行恢复,所以alert中会不断的出现该错误,最后查询metalink,有如下解释:

When a failure occurs during commit processing, automatic recovery will

consistently resolve the results at all sites involved in the

transaction. However, if the remote database is destroyed or

recreated before recovery completes, then the entries used to

control recovery in DBA_2PC_PENDING and associated tables will never

be removed, and recovery will periodically retry. Procedure

purge_lost_db_entry allows removal of such transactions from the local site.

查询对应视图发现:

SELECT LOCAL_TRAN_ID,global_tran_id,STATE, MIXED,to_char(FAIL_TIME,'yyyy-mm-dd hh24:mi:ss')FAIL_TIME,
        to_char(RETRY_TIME,'yyyy-mm-dd hh24:mi:ss')Retry_Time
FROM DBA_2PC_PENDING;

7.27.49932 UAT.bb70863a.7.27.49932 collecting no 2011-09-29 18:23:40 2012-02-13 10:58:13

有问题的db-link 就是上面红色部分,该事务第1次失败时间是:2011-09-29 18:23:40

最近的尝试时间是:2012-02-13 10:58:13

此问题不影响测试数据库的正常运行,可以忽略。

如需要解决,不再报错,可以强制移掉此事务来解决。方法如下:

execute sys.dbms_transaction.purge_lost_db_entry('<local_tran_id>');

执行完上面的语句后再观察alert,这个错误终于消失了。

[oracle@testdb ~]$ tail -f /oracle/admin/UAT/bdump/alert_UAT.log
ORA-02019: connection description for remote database not found
Mon Feb 13 10:47:29 CST 2012
Thread 1 advanced to log sequence 9006 (LGWR switch)
  Current log# 3 seq# 9006 mem# 0: /oracle/oradata/UAT/redo03.log
Mon Feb 13 10:47:37 CST 2012
Thread 1 advanced to log sequence 9007 (LGWR switch)
  Current log# 1 seq# 9007 mem# 0: /oracle/oradata/UAT/redo01.log
Mon Feb 13 10:58:13 CST 2012
Errors in file /oracle/admin/UAT/bdump/uat_reco_16233.trc:
ORA-02019: connection description for remote database not found
Mon Feb 13 11:08:30 CST 2012
ALTER SYSTEM ARCHIVE LOG
Mon Feb 13 11:08:30 CST 2012
Thread 1 advanced to log sequence 9008 (LGWR switch)
  Current log# 5 seq# 9008 mem# 0: /oracle/oradata/UAT/redo05.log
Mon Feb 13 11:09:14 CST 2012
Thread 1 advanced to log sequence 9009 (LGWR switch)
  Current log# 6 seq# 9009 mem# 0: /oracle/oradata/UAT/redo06.log

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值