SQL scripts failing to Crontab

  • Thread starter Thread starter uv
  • Start date Start date

uv

uv

Soldato
Joined
16 May 2006
Posts
8,435
Location
Manchester
Howdy

We've got a billion Oracle PL/SQL scripts that run perfectly fine, all of which run automatically via Cron on RedHat5.

There's one damn script, which runs without error if I kick off the shell manually - the report completes, outputting all the data that it should do. Now, when I set this report to run via Cron, it fails with a numeric/value error (specifically, ORA-06502: PL/SQL: numeric or value error: host bind array too small).

This error is an easy peasy one to fix - or at least, it would be if the report kicked up this error when run manually, but it *only* fails with this error when kicked off by Crontab!

I'm perplexed - when I execute the shell that runs the SQL code, I'm using the same Oracle environment under the same Oracle user that Crontab uses, and this is only one report out of hundreds that's ever had this issue!




*EDIT*

All fixed. The Crontab was set to use the old Oracle 9i base, which only allows 255 characters using dbms_output.
Switched Cron to use the Oracle 10gR2 client, and the report outputs just fine.
 
Last edited:
Back
Top Bottom