Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBA_SCHEDULER_JOBS used in a cursor error

Aaron HughesJun 25 2015 — edited Jun 25 2015

10g - database version

Am moving dbms_job to dbms_scheduler and part of my program uses a cursor to see if that job already exists (then doesnt create it, if it is there)

CURSOR c1 (cv_job_name dbms_scheduler_jobs.job_name%TYPE)

   select 1

   from dbms_scheduler_jobs

   where schedule_type = 'ONCE'

   and state = 'SCHEDULED'

   and job_name = cv_job_name;

When I go to compile this package i get a error - PL/SQL: SQL Statement ignored

                                                                              PL/SQL: ORA-00942: table or view does not exist

I am logged into the same schema as the package is on, on SQL Developer and can execute the select statement from there.

The schema also has select privs to the dbms_scheduler_jobs view aswell.

Any ideas why I can't do this select in a cursor ?

This post has been answered by GregV on Jun 25 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2015
Added on Jun 25 2015
2 comments
790 views