I have a script which is writing output to the DBMS Output window using dbms_output.put_line and which is shifting the session user using connect user[proxy]/password@connection.

The calls to put_line done before the connect statement show up; any calls after do not. Where are they going? How can I see them?


begin dbms_output.put_line(‘This line shows up’); end;

connect user[proxy]/password@connection;

begin dbms_output.put_line(‘This line is missing’); end;

As far as I remember, only the session that wrote the output can retrieve it at the end. So when you connect to another session, you might need to do your dbms_output.enable stuff again.

Plus, Toad silently does a dbms_output.get_lines call at the end of your script to retrieve the output for the appropriate tab. You might need to call this manually perhaps, in your second session.




Sent from my Android device with K-9 Mail. Please excuse my brevity.

Ah-hah, thank you! I put a call to dbms_output.enable after each connect and that did the trick.