| Geetha |
Posted: Apr 16, 2008 03:47:39 AM |
Total Post: 21
Joined: Mar, 2008
|
I've a UNIX script which connects Oracle and could receive the expected output when run manually. When I schedule the same using crontab, I could obtain the error message as follows,
/u/data/report/areport.ksh[26]: sqlplus: not found
Kindly help me to sort out this problem.
Thanks in advance!!!
Regards,
Geetha |
|
|
Murtuja |
| Posted: Apr 16, 2008 03:56:50 AM | |
|
Total Post: 814
Joined: Jan, 2006
|
Here No one is magician !!!
Without seeing your script how anyone can suggest you fix ??
|
|
|
|
|
Murtuja |
| Posted: Apr 16, 2008 04:03:04 AM | |
|
Total Post: 814
Joined: Jan, 2006
|
Hi,
Have you set ORACLE_HOME and ORACLE_SID in your script ?
|
|
|
|
|
Geetha |
| Posted: Apr 16, 2008 04:10:07 AM | |
|
Total Post: 21
Joined: Mar, 2008
|
Well... I know all humans are not magicians...
Anyhow thanks for your cooperation.
Let you find the script below:
#!/bin/ksh
#set -x
.config.properties
ORACLE_HOME=/dbms/app/oracle/product/10.1.0; export ORACLE_HOME
sqlplus -s $dbuser/$dbpasswd@$dbname > $etitle.$extname <<EOSQL
set linesize 240
set colsep ','
set pages 50000
set feedback off;
spool $title1$y.$extname
select * from emp;
exit
spool off
EOSQL
cron entry:
40 6 * * * /u/data/report/report.ksh
Hope this would help you to investigate more...
|
|
|
|
|
Geetha |
| Posted: Apr 16, 2008 04:13:39 AM | |
|
Total Post: 21
Joined: Mar, 2008
|
Do you mean ORACLE_SID to be the host name??? If not, can you please make me more clear?
|
|
|
|
|
Murtuja |
| Posted: Apr 16, 2008 05:03:48 AM | |
|
Total Post: 814
Joined: Jan, 2006
|
Replace line
sqlplus -s $dbuser/$dbpasswd@$dbname > $etitle.$extname <<EOSQL
with
$ORACLE_HOME/bin/sqlplus -s scott/tiger@SNOOK > $etitle.$extname <<EOSQL
|
|
|
|
|
Murtuja |
| Posted: Apr 16, 2008 05:04:53 AM | |
|
Total Post: 814
Joined: Jan, 2006
|
Ignore my last post
Replace line
sqlplus -s $dbuser/$dbpasswd@$dbname > $etitle.$extname <<EOSQL
with
$ORACLE_HOME/bin/sqlplus -s $dbuser/$dbpasswd@$dbname > $etitle.$extname <<EOSQL
|
|
|
|
|
Murtuja |
| Posted: Apr 16, 2008 07:06:49 AM | |
|
Total Post: 814
Joined: Jan, 2006
|
Hi,
Do you have any updates regarding this issue ?
|
|
|
|
|
Geetha |
| Posted: Apr 17, 2008 01:41:00 AM | |
|
Total Post: 21
Joined: Mar, 2008
|
Hi Murtuja,
Thanks for your valuable help. Ryte now I'm continuing on the same with your guidelines. Will get you back in case of any issues. Once again thanks for spending your time for me...
Thanks,
Geetha
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |