Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Running perl DBI in PLSQL on UNIX

Re: Running perl DBI in PLSQL on UNIX

From: <katiesoh_at_gmail.com>
Date: 4 Apr 2005 05:32:53 -0700
Message-ID: <1112617972.997576.20730@o13g2000cwo.googlegroups.com>


It does not appear to be related to DBI at least for now. I removed all the existing perl code except the open(). Running this on Solaris 8, DB:9203.

$> more /tmp/tmp.pl

#!/usr/bin/perl
use strict;
use warnings;

$| = 1;
print "Before STDOUT...\n\n";
open (STDOUT,"|tee /tmp/out.log");
print "Before STDERR...\n\n";
open (STDERR,">&STDOUT");
print "Before close STDERR...\n\n";
close (STDERR);
print "End of Prog...\n\n";

I then execute my procedure,

SQL> variable a number;
SQL> set serveroutput on
SQL> exec dbms_java.set_output(100000);
SQL> exec :a:=execcmd('/tmp/tmp.pl');

Before STDOUT...

PL/SQL procedure successfully completed.

It appears that the program just terminated at 'Before STDOUT'. The file /tmp/out.log was not created.

If I run /tmp/tmp.pl on the command line, it works fine and the file /tmp/out.log is created.
$> /tmp/tmp.pl

Before STDOUT...

Before STDERR...

Before close STDERR...

End of Prog...

What am I missing?

Thanks.

kat Received on Mon Apr 04 2005 - 07:32:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US