How can I get rid of a DBMS_SCHEDULER.CREATE_JOB

Posted on 2012-09-04
Last Modified: 2012-09-05
I made a dbms scheduler.create job

                                       ,JOB_TYPE => 'STORED_PROCEDURE'
                                       ,JOB_ACTION => 'myschema....mystuff'
                                       ,START_DATE => SYSTIMESTAMP
                                       ,REPEAT_INTERVAL => 'FREQ=HOURLY; INTERVAL=1'
                                       ,COMMENTS => 'ORIGINALLY ONCE PER DAY BUT NOW I WANT IT EVERY HOUR'
                                       ,END_DATE => NULL);


Open in new window

 but I entered the wrong repeat_interval so when I went to reset my interval I got an error telling me that schedule already exists.

Do I drop the schedule and then re-create it(if so, how)?

Or do I need some sort of update statement?

Thanks a bunch
Question by:Mark_Co
    LVL 76

    Accepted Solution

    Probably the easiest is drop it with DBMS_SCHEDULER.DROP_JOB

    You can change values but I would just drop it and recreate it.
    LVL 37

    Assisted Solution

    by:Gerwin Jansen
    Hi, you should be able to remove it like this:


    Display it like this:

    SELECT * FROM dba_scheduler_jobs WHERE job_name = 'SCHEDULE';

    Disable it like this:
    (if you didn't already delete it)


    Author Comment

    k so here's a dumb question: Why are neither of these working? I get 'invalid SQL statement' for each. Forgive me if I'm doing silly things, i've just tried to read the documentation and do a similar thing but neither is working.

                                          JOB_NAME IN Varchar2
                                         ,JOB_TYPE IN VARCHAR2
                                         ,JOB_ACTION IN VARCHAR2
                                         ,START_DATE in TIMESTAMP
                                         ,REPEAT_INTERVAL IN INTERVAL
                                         ,COMMENTS  IN VARCHAR2
                                         ,END_DATE in NULL

    Open in new window

                                         ,JOB_TYPE => 'STORED_PROCEDURE'
                                         ,JOB_ACTION => 'blank'
                                         ,START_DATE => SYSTIMESTAMP
                                         ,REPEAT_INTERVAL => 'FREQ=DAILY; INTERVAL=1'
                                         ,COMMENTS => 'ONCE PER DAY'
                                         ,END_DATE => NULL);

    Open in new window


    Author Comment

    Got it

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Join & Write a Comment

    Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
    How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
    This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now