Accessing remote procedure over dblink

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Accessing remote procedure over dblink

Postby Anand » Wed Apr 17, 2013 7:27 am

Hi Tim,

I am having trouble in accessing the remote procedure over dblink. My requirement is as follows:-

We have 2 database instances say Instance1 and Instance2

At Instance1 schema's say "FMS_SCHEMA1" , I have one procedure called "test_dblink" as shown below:-
Code: Select all
create or replace procedure test_dblink as
begin
      null;
exception when others then
null;
end;


In order to access the "Instance1" schema's procedure I have created the dblink also.

Code: Select all
create database link FMS01 connect to FMS_SCHEMA1 using 'test01.boogie_dev';


But when I tries to access the "Instance1" schema's procedure from "Instance2" schema it gives me the following error:-

ORA-04052: error occurred when looking up remote object FMS_SCHEMA1.TEST_DBLINK@FMS01
ORA-00604: error occurred at recursive SQL level 1
ORA-06544: PL/SQL: internal error, arguments: [55916], [], [], [], [], [], [], []
ORA-06553: PLS-801: internal error [55916]
ORA-02063: preceding 2 lines from FMS01

Please assist, what wrong I am doing or what else I have to do now.

Thanks & Regards,
Anand Kumar Ojha
Anand
Member
 
Posts: 22
Joined: Thu Jun 07, 2012 2:59 pm

Re: Accessing remote procedure over dblink

Postby Tim... » Wed Apr 17, 2013 5:13 pm

Hi.

What happens if you supply a password?

Code: Select all
create database link FMS01 connect to FMS_SCHEMA1 identified by ????? using 'test01.boogie_dev';


Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17966
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Accessing remote procedure over dblink

Postby Anand » Thu Apr 18, 2013 5:28 am

Hi Tim,

The dblink was created successfully after supplying the password.
In fact we are able to select the "FMS_SCHEMA1" tables using the same dblink but we are not able to execute the procedure mentioned using this dblink.

Thanks & Regards,
Anand Kumar Ojha
Anand
Member
 
Posts: 22
Joined: Thu Jun 07, 2012 2:59 pm

Re: Accessing remote procedure over dblink

Postby Tim... » Thu Apr 18, 2013 6:47 am

Hi.

What are the source and destination database versions? There are odd bugs in some versions. A couple of days ago we had a problem when a 10.2.0.4 database had a DB Link to an 11.2.0.2 database. The link worked for running a procedure owned by the remote user, but not one via a synonym. Perhaps you would be better checking this with Oracle support as it may be a known bug with your versions...

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17966
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle SQL and PL/SQL Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron