Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql script in an cron job script failing

Status
Not open for further replies.

annie1975

Programmer
Jul 22, 2003
4
IN
thread1177-1774094
Ghuys - I am having a cron job which was running successfully till July 23rd. Something happened, not known after which my scripts fails to create temp tables (there are multiple dependent temp table we create and drop in the script) in oracle DB while running through these cron jobs.
However, those sqls runs good if I manually run the script in the solaris command prompt or the shell.

err as:
AS_ON_DATE SMC STATUS PACK_NAME PACK_AMOUNT CURRENT_BAL
select as_on_date ||' '|| smc ||' '|| status ||' '|| name ||' '|| plan_amount ||' '|| current_bal from cron_react_hourly_g
*
ERROR at line 1:
ORA-00942: table or view does not exist


Some env problem and should be silly question

thanks for an insight.
DSP
 
Possibly a privilege error - is the job being run using the same login name as before?
If you run this interactively from an o/s session (instead of cron), do you get the same results?
 
Thanks Carp !
Yes, If I execute the script on OS / Solaris, all sqls succeeds here with correct results. I thought of this previlege aspect. but interestingly it was keep runing since last 5/6 yrs till June 23rd.

What previlege need to check?
 
You will need to provide SELECT privilege for the account that is running the script. You may also need to set up a synonym or alter the script to include the owning schema name.

Try
Code:
SELECT grantee FROM dba_tab_privs WHERE table_name = 'CRON_REACT_HOURLY_G';
If the account name that you expect turns up in this list, then you are either running the cron job with the wrong account or else there is a missing synonym.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top