chetan kasar, June 29, 2017 - 9:04 am UTC
Hello Team,
I just found out that problem is not in cursor to cursor assignment, but it occures when I call procedure "abc" over dblink in another procedure "xyz".
----------------------------------------------------------------------------
-- Procedure "abc" is in First Database "DB1"
----------------------------------------------------------------------------
create or replace procedure abc(ref_cur out sys_refcursor)
as
begin
open ref_cur for select * from table_name;
end abc;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Procedure "xyz" is in Second Database "DB2"
----------------------------------------------------------------------------
create or replace procedure xyz(ref_cur out sys_refcursor)
as
p_out sys_refcursor;
begin
abc@dblink_for_DB1(p_out);
ref_cur := p_out;
end xyz;
----------------------------------------------------------------------------
exec xyz(:rc);
Got Error:
----------------------------------------------------------------------------
ORA-00604: error occurred at recursive SQL level 1
ORA-01001: invalid cursor
So, here the problem occures when I call a procedure returning ref cursor over DBLINK.
Please look and suggest.
June 30, 2017 - 4:06 am UTC