Search This Blog

pass table as an argument to a remote procedure?

The only way the same object type can be referenced between two databases is via a database link.

-- Database A1: receives a PL/SQL table from database B1

CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL.VARCHAR2S) IS

BEGIN

-- do something with TabX from database B1

null;

END;

/


-- Database B1: sends a PL/SQL table to database A1

CREATE OR REPLACE PROCEDURE pcalling IS

TabX DBMS_SQL.VARCHAR2S@DBLINK2;

BEGIN

pcalled@DBLINK2(TabX);

END;

/