bungeejumper has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting this warning while executing a sqlloader script. "Oracle::Sqlldr::parameterfile: this method is not yet supported at sqlldr.pl line 64 ". When i execute it manually it's loading data into the table, but when i place this in crontab its' not inserting data as there is excption and that's how something screwed up durng execution from crontab. This is line#64 code. my $sqlldr = Oracle::Sqlldr->new(-db=>'ywedev'); Any idea what to do?

Replies are listed 'Best First'.
Re: sqlldr invocation issue
by jethro (Monsignor) on Jun 08, 2009 at 13:09 UTC
    Errors in crontab usually happen because the commands there are executed with a very spartanic environment. Put the command 'printenv > /tmp/xyz476' into the crontab (so that it gets executed 2 minutes in the future). You should get the environment used in crontab in the file /tmp/xyz476. Compare that with the output of 'printenv' on the command line. One of the things that changed is responsible for the failure of your script

    To add the missing environment variable you might just put the definition of it in front of your script (if you use bash or something similar). Example:

    1 2 * * * PATH=${PATH}:/usr/local/bin sqlloader

    would add /usr/local/bin to the path before executing sqlloader

Re: sqlldr invocation issue
by Anonymous Monk on Jun 08, 2009 at 13:05 UTC
    • Stop trying to use unsupported features
    • Implement that missing feature
    http://cpansearch.perl.org/src/MCGREGOR/Oracle-Sqlldr-0.13/Sqlldr/Sqlldr.pm
    =item parameterfile set the parameterfile to load. C<$sqlldr->parameterfile(-file=>'parameterfile.dat');> =cut sub parameterfile { my ($self, %params) = @_; ## TODO support this method! carp __PACKAGE__."::parameterfile: this method is not yet supporte +d"; return 0; if ($params{-file}) { $self->{PARAMETERFILE} = $params{-file}; } return $self->{PARAMETERFILE}; }