Use dbms_pipe package : DBMS_PIPE « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL> create or replace procedure proc( cmd in varchar2 )
  2  as
  3      status number;
  4      resp   long;
  5      answer_pipe varchar2(255) default replace(dbms_pipe.unique_session_name,'$','_');
  6  begin
  7      dbms_pipe.pack_message( answer_pipe );
  8      dbms_pipe.pack_message( cmd );
  9
 10      status := dbms_pipe.send_message( 'HOST_PIPE' );
 11      if ( status <> 0 ) then
 12        raise_application_error( -20001, 'Pipe error' );
 13      end if;
 14
 15      status := dbms_pipe.receive_message( answer_pipe );
 16      if ( status <> 0 ) then
 17        raise_application_error( -20001, 'Pipe error' );
 18      end if;
 19      dbms_pipe.unpack_message( resp );
 20      dbms_output.put_line( substr( resp, 1, 80 ) );
 21  end;
 22  /








31.18.DBMS_PIPE
31.18.1.DBMS_PIPE.CREATE_PIPE
31.18.2.DBMS_PIPE.RECEIVE_MESSAGE with timeout
31.18.3.DBMS_PIPE.SEND_MESSAGE with timeout
31.18.4.DBMS_PIPE.SEND_MESSAGE
31.18.5.DBMS_PIPE.PACK_MESSAGE
31.18.6.DBMS_PIPE.REMOVE_PIPE
31.18.7.DBMS_PIPE.RECEIVE_MESSAGE
31.18.8.Use dbms_pipe package
31.18.9.DBMS_PIPE.RESET_BUFFER
31.18.10.DBMS_PIPE.UNPACK_MESSAGE and record type
31.18.11.Use DBMS_PIPE to pack message and send message