When using a scheduler in production, the shell script called is spooling to a file. The file stops midline around 25Gb; it is not always stopping on the same record or point within the record, so it is not a data issue. Calling the shell script manually, the entire contents of the spool successfully (around 200Gb). Using the same scheduler job in QA, the entire contents of the spool successfully (around 150Gb).
In production, the scheduler calling the same shell script, with different paramters and extracting smaller dataset, spools successfully.
The output from the sqlplus session is logged in a log file. All of the records are logged (the 200Gb sized set). At the end of the log the following error appears:
SP2-0308: cannot close spool file
Here is the version of SQL*Plus (it is the same in QA and Production):
SQL*Plus: Release 10.2.0.3.0
The scheduler and the user when running the job manually is the same.
Any ideas are appreciated. Thanks.