The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
prob with ssh abzi Shell Programming and Scripting 1 01-23-2006 11:43 PM
cronjob prob rahul123_libra UNIX for Dummies Questions & Answers 3 01-11-2006 04:18 AM
memory prob vjm AIX 1 09-27-2005 06:38 AM
TAR prob - Guru's please help budrito UNIX for Advanced & Expert Users 3 01-20-2005 10:15 PM
prob dreams5617 Shell Programming and Scripting 1 12-04-2004 11:31 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-22-2007
Registered User
 

Join Date: Jun 2007
Posts: 9
crontab-db connection prob

I have a shell script which contain database connection and runs a big query.
When I run the script on command promp, the desired output is getting spooled taking some time.
But when I setup a cronjob for that script, the spool file is not getting generated.

What could be the problem?

Thanks in advance
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-22-2007
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,491
Almost always, the first and last place to look for why a cron job fails is environment variables. The user is not logging in and executing .profile or .bashrc

Check that out.
Reply With Quote
  #3 (permalink)  
Old 08-24-2007
Registered User
 

Join Date: Jun 2007
Posts: 9
After my investingation, I observed that the cronjob is not failing, but the database connection inside the script is failing.
Any idea what could be the problem?

Last edited by nskworld; 08-25-2007 at 02:38 AM.
Reply With Quote
  #4 (permalink)  
Old 08-26-2007
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,473
you have to give us more details to help you.

What is the db that you are trying to connect to ?

Connection could be failing due to 'n' number of reasons :
>>database bounce, even after receiving a proper connection id
>>apart from password authentication, validation with the name of the script that is trying to establish connection to the database

what is the return status of the command that fails establishing connection with the db ?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0