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!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
I have two database db1 & db2 and i have created two procedures pr1 in db1 and pr2 in db2. How do i call pr2 from pr1. Both database lies on same server.
Thanks
Vignesh.
You should create dblink between db1 and db2.
IN PR1 you can use like this
BEGIN
.
PR2_procdure@db_link_name(param1);
END;
My preference would be to create the database link, then create a synonym for the procedure on the 'remote' database.
That way, if the 'remote' database changes, you simply need to create the database link to the new target and change the synonym without having to amend any code calling the 'remote' procedure.
This is, of course, most beneficial if the 'remote' procedure is called from multiple pieces of code.