Re: Debugging a Stored Procedure on the Database
Date: 1998/05/21
Message-ID: <6k2npm$33ek$1_at_newssvr04-int.news.prodigy.com>#1/1
Hi Sean,
The most common approach (IMHO) is to write a "debug" procedure and call
is
at the points of interest. For instance, in my code SQL statements are
preceded with a function variable
IE: Func_No := 12345 and some kind of message string IE: msg := 'Starting
something';
Then when appropiate the debug procedure is called which DBMS_OUTPUT the
func_no and msg variables
and anything else you deem of interest.
IE:
----- Global Variables ----
DEBUG_FLAG BOOLEAN := TRUE;
Func_no NUMBER := 0;
Msg VARCHAR2(2000) := '';
Procedure Debug IS
BEGIN
IF (DEBUG_FLAG) THEN
DBMS_OUTPUT(Func_no||' - '||msg);
END IF;
END;
With the DEBUG_FLAG you can turn output on or off and can stay in the code
to possibly
debug production code too.
This is fairly simple and can be enhanced to include Oracle error codes and
error messages etc. to suit
your needs.
Good luck.
Alex
Sean Dolan wrote in message <6k1no1$9je$1_at_news-2.csn.net>...
>Oracle 7.3.4 on NT 4 SP3... I have made a complex series of stored
>procedures and have them stored on the database. It's not working perfect
>so I'd like to debug it, how would I do that ON THE SERVER... in Forms
>Designer, I can put pauses to check, but how on the server?
>
>Thanks,
>Sean Dolan
>Sr Systems Engineer, 3Si Inc
>MCSE
>
>
Received on Thu May 21 1998 - 00:00:00 CEST