Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

sql script in an cron job script failing

sql script in an cron job script failing

sql script in an cron job script failing

thread1177-1774094: Getting PL/SQL: ORA-00942: table or view does not exist
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:
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.

RE: sql script in an cron job script failing

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?

RE: sql script in an cron job script failing

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?

RE: sql script in an cron job script failing

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.



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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close