plsql output to STDOUT [message #672216] |
Mon, 08 October 2018 03:15 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
I got a cronjob, where a perl script is started. This script uses the DBI Modul to connect to the Oracle database. The essential part looks like
eval {
my $func = $dbora->prepare( q {
DECLARE
l_sql VARCHAR2(100) ;
BEGIN
-- here timestamp to stdout
MY_PACKAGE.PROCEDURE_1;
-- here timestamp to stdout
MY_PACKAGE.PROCEDURE_2;
-- here timestamp to stdout
MY_PACKAGE.PROCEDURE_3;
-- here timestamp to stdout
NULL;
END;
} );
$func->execute;
I wonder, if there is a way to print the timestamp to stdout, and perl receives this message and can process it.
I know, I could write the timestamp in a table and read with perl from that table, but I'm looking for a shorter "on the fly" method.
|
|
|
|
|
Re: plsql output to STDOUT [message #672255 is a reply to message #672247] |
Tue, 09 October 2018 01:35 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
@BlackSwan: As I told, I was curious, if there is a way to forward messages from within plsql to stdout.
Quote:What problem are you really trying to solve?
I like to time each procedure. I solved this now by running only one procedure in an eval-block, then take the timestamp with perl and go to the next eval-block.
|
|
|
|
|
|