Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute an Oracle stored procedure via a database link

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 
like image 815
dacracot Avatar asked Oct 27 '08 17:10

dacracot


People also ask

How can you execute a stored procedure in the database?

Expand the database that you want, expand Programmability, and then expand Stored Procedures. Right-click the user-defined stored procedure that you want and select Execute Stored Procedure. In the Execute Procedure dialog box, specify a value for each parameter and whether it should pass a null value.

How does DB Link work in Oracle?

A database link is a pointer that defines a one-way communication path from an Oracle Database server to another database server. The link pointer is actually defined as an entry in a data dictionary table. To access the link, you must be connected to the local database that contains the data dictionary entry.

How do I use DB link in Toad?

Go to Schema Browser | DB Links tab | highlight the DB Link name you want to test | then click on the “Test Database Link” icon (lightning bolt icon) | and it should give you the test results like below.


1 Answers

The syntax is

EXEC mySchema.myPackage.myProcedure@myRemoteDB( 'someParameter' ); 
like image 195
Justin Cave Avatar answered Oct 11 '22 02:10

Justin Cave