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!

Synonym for remote procedure in package

ow003765Sep 5 2002
From 9i, we want to access a procedure in a package on a remote 8i system. I can do this from SqlPlus using the fully qualified schema.package.procedure@remote_computer.com(a, b, c) syntax. However, this solution is not appropriate, because we don't want to reference the remote computer explicitly; we will be doing this from within some compiled Java code that we don't want to recompile moving from test to production. So I thought I could create a local synonym for the remote procedure, and indeed the SQL Reference says that Create Synonym can be used for remote objects. However, I'm finding that Create Synonym only works for two-part names, i.e., schema.object, and not 3-part names schema.package.object. When I try to Create Synonym on a 3-part name, I get error ORA-00933: SQL Command not properly ended, with a * under the second decimal point. So we next created a synonym on the remote system, and then another synonym on the local system for the now 2-part name. The synonym creates okay, but when I try to use it, I get ORA-06576: not a valid function or procedure name.

So how can I do this? The last thing I can think of is to create a local procedure which just wraps the call to the remote procedure. Ugly, but it should work.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2002
Added on Sep 5 2002
3 comments
808 views