客户遇到个问题,描述如下:--环境是ORACLE 9.2.0.8 (语句及场景非真实了,网上找的,情况是一致的) 创建了一个DB_LINK连接另一个Oracle数据库。 select * from tablename@dblinkname; 单句执行没问题,但是把这句SQL写到存储过程内: create or replace p
客户遇到个问题,描述如下:--环境是ORACLE 9.2.0.8
(语句及场景非真实了,网上找的,情况是一致的)
创建了一个DB_LINK连接另一个Oracle数据库。 select * from tablename@dblinkname;
单句执行没问题,但是把这句SQL写到存储过程内:
create or replace procedure prc_test
is
begin
insert into test
select * from tablename@dblinkname;
commit;
end;
就发生如下错误,存储过程编译不通过:
Error: PL/SQL: SQL Statement ignored
Line: 4
Text: insert into test
#########################################################
以下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
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn