Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Oracle on Unix/Linux >> error message : sqlplus: not found (using crontab)

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: error message : sqlplus: not found (using crontab)
 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

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi239
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software