Operating System - HP-UX
1748051 Members
5028 Online
108758 Solutions
New Discussion юеВ

SQL*Loader-523: error -2 writing to file (STDERR)

 

SQL*Loader-523: error -2 writing to file (STDERR)

I need some help here. I have been contacted by the DBA and one of the users about the following problem. I checked call permission. Any advice would help.

When I run our Oracle loader program on dfin3, it runs thru a list of tables to load. If an input data file is not there and sql loader tries to run, I get the following log file with control file listing and the following error message:

WORK_ORDER_TYPE_CD 126:126 1 CHARACTER
WK_JRNL_KEY 127:127 1 CHARACTER
TCAT_SEL_KEY 128:129 2 CHARACTER
IFMS_SEL_KEY 130:130 1 CHARACTER
SDATARCD 1:130 130 CHARACTER

SQL*Loader-500: Unable to open file (/home/bbmsprod/bbms/datafiles/ftp/BBMS.MJWSNLDTL.DATA)
HP-UX Error: 2: No such file or directory

which makes sense to me as the mjwsnl data file is a monthly file and not present every week.


However, when I run the same program on pfin3, it does something different. I get the control file listing in the log file as above, but I get a different error:

WORK_ORDER_TYPE_CD 126:126 1 CHARACTER
WK_JRNL_KEY 127:127 1 CHARACTER
TCAT_SEL_KEY 128:129 2 CHARACTER
IFMS_SEL_KEY 130:130 1 CHARACTER
SDATARCD 1:130 130 CHARACTER

SQL*Loader-523: error -2 writing to file (STDERR)

3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: SQL*Loader-523: error -2 writing to file (STDERR)

Hi,

I assume you SQL*Loader script redirects stderr. What are the permissions on the file/directory. Is that filesystem full?

Clay
If it ain't broke, I can fix that.
Alexander M. Ermes
Honored Contributor

Re: SQL*Loader-523: error -2 writing to file (STDERR)

Hi there.
Here the text from the documentation :

SQL*Loader-00523 error number writing to file (string)

Cause: Could not write to specified file.

Action: Check the following:

the file resides in the specified location

you have write privileges on the file

you have sufficient disk space

you have not exceeded your disk quota

If all of these conditions are satisfied, then retry the operation.

Your loader wants to write a log or bad or discard file and cannot because of reasons mentioned above.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"

Re: SQL*Loader-523: error -2 writing to file (STDERR)

Thanks for your help.

Well the customer has said when he runs this job interactive not in batch it work fine. That is because it is writing standard error to his display. When running in batch mode I think it is trying to write to display. I have ask him to look at his code and scripts and add a redirection that points to standard error { >/xxx/output 2>&1} to see what happens. I'm also trying to find out where is this trying to write this STDERR to.

Anyways I think we are on the right track. I'll update with the solution and point soon.