The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Not able to insert data megh SUN Solaris 1 12-05-2008 12:20 AM
unable Insert data from .dat file to .xls can anybody help me kreddy2003 Shell Programming and Scripting 1 05-28-2008 06:33 AM
help me to to insert data babu@shell UNIX for Dummies Questions & Answers 10 10-24-2006 03:25 AM
How to insert new line in the data file using the script Sona UNIX for Dummies Questions & Answers 2 08-22-2006 02:17 AM
sed, insert data from a file to another? ctcuser Shell Programming and Scripting 4 05-03-2005 02:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-29-2008
megh megh is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 38
Not able to insert data through crontab

Hi All,
I have a script while manually running it creates a file dbcheck.log and check the value in it.But while same script ran through cron the script is creating a 0 byte file but not able to insert data.

Here is my code:

db_check=/home/dmidev/appl/scripts/dbcheck.log
for i in 1 2 3 4 5 6 7 8 9 10
do
#Check_RibDB_Up
`sqlplus -s user/passwd@ora_sid << EOF > $db_check

$SQL_SETS
$SQL_CNT
EOF`
egrep 'ERROR | ORA' $db_check #case $TR in
if(($?==0))
then
echo "$i time and Data Base is down and script is going for asleep for 1 hour" >> $oraerr
mail_send
sleep 3600
continue
else
echo "Data base is up at $i th check and weekly.ksh starts executing" >> $oraerr
/home/dmidev/appl/scripts/megh1.ksh
exit
fi
done



Regards
Megh
  #2 (permalink)  
Old 12-29-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
Does the user that the cronjob runs under the same as "dmidev"? Is the PATH environment variable at login-time set properly to run sqlplus? Just in case, copy the PATH variable into the script:
Code:
echo PATH=$PATH
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
Copy the output and insert at the top of the script.
  #3 (permalink)  
Old 12-29-2008
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,957
Check for

ORACLE_HOME
ORACLE_SID

as well
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 07:42 PM.


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