One Star

Show DBMS Output

I try to show Oracle DBMS output from a PLSQL block.
For example:
dbms_output.put_line('Hello World');
To show the output I must aktivate it with:
set serveroutput on;
I try to do it with a tSQLTemplate, but i get an error by executing "set serveroutput on;":
connecting to socket on port 3531
Exception in component tSQLTemplate_1
java.sql.BatchUpdateException: Fehler bei Stapelverarbeitung aufgetreten: ORA-00922: Fehlende oder ungültige Option
at oracle.jdbc.driver.OracleStatement.executeBatch(
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(
at core1.st_filiale_0_2.ST_Filiale.tSQLTemplate_1Process(
at core1.st_filiale_0_2.ST_Filiale.tOracleConnection_1Process(
at core1.st_filiale_0_2.ST_Filiale.runJobInTOS(
at core1.st_filiale_0_2.ST_Filiale.main(
If i execute the generated SQL from the debuger in the sqldeveloper it works fine.
Is there another way to give output ?
Thank You for your time!
Seventeen Stars

Re: Show DBMS Output

As long as I know you can only see the output in the Oracle sqlplus program. I suggest using your own procedure which writes the output + timestamp + user in your own table and you can access this table via jdbc.
You could try to use your own function to read the output but you have to call the function as much often you want to see the output, there is not trigger functionality for this. Here is a probably useful link:
One Star

Re: Show DBMS Output

Hello Jlolling,
thank You for your fast answer.
I would try it. If I would found another way I will post it here.