Home » RDBMS Server » Server Utilities » Cron/SQL*Loader error
Cron/SQL*Loader error [message #69848] Wed, 13 March 2002 09:23 Go to next message
Dean Rush
Messages: 3
Registered: March 2002
Junior Member
Whenever I try to use SQL*Loader from a Unix shell script in cron I get the following error:

Message 1 not found; No message file for product=RDBMS, facility=ULMessage 925 n
ot found; No message file for product=RDBMS, facility=ULMessage 924 not found; N
o message file for product=RDBMS, facility=ULMessage 4008 not found; No message
file for product=RDBMS, facility=ULMessage 4009 not found; No message file for p
roduct=RDBMS, facility=ULMessage 4000 not found; No message file for product=RDB
MS, facility=ULMessage 4001 not found; No message file for product=RDBMS, facili
ty=UL

I can run the shell script from the command line but it will not work from cron. I suspect that it has something to do with setting up the environment, but setting the ORACLE_BIN, ORACLE_HOME, ORACLE_PATH, ORACLE_BASE and ORACLE_SID variables does not work.

What else can I do?

Thanks.
Re: Cron/SQL*Loader error [message #69849 is a reply to message #69848] Wed, 13 March 2002 09:47 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
Are you exporting them. I have an associated script for all my SIDs by SID name that I call for all my cron jobs. I use ksh. Here is the one for prod:

#!/bin/ksh
echo ""
## echo "USAGE: . prod"
echo ""

export ORACLE_SID="prod"
# get ORACLE_HOME from /var/opt/oracle/oratab
export ORACLE_HOME=`grep ^$ORACLE_SID: /var/opt/oracle/oratab | cut -d: -f2`
## export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS' # This fixes ORA-01861 when importing
export ORACLE_BASE="/oradb/kham/u1/app/oracle/product"
export LD_LIBRARY_PATH="$ORACLE_HOME/lib:/usr/lib"
export SHLIB_PATH="$ORACLE_HOME/lib"
export NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P1"
# export NLS_LANG="AMERICAN_AMERICA.US7ASCII"
export PATH=$ORACLE_HOME/bin:/usr/ccs/bin:/usr/sbin:$PATH
export TNS_ADMIN="/var/opt/oracle"
## export TNS_ADMIN="$ORACLE_HOME/network/admin"

echo "Be sure to check the ORA environment variables..."
echo "================================================="
echo ""
env &#124grep ORA
echo ""
# End

When I do an export in cron I call it like:

. /$HOME/prod
exp ...

This works great for me and I don't have to have all those environment variables in all my scripts. I believe this will work for you.
Re: Cron/SQL*Loader error [message #69851 is a reply to message #69848] Wed, 13 March 2002 11:27 Go to previous messageGo to next message
Grant
Messages: 578
Registered: January 2002
Senior Member
This error is almost always because the environment isn't set up correctly especially ORACLE_HOME. When you do a "cd $ORACLE_HOME" you get there right? Another option is to "relink utilities" and see if you get any errors. Does export/import work correctly?
Re: Cron/SQL*Loader error [message #69861 is a reply to message #69851] Thu, 14 March 2002 04:32 Go to previous messageGo to next message
Dean Rush
Messages: 3
Registered: March 2002
Junior Member
cd $ORACLE_HOME takes me there and export/import does work correctly.
Re: Cron/SQL*Loader error [message #69868 is a reply to message #69851] Thu, 14 March 2002 09:03 Go to previous message
Dean Rush
Messages: 3
Registered: March 2002
Junior Member
I finally got it to work. Of course it turned out to be 'pilot error'. I wasn't running the prod script properly - .prod instead of . prod (DOH!).

Thanks for the help.
Previous Topic: sql.bsq
Next Topic: Export than recreate table with new column and than importport
Goto Forum:
  


Current Time: Wed Apr 24 14:00:33 CDT 2024