35

Can I call a stored procedure in Oracle via a database link?

The database link is functional so that syntax such as...

SELECT * FROM myTable@myRemoteDB

is functioning. But is there a syntax for...

EXECUTE mySchema.myPackage.myProcedure('someParameter')@myRemoteDB

3 Answers 3

59

The syntax is

EXEC mySchema.myPackage.myProcedure@myRemoteDB( 'someParameter' );
Sign up to request clarification or add additional context in comments.

3 Comments

@xtsoler - That would work for a stored function, not a stored procedure.
Do you know how can i invoke a stored procedure with parameters?
@Afaria - The example I posted is passing a parameter (the string 'someParameter').
1

check http://www.tech-archive.net/Archive/VB/microsoft.public.vb.database.ado/2005-08/msg00056.html

one needs to use something like

cmd.CommandText = "BEGIN foo@v; END;" 

worked for me in vb.net, c#

Comments

0

for me, this worked

exec utl_mail.send@myotherdb(
  sender => '[email protected]',recipients => '[email protected], 
  cc => null, subject => 'my subject', message => 'my message'
); 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.