Calling a Stored Proc Over a Dblink

How to execute an Oracle stored procedure via a database link

The syntax is

EXEC mySchema.myPackage.myProcedure@myRemoteDB( 'someParameter' );

calling a stored proc over a dblink

From another of your questions I remember package_name.record_cursor to be a ref cursor type. A ref cursor is a memory handle only valid in the database it was created in. In other words, you cannot create a ref cursor in your remote db and try to fetch from it your local db.

If you really need to process the data in your local db and the tables have to stay in the remote db, then you could move the package "package_name" into your local db and have it execute the query on tables in your remote db via a database link.

call stored procedure using dblink and Java

Calling a stored procedure over a database link should be as simple as adding an @ sign and the database link name after the stored procedure, for example:

String sqlQuery = "{ CALL ACCUMULATED.GENERAR_ACUMULATED@your_db_link_name(?,?,?) }";


Related Topics



Leave a reply



Submit