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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 02 Apr 2005 15:16:56 +0200
Message-ID: <ol6t41pftfq187cb8kkmk7n3g2u185vi8j@4ax.com>


On 2 Apr 2005 05:07:39 -0800, katiesoh_at_gmail.com wrote:

>Hi,
>I'm having trouble executing my perl DBI program in PLSQL. The perl
>program connects to an Oracle 9203 database, does some DML and DDL and
>then writes the output to STDOUT and a file.
>
>I have the following java method that I call from my PLSQL.
>
>public class execperl{
> public static execperl(String paramfile){
> Process p = Runtime.getRuntime().exec("/tmp/myperlpgm " +
>paramfile);
> }
>}
>
>I did some troubleshooting by placing print statements at various lines
>in my code and the program always stop before the OPEN statement. If I
>comment the OPEN, it exits when I do a subroutine call.
>
>The java stored procedure works fine in PLSQL if I run simple command
>like /bin/ls or a simple perl script that does some printing to STDOUT.
>
>Are there any restriction/limitation with what I'm trying to
>accomplish?
>
>Thanks.
>
>kat

I'm not sure why you are using pl/sql to call java, to call perl/dbi. At the least the perl/dbi program is going to make a new separate connection to the database, and you have created yourself a resource hog, which will develop into a disaster when called by more than one instance of your pl/sql procedure.
Is there any pressing need you really can't do in pl/sql what you are trying to accomplish in Perl?

--
Sybrand Bakker, Senior Oracle DBA
Received on Sat Apr 02 2005 - 07:16:56 CST

Original text of this message

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