Bus error(coredump) while running SQL*Loader in HP Unix 11

Hi All,

I am getting coredump error, when I try to execute Oracle SQLLoader from Shell script in Unix environment. But SQLLoader from local machine runs fine with same database.

SQL*Loader: Release 9.2.0.6.0 - Production on Mon Apr 23 05:23:47 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

sql.ksh[3]: 8438 Bus error(coredump)

Can you please guide me to resolve this error.

Thank you very much.
Regards,
Srinivas

If you are moving the script from Windows to Unix and trying it out, it could be a issue with special character - '^M' at the end of each line. Try ftp'ing the file as ascii and make sure there are no special characters at the end of each line(search forums for help on this). Also, if you could post a snapshot of the script that you are using, it would help.

Hi,

control file is
OPTIONS ( ERRORS=99999999)
LOAD DATA
INFILE=${/usr/sap/A2/xchange/dataload/bwload/inbound/OOCQFULL.DAT}
INTO TABLE "OOCQ03DY_TMP"
INSERT
(PRODHNO POSITION(01:18),
PAPRODHNO POSITION(19:36),
PHITEMNM POSITION(37:54),
PHITEMDS POSITION(55:94),
PHITCDNM POSITION(95:134),
PDHRLVCD POSITION(135:135),
PRODTY POSITION(136:137),
PDRLFL POSITION(138:138),
PDFCFL POSITION(139:139),
PDCPFL POSITION(140:140),
MKSRSQNO POSITION(141:153),
PDPBFL POSITION(154:154),
PHIMPCDS POSITION(155:224),
PDDAUDFL POSITION(225:225),
PHODMCD POSITION(226:228),
PRODCGGP POSITION(229:248),
PNFMTCD POSITION(249:250)
)

ksh file is

#!/bin/sh
. /home/bwload/.profile
$ORACLE_HOME/bin/sqlldr as/as2005@AMERICAS.NET control=gpg.ctl
log=gpg.log
retcode=`echo $?`
case "$retcode" in
0) echo "SQLLoader execution successful" ;;
1) echo "SQL
Loader execution exited with EX_FAIL, see logfile" ;;
2) echo "SQLLoader exectuion exited with EX_WARN, see logfile" ;;
3) echo "SQL
Loader execution encountered a fatal error" ;;
*) echo "unknown return code";;
esac

and the error i am getting is
ksh sql.ksh

SQL*Loader: Release 9.2.0.6.0 - Production on Mon Apr 23 07:17:58 2007

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

sql.ksh[3]: 4555 Bus error(coredump)
SQL*Loader execution successful
logout

Regards,
Srinivas

First, This assignment is wrong in the control file-

Since you are specifying the full path and not using a variable, there is no need for the ${..}. Change to

Then, in the script, you have the set of statements like this -

$ORACLE_HOME/bin/sqlldr as/as2005@AMERICAS.NET control=gpg.ctl
log=gpg.log
retcode=`echo $?`

Here you are taking return code of the logfile name assignment that you do. So, it should always return 0. Move the logfile assignment to the top and have the return code check immediately after the sql*loader call.

log=gpg.log
$ORACLE_HOME/bin/sqlldr as/as2005@AMERICAS.NET control=gpg.ctl
retcode=`echo $?`

Also, check for any special chars in your control file.