FAQ
Fellow DBAs,

Database version: 11.1.0.7

I tried to create a scheduler job and I get an error that the job already
exists. When I query the dba_scheduler_jobs view I do not see that job. Am I
missing something here?

begin
dbms_scheduler.create_schedule(

schedule_name => 'STATS_COLLECTION',
repeat_interval => 'FREQ=daily;byhour=06;byminute=00;bysecond=00',
comments => 'Schedule to collect statistics');
DBMS_SCHEDULER.CREATE_JOB (

job_name => 'GATHER_STATS_JOB',
job_type => 'STORED_PROCEDURE',
job_action => 'DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC',

schedule_name => 'STATS_COLLECTION',
enabled => TRUE);
end;
/
2 3 4 5 6 7 8 9 10 11 12 13 begin
*
ERROR at line 1:

ORA-27477: "SYS.GATHER_STATS_JOB" already exists
ORA-06512: at "SYS.DBMS_ISCHED", line 99
ORA-06512: at "SYS.DBMS_SCHEDULER", line 355
ORA-06512: at line 6

DBA_SCHEDULER_JOBS:

select owner,job_name from dba_scheduler_jobs where owner='SYS' and
job_name='GATHER_STATS_JOB';
no rows selected

dba_scheduler_job_log:

select log_date,JOB_NAME, STATUS FROM dba_scheduler_job_log WHERE
JOB_NAME='GATHER_STATS_JOB' AND OWNER='SYS';

no rows selected

DBA_OBJECTS:

select object_name, object_type from dba_objects where owner='SYS' AND
OBJECT_NAME='GATHER_STATS_JOB';

OBJECT_NAME OBJECT_TYPE
-----------------------------------
-----------------------------
GATHER_STATS_JOB JOB

DBA_JOBS:

SELECT WHAT, LOG_USER FROM DBA_JOBS WHERE log_user='SYS';

WHAT LOG_USER
------------------------- ------------------------------

admin.clean_db_logons; SYS

Thanks
Deen

Search Discussions

  • Dd yakkali at Nov 19, 2010 at 6:16 pm
    paul,

    no luck

    select owner,job_name from dba_scheduler_jobs where
    job_name='GATHER_STATS_JOB';

    no rows selected
    On Fri, Nov 19, 2010 at 8:58 AM, wrote:

    Try querying without specifying the owner, just as a sanity check.

    select owner,job_name from dba_scheduler_jobs where
    job_name='GATHER_STATS_JOB';


    *Paul Baumgartel*
    UBS AG
    IB Accounting Solutions
    400 Atlantic Street
    Stamford, CT 06904

    203.719.4368

    paul.baumgartel_at_ubs.com
    www.ubs.com


    ------------------------------
    *From:* oracle-l-bounce_at_freelists.org [mailto:
    oracle-l-bounce@freelists.org] *On Behalf Of *dd yakkali
    *Sent:* Thursday, November 18, 2010 9:32 PM
    *To:* oracle-l@freelists.org
    *Subject:* Scheduler Job not listed in dba_scheduler_jobs

    Fellow DBAs,

    Database version: 11.1.0.7

    I tried to create a scheduler job and I get an error that the job already
    exists. When I query the dba_scheduler_jobs view I do not see that job. Am I
    missing something here?

    begin
    dbms_scheduler.create_schedule(
    schedule_name => 'STATS_COLLECTION',
    repeat_interval => 'FREQ=daily;byhour=06;byminute=00;bysecond=00',
    comments => 'Schedule to collect statistics');
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'GATHER_STATS_JOB',
    job_type => 'STORED_PROCEDURE',
    job_action => 'DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC',
    schedule_name => 'STATS_COLLECTION',
    enabled => TRUE);
    end;
    /
    2 3 4 5 6 7 8 9 10 11 12 13 begin
    *
    ERROR at line 1:
    ORA-27477: "SYS.GATHER_STATS_JOB" already exists
    ORA-06512: at "SYS.DBMS_ISCHED", line 99
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 355
    ORA-06512: at line 6

    DBA_SCHEDULER_JOBS:
    select owner,job_name from dba_scheduler_jobs where owner='SYS' and
    job_name='GATHER_STATS_JOB';
    no rows selected

    dba_scheduler_job_log:

    select log_date,JOB_NAME, STATUS FROM dba_scheduler_job_log WHERE
    JOB_NAME='GATHER_STATS_JOB' AND OWNER='SYS';
    no rows selected


    DBA_OBJECTS:
    select object_name, object_type from dba_objects where owner='SYS' AND
    OBJECT_NAME='GATHER_STATS_JOB';
    OBJECT_NAME OBJECT_TYPE
    -----------------------------------
    -----------------------------
    GATHER_STATS_JOB JOB

    DBA_JOBS:
    SELECT WHAT, LOG_USER FROM DBA_JOBS WHERE log_user='SYS';

    WHAT LOG_USER
    ------------------------- ------------------------------
    admin.clean_db_logons; SYS

    Thanks
    Deen



    Visit our website at http://www.ubs.com

    This message contains confidential information and is intended only
    for the individual named. If you are not the named addressee you
    should not disseminate, distribute or copy this e-mail. Please
    notify the sender immediately by e-mail if you have received this
    e-mail by mistake and delete this e-mail from your system.

    E-mails are not encrypted and cannot be guaranteed to be secure or
    error-free as information could be intercepted, corrupted, lost,
    destroyed, arrive late or incomplete, or contain viruses. The sender
    therefore does not accept liability for any errors or omissions in the
    contents of this message which arise as a result of e-mail transmission.
    If verification is required please request a hard-copy version. This
    message is provided for informational purposes and should not be
    construed as a solicitation or offer to buy or sell any securities
    or related financial instruments.


    UBS reserves the right to retain all messages. Messages are protected
    and accessed only in legally justified cases.
    --
    http://www.freelists.org/webpage/oracle-l

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedNov 19, '10 at 2:31a
activeNov 19, '10 at 6:16p
posts2
users1
websiteoracle.com

1 user in discussion

Dd yakkali: 2 posts

People

Translate

site design / logo © 2022 Grokbase