in reply to Re^2: Perl script not running correct as a cron
in thread Perl script not running correct as a cron

Have you determined where it goes wrong? Is Oracle returning "weird" values? Or is MySQL inserting "weird" values? What happens if you trace the DBI?
  • Comment on Re^3: Perl script not running correct as a cron

Replies are listed 'Best First'.
Re^4: Perl script not running correct as a cron
by lars_4 (Initiate) on Jun 05, 2009 at 09:50 UTC
    I have run this script in cron and outputted the data to a text file. Oracle is outputting the data correctly (print $status, $well) And i did a print $_1 on the Mysql sub and that also outputs it correct. I have no idea where it is going wrong..
      Any warnings/errors from MySQL? I see you don't check return values or check for errors. I always wrap my database actions in an eval block, and set RaiseError to 1 and AutoCommit to 0, with a commit at the end (and a roll back if the eval fails).

      I also note that for each row returned from Oracle you start a new MySQL connection. While this has nothing to do with your problem, it's quite costly (setting up a database connection is relatively expensive) if Oracle returns many rows.