Unix OS
--
Questions
--
Followers
Top Experts
This is my first time creating a cron job so please forgive my ignorance...
I would like to know the basic steps in completing this. I am receiving errors and not sure what I am doing wrong.
I am using a tool called Webmin. There is an interface that allows you to create a scheduled cron job.
My script needs to launch sqlldr to import data into an oracle table..
In the webmin tool, in the command box I have this line of code:
/u01/app/oracle/product/9.
Inside the billing_data_load, I have this code:
#! /bin/sh
ORACLE_SID=NAME
export ORACLE_SID
cd $ORACLE_HOME
./oraprofile
/u01/app/oracle/product/9.
I read somewhere that I needed to put the below code in a file called oraprofile:
#!/bin/sh
ORACLE_BASE=/u01/app/oracl
ORACLE_HOME=$ORACLE_BASE/p
ORACLE_SID=NAME
PATH=$PATH:$ORACLE_HOME/bi
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
Can anyone tell me if I am missing something or if I am on the right track.. The first error message I got had something to do with Message Not Found 2100....
Thank you
Michele
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ie.
type crontab -l
what is the exact message you get if you run the command
i.e run
/u01/app/oracle/product/9.
do you get the error now, or is it only when you run it from cron.
what is the exact error?
Is there anything in /u01/app/oracle/product/9.
Thanks for your response...
1) When I type crontab -l I get this:
40 15 * * 1-5 /u01/app/oracle/product/9.
2) When I sign in as root and run u01/app/oracle/product/9.0
3) The exact error is:SQL*Loader-704: Internal error: ulconnect: OCIInitialize [1804]
But I wasn't sure if this was a result of me not setting up the cron successfully. According to this error, I should call oracle support services but I guess I wanted to make sure that I set up everything correctly first






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
i.e.
40 15 * * 1-5 /u01/app/oracle/product/9.
This redirects standard error to the same place as standard out  - /dev/null, which means ignore it.
If it is not working it will be to do with a variable / path not set in the cron shell as kencunningham as said. Â It might be worth removing the ./oraprofile line and replacing it with the code:
ORACLE_BASE=/u01/app/oracl
ORACLE_HOME=$ORACLE_BASE/p
ORACLE_SID=NAME
PATH=$PATH:$ORACLE_HOME/bi
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
su - oracle /u01/app/oracle/product/9.
The "su -" will read the environment and make it available for the process.
I first have to say thank you so much for your detailed response. Not only was I able to resolve my issue but I now have a full understanding of how things work ,what to look for in debugging an issue and how to set things up.
I wasn't even aware of the oraenv file until I read your response.
I appreciated your mini lesson and are very grateful for the time you taken to explain it to me..
Also, many thanks to everyone for responding to my question....
Michele

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Unix OS
--
Questions
--
Followers
Top Experts
Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.