How Can I "set server output" on in Jetbrains DataGrip IDE? I am able to do this in SQL Developer and run the SQL script successfully. The same script I try to run in DataGrip and it gives error. I know its the "set server output on" that is not working because I had to configure SQL Developer for it to work. Any advice would be appreciated. Thanks.
-
3I am not sure about datagrip, but isn't it `set serveroutput on` without the space? – Gurwinder Singh Jan 05 '17 at 17:18
3 Answers
According to the documentation:
For Oracle, you can enable or disable showing the contents of the DBMS_OUTPUT buffer in the output pane. To do that, use
on the toolbar of the Database Console tool window (Ctrl+F8).
They also show an image of the window with the button enabled;
Update: 2019
The icon to enable the output looks like:
On MacOS it can be enabled with Command+F8.

- 11,709
- 9
- 66
- 82

- 183,384
- 11
- 179
- 318
-
2Your top screenshot is from version 2016, while I have version 2018.3 (built Nov 27, 2018) and I cannot see this option. In file window, I don't have option to enable output, in "Database Console" I don't have this option. And I have a official version, registered in company I work for. – Jakub P Aug 27 '19 at 06:29
Server output is client side functionality that not all clients support. SQL*Plus and SQL Developer do, but it's not a given that any other client will.
The SQL*Plus client command set serveroutput on
essentially calls the DBMS_OUTPUT.enable()
stored procedure on your behalf. Additionally it signals to the client that is should inspect the DBMS_OUTPUT.get_lines()
procedure for cached output after each code block is executed.
If DataGrip doesn't do this already, you may be able to manually code the calls to DBMS_OUTPUT.enable()
and DBMS_OUTPUT.get_lines()
as needed.

- 6,379
- 1
- 18
- 23
-
I had to call DBMS_OUTPUT.enable(); (at least for once) explicitly between BEGIN and END – Mustafa Güven Oct 11 '21 at 09:07
For version 2021.1
right click on the console list in the service window and there should be a enable DBMS_OUTPUT
when you right click.