Hi All,
I have created the following script in Database A and database B
TYPE PLSQL_TAB IS TABLE OF VARCHAR2(100);

and created a DB link from B to A

and created the following procedure in A

CREATE OR REPLACE PROCEDURE proc_test(
out_tab OUT plsql_tab)
IS
BEGIN

--INSERT INTO TABLE CAST(out_tab AS plsql_tab)

SELECT ctry_cd
BULK COLLECT INTO out_tab
FROM ctry;

EXCEPTION
WHEN OTHERS THEN
NULL;
END;
/


and i made a synonym of
create or replace proc_test for proc_test@;

and i tried getting the table data accesing the proc from b by using the following script

declare
a plsql_tab;
begin
proc_test(a);
end;
/

it gives me the following error

ERROR at line 1:
ORA-06550: line 4, column 1:
PLS-00306: wrong number or types of arguments in call to 'PROC_TEST'
ORA-06550: line 4, column 1:
PL/SQL: Statement ignored

Please let me know if there is any solution for this. And i think we cannot pass the data thru refcursors also over the DB-Link.
-----------------------------------------------------------
I used it by using package variable also

CREATE OR REPLACE PACKAGE pk_test AS

tab plsql_tab;

PROCEDURE proc_test(out_tab OUT plsql_tab);

END pk_test;
/

CREATE OR REPLACE PACKAGE BODY pk_test AS

PROCEDURE proc_test(out_tab OUT plsql_tab)
IS
BEGIN

SELECT ctry_cd
BULK COLLECT INTO out_tab
FROM CTRY;

EXCEPTION
WHEN OTHERS THEN
NULL;
END;
END;
/


DECLARE
a pk_test.tab;
BEGIN
pk_test.proc_test(a);
END;
/

i get the following error

PLS-00960 RPCs cannot use variables with schema level user-defined types in this release

Cause: Schema level user-defined types, or types which recursively use such types, cannot be used in RPCs. For example:

create type foo as object (...)
create package my_pack is
type my_tab is table of foo;
-- on a remote server:
x my_pack.my_tab@rpc; -- illegal attempt to use type my_tab


Action: Use only PL/SQL-defined types for RPC calls. It may be necessary to add extra code to element-wise copy top-level types into local types in order to move such data through an RPC.