0

there is any 'execute settings' option in SQL developer?

I created a trigger with dbms_output.put_line (and 'set serveroutput on' as well) - and I experienced that SQL developer and SQLPlus worked differently:

  • the SQL developer: shows the message(s) 'ddl event' only after an exec(ute) command

  • SQLplus: the rows appears immediately

My guess is that the execute does not happen in SQL developer and so the buffer is not written out. How can I set it in SQL developer?

The example: a trigger shows the message 'ddl event' when a ddl event happens:

SQL developer:

set serveroutput on;

create or replace trigger logtrigger
    after ddl
    on database
begin
    dbms_output.put_line ('ddl event');
end; /

create table a (x number);
create table b (x number);
create table c (x number);

exec

SQL developer script output (the three messages ’ddl event’ appeared only after exec command)

Table A created.

Table B created.

Table C created.

Usage: EXEC[UTE] statement
ddl event
ddl event
ddl event

SQL Plus:

SQL> set serveroutput on;
SQL> create table e (x number);

ddl event

Table created.

SQL> create table f (x number);

ddl event

Table created.

Thank you d

diaphol
  • 117
  • 1
  • 9
  • what version are you running? with your code, i get the trigger output and then the object created feedback message for each table as they're created in sqldev 18.1 – thatjeffsmith Jun 15 '18 at 11:27
  • versions:Sql developer 18.1.0 SQL*Plus: Release 12.2.0.1.0 – diaphol Jun 16 '18 at 05:12
  • Yeah, here's what i see: ddl event Table TABLE1 created. ddl event Table TABLE2 created. ddl event Table TABLE3 created. – thatjeffsmith Jun 16 '18 at 12:01
  • also, is this a real trigger or just a test case? using DBMS_OUTPUT to log events will not be useful in most scenarios – thatjeffsmith Jun 16 '18 at 12:26
  • it's not a real trigger, it is just a question arose in my self-improvement so using dmbs_output is only feedback tool for me. I guess it should re-install the sql developer; thank you – diaphol Jun 17 '18 at 09:08

0 Answers0