--远程
PACKAGE pkg_aaa
IS
TYPE t_cursor IS REF CURSOR;
PROCEDURE p_1(
p_cursor OUT t_cursor,
p_year VARCHAR2 DEFAULT NULL
);
end;
package body pkg_aaa
is
PROCEDURE p_1(
p_cursor OUT t_cursor,
p_year VARCHAR2 DEFAULT NULL )
IS
BEGIN
open p_cursor for select * from t1 where year=p_year;
END p_1;
end;
------------------------------------------------------
--本地
PACKAGE pkg_bbb
IS
TYPE t_cursor IS REF CURSOR;
PROCEDURE p_2(
p_cursor OUT t_cursor,
p_year VARCHAR2 DEFAULT NULL
);
end;
package body pkg_bbb
is
PROCEDURE p_2(
p_cursor OUT t_cursor,
p_year VARCHAR2 DEFAULT NULL )
IS
BEGIN
pkg_aaa.p_1@abc(p_cursor,p_year);
END p_2;
end;
我想通过dblink--@abc, pkg_bbb中过程p_2 调用执行pkg_aaa.p_1@abc()...获取cursor 返回。(单独执行p_1 可以返回cursor)
执行出现错误:
ORA-00604: error occurred at recursive SQL level 1
ORA-01003: no statement parsed
请指点,谢谢!
--友情转载