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!

execute immediate 'execute dbms_scheduler.disable

0dafeelinJan 14 2014 — edited Jan 14 2014

1.   I am getting oracle error ORA-00900 ..not sure of the syntax for running executing the dbms_scheduler procedures inside pl/sql

2.   To troubleshoot syntax, am I able to use DBMS_OUTPUT to see what the execute immediate will see?

BEGIN

  FOR cur_rec IN (SELECT owner,

                        job_name

                FROM

                        dba_scheduler_jobs

                where

                        owner='xxxxxxx' and state='SCHEDULED'

                  )

  LOOP

    BEGIN

        -- DBMS_OUTPUT.put_line('exec dbms_scheduler.disable('''||cur_rec.owner||'.'||cur_rec.job_name||''')');

        EXECUTE IMMEDIATE 'execute dbms_scheduler.disable('''||cur_rec.owner||'.'||cur_rec.job_name||''')';

    END;

  END LOOP;

END;

/

BEGIN

*

ERROR at line 1:

ORA-00900: invalid SQL statement

ORA-06512: at line 12

This post has been answered by spajdy on Jan 14 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2014
Added on Jan 14 2014
2 comments
3,540 views