Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Debugging Messages 2

Debugging Messages 2

Ratings: (0)|Views: 0|Likes:
Published by Ashok Babu

More info:

Published by: Ashok Babu on Oct 08, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





How can I get a PL/SQL procedure to output highvolumes of debugging messages?
Author's name:
 Raj Jamadagni 
 Author's Email:
rajendra dot jamadagni at espndot com
Date written:
 Oracle version(s):
Oracle 7.3 and later 
Whenever I needed some kind of 
from a plsql procedure, I used to rely on
for displaying messages. This worked fine, until I realised that themessages won’t be displayed until after the code is executed completely. So I foundanother solution …Back to index of questionsOracle supplied package
is of great help, and my solution is based aroundthis package. There are two things needed, a
 stored procedure
and a
listening program.
 stored procedure
accepts a message string and optionally a pipe name. It simple putsthe message on the default pipe (unless pipe name is specified explicitly).The
listening program
can be anything that can read an oracle database pipe. This program is basically a loop, that sleeps for a while, wakes up, checks the pipe for anymessages and repeats. If a message is received, it can be processed as per individualrequirements, I usually print it to
. Oracle has provided a skeleton program called‘daemon.c’ that demonstrates a pipe listener.I prefer this technique over 
, for the following reasons
This works across clients i.e. I can use this procedure to dump messages from myOracle Form, as well as server code. So this gives me a complete picture of execution.
The messages put on the pipe can be viewed instantly (actually based on pollingtime specified for the listening daemon), so
I can see messages as the executionprogresses
This doesn't have 1MB limits, that of dbms_output.I embedded debugging code in my applications in such a manner that it allows me to turnon/off this tracing at runtime without any modifications to my code. Note: There is some learning curve involved in this, but here is my experience, it took mefew hours to experiement and set this up, but in last 3+ years I haven’t touched the code.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->