call a procedure on a remote db using db. link
Oracle db. 18c.
Hi,
Trying to execute a stored procedure on MS SQL server with multiple parameters, on oracle side using pl/sql.
I can access tables, select, insert, etc.. But not able to run a remote stored procedure.
exec remote_prc@mydblink
Working
from Oracle pl/sql:
set echo on;
set serveroutput on;
DECLARE
c INTEGER;
R1 INTEGER;
SOUT varchar2(100);
C1 INTEGER;
BEGIN
c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@dblink;
DBMS_HS_PASSTHROUGH.PARSE@dblink(c,'EXEC remote_prc[something]');
LOOP
R1 := DBMS_HS_PASSTHROUGH.FETCH_ROW@dblink (c);
EXIT WHEN R1 = 0;
DBMS_HS_PASSTHROUGH.GET_VALUE@dblink (c, 1, SOUT);