menzies26 has asked for the wisdom of the Perl Monks concerning the following question:
I have a very simple Oracle PL/SQL procedure that contains some dbms_output statements.
#enable output $dbh->func( 1000000, 'dbms_output_enable' ); eval { my $func = $dbh->prepare( q {BEGIN SMTEST;END;}); $func->execute; $dbh->commit; $dbh->finish; }; #retrieve output my @text = $dbh->func( 'dbms_output_get' ); foreach (@text) { print "$_\n"; } $dbh->disconnect;
Output is
$ perl testsm.pl
SMTEST 1
SMTEST 2
SMTEST 3
$
If the procedure has a parameter passed then the dbms_output no longer appears
enable output $dbh->func( 1000000, 'dbms_output_enable' ); my $rv; eval { my $func = $dbh->prepare( q {BEGIN SMTEST($rv);END;}); $func->bind_param(":parameter1", \$rv, '0'); $func->execute; $dbh->commit; $dbh->finish; }; #retrieve output my @text = $dbh->func( 'dbms_output_get' ); foreach (@text) { print "$_\n"; } $dbh->disconnect;
Output is
rbmvm@tlnt smenzies$ perl testsm.pl
Any ideas or soltions most welcome
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dbms_output not working when calling pl/sql procedure with a parameter
by Fletch (Bishop) on Jul 24, 2019 at 16:25 UTC | |
|
Re: dbms_output not working when calling pl/sql procedure with a parameter
by soonix (Chancellor) on Jul 25, 2019 at 06:27 UTC | |
|
Re: dbms_output not working when calling pl/sql procedure with a parameter
by holli (Abbot) on Jul 24, 2019 at 15:34 UTC |