Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2012
    Posts
    13

    Unanswered: DBMS_PIPE Package Help

    In the below mentioned code i am not getting any output.
    The block is getting executed successfully but no output.
    Can you please help me out on this.

    set serveroutput on size 1000000
    set wrap on
    set linesize 80

    declare

    v_text varchar2(4000);
    v_res number;
    v_num number;
    v_date date;
    v_usr user_users.username%type;
    v_err number;
    pipe_name VARCHAR2(300);
    begin
    pipe_name := DBMS_PIPE.UNIQUE_SESSION_NAME;
    loop
    v_res := dbms_pipe.receive_message (pipe_name,2);
    exit when v_res != 0;
    dbms_pipe.unpack_message (v_date);
    dbms_pipe.unpack_message (v_usr);
    dbms_pipe.unpack_message (v_num);
    dbms_pipe.unpack_message (v_text);
    dbms_output.put(to_char(v_date,'DD-MON-YYYY HH24:MIS')||' ');
    dbms_output.put(v_usr||' ');
    dbms_output.put(v_num);
    dbms_output.new_line;
    dbms_output.put_line(' '||v_text);
    end loop;
    end;
    /

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    what put data into PIPE?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    When communicating using PIPEs you need to identify a common pipe for both sending and receiving. In your code you are automatically creating a unique pipe for receiving. You should either let your 'send_message' process know of this pipe name or use a specifically named pipe 'mypipe'.

    I have put together a small tutorial on how this can work here Oracle – DBMS_PIPE example IT Integrated Business Solutions
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •