Use dbms_output.put_line in Datagrip for .sql files

Cezar Cobuz picture Cezar Cobuz · Apr 2, 2018 · Viewed 7k times · Source

I started to use Datagrip for my PL/SQL (school) projects that need the use of DBMS_OUTPUT.PUT_LINE. Before this I was using Oracle SQL developer and I was able to use DBMS_OUTPUT by adding the following:

SET serveroutput ON;

There is a related question that shows how to enable or disable showing the contents of the DBMS_OUTPUT buffer but this only works for the Database Console tool window. How can I apply this to any .sql file? Currently, I am copying the content of my .sql files and run it in the Console tool window but there must be a better way.

Answer

moscas picture moscas · Apr 2, 2018

Turn on this setting in the Output pane: enter image description here