DBMS_OUTPUT in SQL Developer

时间:2024-01-02 23:03:02

I fell sad for all the programmers(including) that has to SQL Developer as sql IDE. However, if you are going to use it, better get it well configured.

I didn't like this IDE, It is old class IDE that belongs to the 90s. PL/SQL developer is far better than it. I have to use it because my company didn't have any other licenced sql IDE for us.

Anyway, some may found it very confused that it didn't show DBMS_OUTPUT in the statement output below the worksheet where you wrote your sql.

Well, it has a separate dbms output view.

I need it to show in Statement Output like the PL/SQL developer way. So here is what I do

Open a new worksheet.

Code this line

SET SERVEROUTPUT ON

Save to ‘startup.sql’

Open Tools – Preferences

Go to the Database page

On the ‘Filename for connection startup script’ – point to the ‘startup.sql’ file you just created.

Restart SQL Developer.

Open a connection and run your code.

You’ll see your DBMS_OUTPUT code with no more work!