How To Set Server Output On in DataGrip

二次信任 提交于 2019-12-12 07:33:22

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/41490968/how-to-set-server-output-on-in-datagrip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!