Toad World® Forums

How to see DBMS output automatically when something comes through

DBMS output is not only used for debugging, but for communication back to the user as well, providing error messages and such. Right now, when a PL/SQL procedure call generates DBMS output, you have to manually remember to check the DBMS Output window to see whether there is a message there or not. We have developers constantly forgetting to do that. As a result, procedures they are calling are failing and reporting errors and they don’t even know it.

Is there a way to have DBMS output show up automatically when it is picked up, instead of putting the burden on the user to remember to check the right window? In DBArtisan, DBMS output was included in the script output/errors tab to which you were always transferred upon query/script execution, so there was one place to see all results and you always saw it every time. Can anything similar be done in Toad?

you might look into saved desktop for the editor - it’s a drop-dwon on editor toolbar - it might do what you like (and if not - it should and you could post the idea to the idea pond for votes)

Is there any way to get the dbms output to show up in the script output window instead of its own separate window? The problem is that I never know which window to check for output - there’s three of them - data grid, script output and dbms output. Not to mention error messages. There’s got to be a way for Toad to show you the right window instead of you having to guess or check all three/four each time.

Not to be rough here - but each window has a separate, well-defined purpose. So there really should be no guessing. If I press execute (f9) then there is no need to look at script output. I think this is just a newbie, learning issue.

It’s a newbie learning issue for Toad, not for Oracle. I’ve been a power user of DBArtisan for 17 years. Just trying to adjust to a strange product from what I’m used to. On the thing about each window having a separate, well-defined purpose, DBArtisan didn’t think so - whether you are issuing a query, compiling a procedure or executing a procedure, all output should show up in the same place and be immediately shown to you, instead of you having to pick and choose the corresponding window to whatever you think you may have just done.

There are two settings that should achieve this. Check the “Enable DBMS Output before debug session” option in View|Options|Debugger. On the DBMS Output tab in the Editor check the third button from the left, the one with the lightning bolt on it. Those two
should have you covered.

On 03/12/2014 09:54 AM, pwatkins wrote:

RE: How to see DBMS output automatically when something comes through

Reply by pwatkins
It’s a newbie learning issue for Toad, not for Oracle. I’ve been a power user of DBArtisan for 17 years. Just trying to adjust to a strange product from what I’m used to. On the thing about each window having a separate, well-defined purpose, DBArtisan didn’t
think so - whether you are issuing a query, compiling a procedure or executing a procedure, all output should show up in the same place and be immediately shown to you, instead of you having to pick and choose the corresponding window to whatever you think
you may have just done.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

I worked for EMBT before coming to Quest (now Dell) - I used to design features for DBArtian, ER Studio and Rapid SQL. So I know all their products quite well. So I know what you mean by learning a new product - Toad is very different and aint going to be ever the same as DBArtisan. But you are going to find minor ideas for improvements based upon other tool experience - and so add them to idea pond for consideration. No idea is a bad one. But many Toad users hate other tools and the way they work - so don’t be surprised if soemtimes users don’t jump on some suggestions … But work the system …

Michael, thanks for the reply. I checked and both of those settings are already in place. It is retrieving the DBMS output just fine. The problem is that it isn’t sending me to the DBMS output window to see it. If I execute a procedure and it may or may not produce DBMS output, I will never know unless I remember to click on the DBMS output tab and see.

What are you executing and how are you doing it? When executing stored PL/SQL using F11 if there is output the output window is automatically activated. When executing anonymous block using F9 the DBMS Output window remains active if it was last active. When
executing SQL the data grid is activated afterwards, etc. If you are executing single statements using F5 (execute as script) I’d suggest using one of the other methods that are specifically designed for single statement execution. Script execution will also
put the output on the DBMS Output window, but it activates the Script Output tab. If you are using execute as script and want to continue to do so you should add “set serveroutput on” to the beginning of your script.

On 03/12/2014 10:03 AM, pwatkins wrote:

RE: How to see DBMS output automatically when something comes through

Reply by pwatkins
Michael, thanks for the reply. I checked and both of those settings are already in place. It is retrieving the DBMS output just fine. The problem is that it isn’t sending me to the DBMS output window to see it. If I execute a procedure and it may or may
not produce DBMS output, I will never know unless I remember to click on the DBMS output tab and see.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

When executing stored PL/SQL using F11 if there is output the output window is automatically activated.
Good point.
Now I see that I was referring to Script Output window and not dbms_output …

Thanks Michael, the “set serveroutput on” worked. I’m not accustomed to using SQLPlus commands outside of SQLPlus. Anyway, by putting that in glogin.sql and having it autorun with script executions, I can remove the DBMS output tab completely and just look at the script output tab. That works. Thx!

toad does SQL*PLus compat - read these:

www.toadworld.com/…/toad-supports-sql-plus-compatibility.aspx

www.toadworld.com/…/toad-handles-sql-plus-scripting.aspx

www.toadworld.com/…/toad-handles-sql-plus-scripting-part-ii.aspx

www.toadworld.com/…/making-toad-do-what-you-want.aspx

www.toadworld.com/…/toad-and-sql-plus-compatibility.aspx

If you are executing as script you should just treat it like executing within SQL Plus. Script execution is a SQL Plus emulator in many respects. If you are simply executing stored PL/SQL and not running scripts you should use one of the other methods like
F11 that are designed specifically for this purpose with additional features that aren’t available when executing scripts.

On 03/12/2014 01:42 PM, pwatkins wrote:

RE: How to see DBMS output automatically when something comes through

Reply by pwatkins
Thanks Michael, the “set serveroutput on” worked. I’m not accustomed to using SQLPlus commands outside of SQLPlus. Anyway, by putting that in glogin.sql and having it autorun with script executions, I can remove the DBMS output tab completely and just
look at the script output tab. That works. Thx!

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.