![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Install Guide: Oracle Database 11g Release 1 on Oracle Enterprise Linux 5 | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 05:10 AM |
| Integrating the Oracle Designer Legacy Table API with Oracle JDeveloper 11g ADF Busin | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 05:10 AM |
| Oracle and Symantec Certify Veritas Data Center Solutions on Oracle - WebWire (press | iBot | UNIX and Linux RSS News | 0 | 07-17-2007 08:30 AM |
| Having A Problem Connecting to Oracle Using Cron | goodmis | UNIX for Dummies Questions & Answers | 1 | 03-20-2007 04:12 PM |
| Shell + Oracle + Cron job | pathanjalireddy | Shell Programming and Scripting | 1 | 04-07-2005 02:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
using Oracle with Cron
Greetings,
I am doing some work on using Oracle with Cron and was wondering if you could help. I am relatively new both to Oracle and Unix. Please be patient :-) Here is what I am trying to do: I wish to know the contents of employees table in scott account everyday at 11 am, save a copy at my directory /home/alikun and send another to a user at email address removed by moderator This is what I did but couldn’t get results: 1. Created a vi script, scottcron.sql, containing the query: spool /home/alikun select * from employees; exit; 2. wrote a separate script, scottshell, to execute the script above: /home/alikun/Sqlplus scott/tiger @/home/alikun/scottrcron.sql 3. Finally, the cron script, mycron, as follows: 00 11 * * * “/home/alikun/scottshel” | mail –s “hi zalikun, this is your file” email address removed by moderator crontab mycron Please note: I did a bit of research on this and it seems that I would need two other things: a) ORACLE_HOME= b) B) ORACLE_SID= How can I find the path for ORACLE_HOME in a), and the SID for b) on my unix system?. Thanks all so very much, Alikun Last edited by blowtorch; 03-22-2007 at 02:10 AM.. |
|
||||
|
Blowtorch, thanks a lot for input; indeed oratab turned out to be under /etc. Yes, i knew the oracle sid was enterprise edition; was, however, unsure of how to reference it - seems to be EE.
No, the email address was not a real one, but do appreciate your sensitivity to privacy issues ;-) |
|
||||
|
Alikun
You also need to set spool off $ sql> spool off $ cat scottcron.sql spool /home/alikun select * from employees; spool off exit; Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|