Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Running perl DBI in PLSQL on UNIX
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 DBAReceived on Sat Apr 02 2005 - 07:16:56 CST
![]() |
![]() |