
For better performance, you should use calls to GET_LINES Procedure which can return an array of lines.Įxample 2: Debugging Stored Procedures and Triggers

You repeat calls to GET_LINE until status comes back as nonzero. You could then optionally display the buffer on the screen. If you have enabled the DBMS_OUTPUT package, then the text produced by this PUT_LINE would be buffered, and you could, after executing the statement (presumably some INSERT, DELETE, or UPDATE that caused the trigger to fire), retrieve the line of information. For example, you could code the trigger to invoke:ĭBMS_OUTPUT.PUT_LINE('I got here:'||:new.col||' is the new value') You can use a trigger to print out some output from the debugging process. Example 1: Using a Trigger to Produce Output
