Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-04052: error occurred when looking up remote object

627152May 19 2009 — edited Sep 19 2012
Hi,
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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2012
Added on May 19 2009
10 comments
38,601 views