SQL> SQL> -- RPC can not have commit with 'OUT' parameter SQL> -- Same thing for functions with commit trying to return vlaue to the caller. SQL> SQL> conn jyang/jyang@athena Connected. SQL> SQL> drop table t2_a; drop table t2_a * ERROR at line 1: ORA-00942: table or view does not exist SQL> create table t2_a nologging as select * from test2; Table created. SQL> SQL> create or replace function remote_ddl 2 return SYS_REFCURSOR 3 is 4 x SYS_REFCURSOR; 5 result varchar2(200); 6 begin 7 execute immediate 'truncate table t2_a'; 8 exception 9 WHEN OTHERS THEN 10 result := SQLERRM; 11 open x for select result from dual; 12 return x; 13 end remote_ddl; 14 / Function created. SQL> SQL> create or replace function remote_ddl2 2 return varchar2 3 is 4 result varchar2(200); 5 begin 6 execute immediate 'truncate table t2_a'; 7 exception 8 WHEN OTHERS THEN 9 result := SQLERRM; 10 return result; 11 end remote_ddl2; 12 / Function created. SQL> SQL> conn jyang/jyang@phoenix Connected. SQL> SQL> variable x varchar2(200); SQL> begin 2 :x := remote_ddl2@athena; 3 end; 4 / PL/SQL procedure successfully completed. SQL> -- ORA-02064: distributed operation not supported SQL> print x; X -------------------------------------------------------------------------------- ORA-02064: distributed operation not supported SQL> SQL> -- ORA-03113: end-of-file on communication channel SQL> variable x refcursor; SQL> begin 2 :x := remote_ddl@athena; 3 end; 4 / begin * ERROR at line 1: ORA-03113: end-of-file on communication channel SQL> SQL> spool off