So, is your problem fixed? I'm running and getting new rows.
Main Topics
Browse All Topicsi'm trying to use dbms_pipe to pipe data from one procedure to another. the procedures are as follows. i'm using dbms_job to start the ben_test_proc2 procedure (code also below). it will sit in a loop for a specified period of time looking down the pipe. i call ben_test_proc to submit some values to the pipe. for some reason i'm not getting any values inserted into my table from ben_test_proc2. any ideas what i'm doing wrong here? thx.
--begin ben_test_proc
CREATE OR REPLACE PROCEDURE Ben_Test_Proc
IS
s INTEGER;
p_id NUMBER := 1;
p_first NUMBER := 1;
p_last NUMBER := 1;
p_flag VARCHAR2(10) := 'test' ;
BEGIN
s:=sys.dbms_pipe.create_pi
SYS.DBMS_PIPE.pack_message
SYS.DBMS_PIPE.pack_message
SYS.DBMS_PIPE.pack_message
SYS.DBMS_PIPE.pack_message
s := SYS.DBMS_PIPE.send_message
dbms_output.put_line(s);
END Ben_Test_Proc;
/
--------end ben_test_proc
-------begin ben_test_proc2
CREATE OR REPLACE PROCEDURE Ben_Test_Proc2
IS
n NUMBER;
ID NUMBER;
FIRST VARCHAR2 (50);
LAST VARCHAR2 (50);
flag CHAR (1);
record_count NUMBER;
BEGIN
WHILE TO_DATE ('07-Sep-2005 14:20:00', 'DD-Mon-YYYY HH24:MI:SS') > SYSDATE
LOOP
n := DBMS_PIPE.receive_message ('eims_assoc_trigger_pipe'
DBMS_PIPE.unpack_message (ID);
DBMS_PIPE.unpack_message (FIRST);
DBMS_PIPE.unpack_message (LAST);
DBMS_PIPE.unpack_message (flag);
SELECT COUNT (*)
INTO record_count
FROM BEN_TEST;
INSERT INTO BEN_TEST_AFTER
VALUES (ID, FIRST, LAST, SYSDATE, flag, record_count);
COMMIT;
END LOOP;
n := sys.dbms_pipe.remove_pipe(
END Ben_Test_Proc2;
/
---end ben_test_proc2
--start dbms_job
DECLARE
jobno NUMBER;
BEGIN
sys.dbms_job.submit(jobno,
END;
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
yes and know. i can get data most of the time. however, even when i do i can't see the data in the table until the job is done. when i use this for real, i want to have ben_test_proc2 in an infinate loop just watching the pipe, but i need to be able to get the data right after it's inserted. is that possible? also, do i need to remove the pipe, or just purge it? i've never used dbms_pipe before.
bp
it's wierd. i run the job, run the first procedure a couple times. then after the time limit i have specified in the second procedure, i'll run the first procedure again (b/c it's in the loop until i do so). some of the time the data appears in the table, sometimes it doesn't. i don't know what's going on (other than my blood pressure rising).
I was running the ben_test_proc, and the rows showed up in the table immediately. I didn't have to wait until the looping process ended. That makes sense, since it's committing the data. Once the commit occurs, you must be able to see it from the other session. If you can't, the commit didn't occur. I'm not sure what that means, but that sure sounds weird.
For the record, here's what I did:
I kicked off the looping process (changed the time to be about 5 minutes in the future). Then I kicked off the procedure that issued the message. It came back immediately, giving me a return code of zero. I selected from the table, and a new row was added. Then I ran multiple times, each time getting a new row. Then after the time limit was passed, I ran one more time. Again, another row was added. I'm trying to think of what could prevent this from working, but having difficulty coming up with anything. Especially since it seems to be working OK for me.
Business Accounts
Answer for Membership
by: benpungPosted on 2005-09-07 at 12:39:53ID: 14839551
my fault. the declaration of ben_test_proc is:
CREATE OR REPLACE PROCEDURE Ben_Test_Proc
IS
s INTEGER;
p_id NUMBER := 1;
p_first VARCHAR2(30) := 'first';
p_last VARCHAR2(30) := 'last';
p_flag VARCHAR2(10) := 'F' ;
BEGIN
...