3 Replies Latest reply: Mar 25, 2013 4:01 AM by user477000 RSS

    Not getting output

    998860
      The staements under DBMS_OUTPUT.PUT_LINE are not getting executed. It only shows the messege 'PL/SQL procedure successfully completed"
      For example,
      SQL>DECLARE
      2 v_num NUMBER:=2;
      3 BEGIN
      4 DBMS_OUTPUT.PUT_LINE('NUM:'||v_num);
      5 END;
      6 /
      PL/SQL procedure successfully completed.
      SQL>
      like this it does not show output. The display procedure does not executed.
      wht to do for this problem?????
        • 1. Re: Not getting output
          Solomon Yakobson
          DBMS_OUTPUT.PUT_LINE simply writes to a buffer. It is client's responsibility to read the buffer and display results on screen. In SQL*Plus this can be done via SET SERVEROUTPUT command:
          SQL> DECLARE
            2      v_num NUMBER:=2;
            3  BEGIN
            4      DBMS_OUTPUT.PUT_LINE('NUM:'||v_num);
            5   END;
            6  /
          
          PL/SQL procedure successfully completed.
          
          SQL> set serveroutput on
          SQL> DECLARE
            2      v_num NUMBER:=2;
            3  BEGIN
            4      DBMS_OUTPUT.PUT_LINE('NUM:'||v_num);
            5   END;
            6  /
          NUM:2
          
          PL/SQL procedure successfully completed.
          
          SQL> 
          SY.
          • 2. Re: Not getting output
            S10390
            In SQL Developer , go to View-> Dbms Output.

            Then select the schema name to display the output.
            • 3. Re: Not getting output
              user477000
              set serveroutput on