oracle04052,oracle 报错 :ORA-04052、 ORA-00604、 ORA-03106、 ORA-02063

最近发现一个很奇怪的问题:

创建了一个DB_LINK连接另一个Oracle数据库。

select * from [email protected];

单句执行没问题,但是把这句SQL写到存储过程内:

create or replace procedure prc_test

is

begin

insert into test

select * from [email protected];

commit;

end;

就发生如下错误,存储过程编译不通过:

报错如下:PACKAGE BODY SKSKJ.PKG_TS 编译错误

错误:PL/SQL:

ORA-04052: error occurred when looking up remote object [email protected]

ORA-00604: error occurred at recursive SQL level 1

ORA-03106: fatal two-task communication protocol error

ORA-02063: preceding line from DZDZ_SJTS

行:32

文本:insert into [email protected]

也不是所有的数据库都有这样的问题。

哪位大侠遇到过这样的问题,能否给个解决方案?非常感谢!

附:创建dblink的脚本:

-- Drop existing database link

drop database link dblink1;

-- Create database link

create database link dblink1

connect to username123 identified by passwd123

using ‘(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.*.*)(PORT = 1521))

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = 123)

)

)‘;

drop synonym test;

create synonym test for [email protected];

--metalink上解决问题方法,打上对应的补丁就解决了。

Subject:  Errors ORA-00604 And ORA-03106 During Procedure Compilation

Doc ID:  577347.1 Type:  PROBLEM

Modified Date :  26-MAY-2008 Status:  MODERATED

Applies to:

PL/SQL - Version: 9.2.0.4 to 9.2.0.8

This problem can occur on any platform.

This note applies only if the underlying Oracle Client is below 9.2.0.8 Patch 4

Symptoms

While trying to run pl/sql code involving queries which access remote objects, you may endup getting below errors:

PL/SQL: ORA-04052: error occurred when looking up remote object

ORA-00604: error occurred at recursive SQL level 1

ORA-03106: fatal two-task communication proto error

ORA-02063: preceding line from AFQ

When the same query is run outside pl/sql block it runs perfectly.

Cause

You are most probably hitting the Bug 5866805.

Bug 5866805 duplicate of Bug 5576340 which is itself a duplicate of Bug 5671074.

Solution

The Bug 5671074 IS fixed IN 9.2 .0 .8 Patch 4 OR above.

原文:http://www.cnblogs.com/iyoume2008/p/4865053.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值