ORA-04052: error occurred when looking up remote object
627152May 19 2009 — edited Sep 19 2012Hi,
I have created a function in which a table is accessed through the database link. the function is:
CREATE OR REPLACE function test_fun (v_column_name VARCHAR2, v_table_name VARCHAR2, v_owner_name VARCHAR2)
return VARCHAR2
as
col_name VARCHAR2(100);
begin
select COLUMN_NAME into col_name from ALL_TAB_COLUMNS@db_test_LINK where COLUMN_NAME= v_column_name AND
TABLE_NAME= v_table_name
AND OWNER=v_owner_name;
return col_name;
end;
when I compile it shows the following error:
ORA-04052: error occurred when looking up remote object test_OWNER.ALL_TAB_COLUMNS@db_test_LINK
ORA-00604: error occurred at recursive SQL level 1
ORA-12170: TNS:Connect timeout occurred
can anyone help?