ITPub博客

首页 > 数据库 > Oracle > ORA-02062号错误

ORA-02062号错误

原创 Oracle 作者:OmarChina 时间:2007-09-25 09:28:04 0 删除 编辑

8点钟就跑到公司来,辛苦的拉。为的是割接测试。

[@more@]

一切顺利。当主database切换到standby后。发现数据库不停的报

Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 08:55:50 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 08:55:50 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 5f06e73f
Tue Sep 25 09:02:15 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 09:02:15 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 09:02:15 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 5f06e73f
Tue Sep 25 09:11:49 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 09:11:49 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 3122e55f
Tue Sep 25 09:11:49 2007
Errors in file /u01/app/oracle/admin/southdb/bdump/reco_25938.trc:
ORA-02062: distributed recovery received DBID b5482b5f, expected 5f06e73f

但是应用不受任何影响。数据库也运作正常。

当把standby切割回来后,发现primary database也在不停的报这个错误.

没有metalink就google吧。

ORA-02062 distributed recovery received DBID string, expected string

Cause: A database link at a coordinator no longer points to the expected database. Link may have been redefined, or a different database mounted.

Action: Restore the link definition or the remote database.

数据库链接所对应的数据库发生了变化(重建等原因),不是原来的那个数据库

处理办法:

(1) set transaction use rollback segment system
(this is VERY important, otherwise database loss can occur)
(2) select * from dbc_2pc_pending where state='collecting';
(3) for each local_tran_id in selected rows, delete where local_tran_id is that value from the following tables:
dba_2pc_pending
pending_sessions$
pending_sub_sessions$

因为是817 undo是手工管理的,就不用进行第一步设置。如果是auto 管理undo 段的话

要先屏蔽掉对undo操作的错误提示:
sql>alter system set UNDO_SUPPRESS_ERRORS = TRUE
sql>EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('1.29.81672')
sql>alter system set UNDO_SUPPRESS_ERRORS = false

首先:

/****1.查找处于分布式事务状态下的本地事务ID号***/

select local_tran_id from dba_2pc_pending;

29.22.266482
8.36.982659
27.40.380788

/*****清楚这个分布式事务(该事务已经无法完成),不会对数据库有影响***/

SQL> EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('29.22.266482');

PL/SQL procedure successfully completed

SQL> commit;

PL/SQL procedure successfully completed

依次执行。。。

后OK。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9925929/viewspace-972021/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    68
  • 访问量
    997195