Click on Icon Green Plus and select your schema.
"SET serveroutput ON" is a SQL*Plus command and is not valid PL/SQL.Ĭompile your code in your Oracle SQL developer. To know more about it with the architectural structure of Oracle Server Engine you can see my answer on Quora Īnd to answer your question "One should use SET SERVER OUTPUT in the beginning of the session. *Hey please print the ARGUMENT/VALUES that I will be passing inside dbms_output.put_lineĪnd in turn PL/SQl run time engine prints the argument on the main console. Using SET SERVER OUTPUT ON are just telling the PL/SQL engine that
Belayer at 8:46 Add a comment 1 If use SQLplus then this code works fine. Other IDEs will have a similar method on enabling dbmsoutput. It makes a lot of confusion to the beginners that we are setting the server output on ( because of its nomenclature ), but unfortunately its nothing like that. In SQLplus run SET SERVEROUTPUT ON before the plsql is run, In sql developer select View->dbmsoutput then in the resulting window click the yellow + and select your schema in the resulting dialog. And we need to set the environment variable only once for a session !!Īnd in order to fetch it from that buffer we need to set the environment variable for the session. *NOTE :***However one should note that this buffer is only created when we use **dbms_output package. ARGUMENT/VALUES, is internally stored inside a buffer in SGA(Shared Global Area ) memory area upto 2000 bytes. With an output : PL/SQl procedure successfully completed i.e without the expected outputĪnd the main reason behind is that ,whatever we pass inside dbms_output.put_line(' ARGUMENT '/VALUES) i.e. To understand the use of " SET SERVEROUTPUT ON" I will take an example DECLARE