Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8618195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:02:59+00:00 2026-06-12T06:02:59+00:00

Im using Aqua Data Studio to debug a stored proc by scattering output statments

  • 0

Im using Aqua Data Studio to debug a stored proc by scattering output statments throughout.

I have a delete statement in the package which violate an integrity constraint:

DELETE FROM x WHERE x.ID = an_x_with_children;

My proc fails with an ORA-02292 on this line, as expected. I want to see the value of the an_x_with_children variable. So I wrap the line with outputs like so:

dbms_output.put('Attempting to delete x: ' || an_x_with_children);
DELETE FROM x WHERE x.ID = an_x_with_children;
dbms_output.put(' Success');

And expect to see the message as the last thing in the messages console prior to the integrity constraint violated error message. But it doesn’t print!

Now if I change the output to use the put_line() procedure like this:

dbms_output.put_line('Attempting to delete x: ' || an_x_with_children);
DELETE FROM x WHERE x.ID = an_x_with_children;
dbms_output.put_line(' Success');

I see the message “Attempting to delete x: 123” immediately before the proc errors out.

The docs for the dbms_output package don’t mention the put and put_line procedures behaving any differently in this respect. For instance, it says

Output that you create using PUT or PUT_LINE is buffered.

So I would expect either both or neither to show output when the proc errors.

Can someone explain what’s going on with this behaviour to me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:03:01+00:00Added an answer on June 12, 2026 at 6:03 am

    Here is an example that shows the behaviour you’re seeing:

    SQL> exec dbms_output.put_line('hello')
    hello
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dbms_output.put('hello again')
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dbms_output.put(' and again')
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dbms_output.new_line
    hello again and again
    
    PL/SQL procedure successfully completed.
    

    The documentation says “SQL*Plus calls GET_LINES after issuing a SQL statement or anonymous PL/SQL calls.”

    And procedure GET_LINES says “This procedure retrieves an array of lines from the buffer.”

    With PUT you haven’t completed your line yet. And so it doesn’t print.

    The NEW_LINE procedure mentions this as well: “This procedure puts an end-of-line marker. The GET_LINE Procedure and the GET_LINES Procedure return “lines” as delimited by “newlines”. Every call to the PUT_LINE Procedure or NEW_LINE Procedure generates a line that is returned by GET_LINE(S).”

    Regards,
    Rob.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Aqua Data Studio and sybase. Say I have 20 different stored
i have using aqua data studio to run my query from sql server 2005.
How do I output the data from table1 into table2 using Oracle8I? I am
Using RestKit 0.10.1, I have objects served similar to this json format: {objects: [
I have a bunch of diagrams created using a Java diagramming tool that I
I have a Magento site using JS (prototype) to display tabbed content on product
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
Using Yii, I want to delete all the rows that are not from today.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.