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
passing parameter 4m shell script to a DB stored procedure hema2026 Shell Programming and Scripting 0 11-16-2007 06:55 AM
calling a PL/SQL stored procedure from KSH BlAhEr Shell Programming and Scripting 1 10-09-2007 05:18 AM
Calling an Oracle Stored Procedure from Unix shell script Leojhose Shell Programming and Scripting 2 08-06-2007 06:00 AM
Calling MYSQL Stored Procedure? kshelluser Shell Programming and Scripting 3 12-19-2006 09:59 PM
calling stored procedure from shell script. priyamurthy2005 Shell Programming and Scripting 2 04-21-2005 07:10 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 06-11-2007
dorisw dorisw is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 4
Calling stored procedure from shell script

HI,

I have a similar problem to thread 18264, only I couldn't get it to work.

calling stored procedure from shell script.

I have a stored procedure which is called by a shell script program. When I run the stored procedure alone or through the shell script, it works fine with output text file.

However, if the shell script is executed by a scheduled job (a remote user), the stored procedure will never get executed. The DBA checks permissions on all the related tables and permissions are properly given.

Can anyone tell me why the stored procedure is not working when called by a scheduled job? How to fix this problem?

Thanks in advance for your help!

Doris
  #2 (permalink)  
Old 06-11-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Typically these problems are cause by the environment being very minimal in cron jobs.

For example if you were using oracle, failing to initialize the environment variables used by Oracle such as ORACLE_HOME, ORACLE_SID, PATH and LD_LIBRARY_PATH will cause database code to fail.
  #3 (permalink)  
Old 06-11-2007
bdsffl bdsffl is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 28
Look in /var/mail under the owner of the cron job.
/var/mail/<owner>
It may be, as noted, an environmental setting which
could be a path issue. Normally you'll get an email
from cron if syslog.conf is configured to send users
messages about cron jobs. Typically if it's a path issue
you will see an error indicating a script or some command
was not found when you check the context of the email.
  #4 (permalink)  
Old 06-12-2007
dorisw dorisw is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 4
Thanks to Porter and bdsffl. I showed your suggestions to our DBA and unix admin, and finally got the environment variable resolved. A simple fix by our UA:

1) open up the .profile file
2) copy the line with environment setting (in our case: all_paths_list) to shell script which calls the stored procedure.
Sponsored Links
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 05:14 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