If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > running a sql file from cron tab;

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-30-04, 03:23
arunprasadlv arunprasadlv is offline
Registered User
 
Join Date: Mar 2004
Location: India
Posts: 41
running a sql file from cron tab;

Hi,

I want to run a sql query from a crontab.
I hav written a script which enters SQLPLUS , executes the query and directs the output to a flat file.

My problem is when Iam palcing the script in crontab it is throwing an error .But when executed in the prompt ,it is running.

pls give ur suggestions on that.
Reply With Quote
  #2 (permalink)  
Old 06-30-04, 05:37
iaguigon iaguigon is offline
Registered User
 
Join Date: May 2004
Location: Barcelona, Spain
Posts: 54
be sure of setting in the script any environment variable the script will need
when you are logged in, they get set in .bashrc, .profile ...
but cron does not read these files, so you have to include the definitions in your script

good luck
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On