I'm trying to use PL/SQL block in zabbix (ODBC connection), but I can't return the value. I need to use PL/SQL block because I need to use the command pragma exception_init
For example, to print the value of the following code:
declare begin dbms_output.put_line('x'); end;
I need to use set serverouput on in SQLPLUS.
But ODBC and Zabbix does not understand the command set serverouput on. How to return the value using ODBC?
begin :variable := 'x'; end;but I have no idea what Zabbix is or whether it would accept that sort of construct. It is conceivable that you want to run a bunch ofdbms_output.get_linecalls after the script runs to fetch data from thedbms_outputbuffer. Neither of those would be particularly idiomatic approaches, though, so my guess is you're approaching your problem from the wrong angle