Hi,

I have a PL/SQL code which will try to list a set of tables from the remote database & try displaying. When I ran the code, I am getting the error

declare

cursor table_list_c is
(select table_owner||'.'||table_name tab_name from scr_process@scr_link
MINUS
select owner||'.'||table_name tab_name from dba_tables@scr_link
);

table_name_v scr_process.table_name@scr_link%type;

begin
for table_name_v in table_list_c
loop
dbms_output.put_line(table_name_v.tab_name);
end loop;
end;

declare
*
ERROR at line 1:
ORA-04052: error occurred when looking up remote object
SYS.X$KSPPI@SCR_LINK.US.ORACLE.COM
ORA-00604: error occurred at recursive SQL level 1
ORA-02068: following severe error from SCR_LINK
ORA-03113: end-of-file on communication channel

DB link(scr_link) is working properly & even the inner sql query when I run separately, it is working fine.

Please suggest what is going wrong here? What can I do to make it to work?

Thanks in advance