List Info

Thread: Still having problems running Perl scripts from Oracle




Still having problems running Perl scripts from Oracle
country flaguser name
United States
2008-03-25 09:17:47

I've sent this out before and had some good ideas that helped but still having problems. When I run my Perl script on command line it work s fine, but when I run it out of the Oracle scheduler the process hangs.
First Oracle doesn't make a good shell to run out of. It has very few environment variable to pass to Perl. So I ran Perl manually and dumped the %ENV hash to a file and now I used that file to source in the environment variables to the %ENV hash each time I run the script. Plus just to make sure I give absolute path names to all UNIX commands I run in Perl.
Oracle doesn't like any redirects of any kind or data feed back through a pipe to Perl. So the Perl program I run on the remote UNIX server, I have it put all its output to a file with the idea of copy the file back when it's done. The problem is that the remote script works and makes the file, but it never terminates. So the next command to copy back the file never happens. The Oracle scheduler times out after awhile and I have to kill the processes by hand.

qx(/usr/bin/ssh lms$host $lic_quorum_cmd); # Hangs on this line, doesn't terminate
qx(/usr/bin/scp ms$host:/tmp/<file name> /tmp); # never gets to this line

I'm looking into getting a Perl SSH module put on system but I don't have control of this process. I can only request that it be installed.

Does anyone else have any other ideas to get this to work?
-----
Don Dukelow
HP License Team
Hewlett-Packard Company
Tel: 810-728-3388
e-mail: dukelow%40hp.com">dukelowhp.com

__._,_.___
.

__,_._,___
Re: Still having problems running Perl scripts from Oracle
country flaguser name
United States
2008-03-25 15:39:11

> qx(/usr/bin/ssh lms$host $lic_quorum_cmd); #
> Hangs on this line, doesn't terminate
> qx(/usr/bin/scp ms$host:/tmp/<file name> /tmp);
&gt; # never gets to this line

try this:

qx(/usr/bin/ssh -f lms$host "$lic_quorum_cmd &";);
sleep 10; # length of time it takes to create file
qx(/usr/bin/scp ms$host:/tmp/<file name> /tmp);

+Dave

--- On Tue, 3/25/08, Dukelow, Don < dukelow%40hp.com">dukelowhp.com>; wrote:

> From: Dukelow, Don < dukelow%40hp.com">dukelowhp.com>;
> Subject: [PBML] Still having problems running Perl scripts from Oracle
&gt; To: " perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com&quot; < perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com>;
> Date: Tuesday, March 25, 2008, 10:17 AM
> I've sent this out before and had some good ideas that
>; helped but still having problems. When I run my Perl
>; script on command line it work s fine, but when I run it
> out of the Oracle scheduler the process hangs.
&gt; First Oracle doesn't make a good shell to run out
> of. It has very few environment variable to pass to Perl.
> So I ran Perl manually and dumped the %ENV hash to a file
>; and now I used that file to source in the environment
> variables to the %ENV hash each time I run the script.
> Plus just to make sure I give absolute path names to all
> UNIX commands I run in Perl.
&gt; Oracle doesn't like any redirects of any kind or
> data feed back through a pipe to Perl. So the Perl program
> I run on the remote UNIX server, I have it put all its
> output to a file with the idea of copy the file back when
>; it's done. The problem is that the remote script works
&gt; and makes the file, but it never terminates. So the next
>; command to copy back the file never happens. The Oracle
&gt; scheduler times out after awhile and I have to kill the
> processes by hand.
&gt;
>
> qx(/usr/bin/ssh lms$host $lic_quorum_cmd); #
> Hangs on this line, doesn't terminate
> qx(/usr/bin/scp ms$host:/tmp/<file name> /tmp);
&gt; # never gets to this line
>;
> I'm looking into getting a Perl SSH module put on
> system but I don't have control of this process. I can
> only request that it be installed.
>
> Does anyone else have any other ideas to get this to
> work?
&gt; -----
&gt; Don Dukelow
> HP License Team
>; Hewlett-Packard Company
> Tel: 810-728-3388
> e-mail: dukelow%40hp.com">dukelowhp.com
>
> ------------------------------------
&gt;
> Unsubscribing info is here:
&gt; http://help.yahoo.com/help/us/groups/groups-32.htmlYahoo!
> Groups Links
&gt;
>
>

__._,_.___
.

__,_._,___
Loading variables from a file.
country flaguser name
United States
2008-03-25 15:46:48

Hi.

Is there a way to place all of your variables in a file then load the
variables into your program from that file???

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )