The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
cronjob inside the script namishtiwari Shell Programming and Scripting 3 02-04-2008 08:35 AM
How to run a script as different user inside cronjob in solaris. csg_user SUN Solaris 11 12-15-2007 06:49 PM
Shell script not running thru Cronjob gauravshrinivas Shell Programming and Scripting 8 11-03-2006 10:17 AM
Problem with cronjob... kswaraj Shell Programming and Scripting 1 07-14-2004 02:58 PM
ping cronjob problem TylerDurden Shell Programming and Scripting 1 08-06-2003 02:48 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2007
bucci bucci is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 81
help help cronjob problem with script

hi all,

have no experience with cronjob at solaris,
i have create script like below:

#!/bin/sh

DAY=`/export/home/oracle/bin/lastdate | nawk '{print $1}'`

/export/home/orahome/bin/sqlplus -s abc/abc<<eof
set heading off;
set linesize 100;
set feedback off;

spool /export/home/temip/$DAY.log

select ip,host_id from omc_ip ;

spool off;

EXIT;
eof

sed '/^$/d' /export/home/temip/$DAY.log > /export/home/temip/host$DAY
rm -rf /export/home/temip/$DAY.log

let's say the filename is "abc.sh"

the file i put in the oracle user environment but i have change the owner to user abc that i want to execute the file from cronjob.

the problem is the cronjob cannot running properly if i run manually from the abc user environment i got this error messages:

Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus

please advices

how to fix it?

thank you so much

Regards,

bucci
  #2 (permalink)  
Old 02-09-2007
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Bangalore
Posts: 219
It seems more like Oracle error try connecting to oracle manually.
  #3 (permalink)  
Old 02-09-2007
sb008 sb008 is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 384
Make sure the necessary Oracle environment variables are part of your script.

Variables like:
ORACLE_HOME
ORAENV
ORACLE_SID
LD_LIBRARY_PATH

Which ones needed in this particular case I cannot tell.
  #4 (permalink)  
Old 02-10-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,944
I believe the error is due to - unable to locate the message property file. As said by others it should most probably be solved by the ORACLE specific ENV variables.

If not you need to export to the env through the script that is run
  #5 (permalink)  
Old 02-10-2007
bucci bucci is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 81
hi sb008,

the script is running in other user environment lets say user "abc". i have try to put oracle variable but cannot run.

please advices

thank you

Regards,

bucci

Quote:
Originally Posted by sb008
Make sure the necessary Oracle environment variables are part of your script.

Variables like:
ORACLE_HOME
ORAENV
ORACLE_SID
LD_LIBRARY_PATH

Which ones needed in this particular case I cannot tell.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0