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: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Mon, 04 Apr 2005 14:26:49 GMT
Message-ID: <Xns962E4BC1A9406SunnySD@68.6.19.6>


katiesoh_at_gmail.com wrote in
news:1112617972.997576.20730_at_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
>

To where does STDOUT go, when being called from a Java procedure inside a databse?

Empirically it appears to me that nothing is associated with File #1. Received on Mon Apr 04 2005 - 09:26:49 CDT

Original text of this message

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