Solved

Spooling stopping around 25G from scheduler; running process manually spools entire contents

Posted on 2008-10-09
2
612 Views
Last Modified: 2013-12-18
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.


0
Comment
Question by:HangingCurve
2 Comments
 
LVL 34

Expert Comment

by:johnsone
ID: 22679610
From the Oracle manual, here is the description of that error:

SP2-0308 Cannot close spool file

Cause: The file is currently being used.

Action: Release the file from the other process.


Is it possible the scheduled job kicks off twice, or kicks off a second time before the first one is finished?
0
 

Accepted Solution

by:
HangingCurve earned 0 total points
ID: 22686558
Thanks Sage, I was thinking the same thing...but upon further review...
Well, of course after submitting this, we had an epiphany at the end of the day yesterday.
We determined that the scheduler is running the script from another directory. We manually ran the script from that directory.  It turns out that from that directory it is spooling to file system that is different from where the shell scripts are.  That filesystem didn't have enough memory, so the spooling hit the limit and stopped.
The sys admin has increased the size and the spooling extracts all of the records successfully when running the script manually from the directory the scheduler is running from.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now