Oracle  Scheduled Job

I'm viewing a single scheduler job's data in system table. It has run about 7 times to date. Why do some records have a "Slave PID" number value listed and some don't? What does the "Slave PID" value mean when there is a value for it and when there isn't?

Duplicate post -- https://forums.oracle.com/forums/message.jspa?messageID=9844042

Similar Messages

  • Capture DDL for Oracle Scheduled Jobs and job from DBMA_JOBS

    I have trying at this for while and now I am stuck...so I need some help or advice.
    I am doing a DB migration and I need to capture the DDL for all Oracle Scheduled Jobs as well as DBMS_JOBS. Anyone have a good way?
    I took a datapump export last week. Can I run a impdp and capture the DDL for this VIA the sqlfile parameter? If so, how? What would be the script for it. Something like this maybe (par file)?
    directory=DP_IMPORT
    DUMPFILE=dump1.dmp
    SCHEMAS=A,B,C...X,Y,Z
    LOGFILE=JOBS.LOG
    EXCLUDE=TABLE,INDEX,CONSTRAINT
    PARALLEL=4
    INCLUDE=JOBS
    ????

    Hello,
    It's JOB, see following table for possible options , I recommend you to read throught this thoroughly before starting.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_metada.htm#BGBIEDIA
    Regards

  • Oracle schedule jobs

    Hi Gurus,
    I need to learn more about Oracle schedule jobs, how they are configured, how they are created/deleted/stopped/started etc. Do you have some articles/books etc.
    Also very importantly we are migrating from 9i to 11g. And we have some schedule jobs in 9i. When the DB is imported from 9i to 11g, what additional steps do I need to do to schedule them Ok in the new DB.
    Thanks
    Amitava.

    hi
      you can use dbms_job package to creating,deleting and stopping job  and please refer to below link
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_job.htm
    yasin

  • Oracle schedule jobs monitoring & restarting if necessary

    Hi Gurus,
    I need to monitor the schedule jobs.
    I can see them under Scheduler icon in SQL Developer.
    But I need to see them by executing sql so can get the states and all job details (cause I am guessing some jobs are not running properly).
    I tried as SYS or user the following views ALL_SCHEDULER_JOBS, ALL_SCHEDULER_SCHEDULES, ALL_SCHEDULER_PROGRAMS, ALL_SCHEDULER_JOB_CLASSES, ALL_JOBS; none worked.
    Also after I see their states, how can I restart some schedule jobs if they are not enabled or active.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Hi Gurus,
    I need to monitor the schedule jobs.
    I can see them under Scheduler icon in SQL Developer.
    But I need to see them by executing sql so can get the states and all job details (cause I am guessing some jobs are not running properly).
    I tried as SYS or user the following views ALL_SCHEDULER_JOBS, ALL_SCHEDULER_SCHEDULES, ALL_SCHEDULER_PROGRAMS, ALL_SCHEDULER_JOB_CLASSES, ALL_JOBS; none worked.
    Also after I see their states, how can I restart some schedule jobs if they are not enabled or active.
    Thanks
    Amitava.
    "none worked" is not a useful statement.
    I don't know what you have.
    I don't know what you do.
    I don't know what you see.
    It is really, Really, REALLY difficult to fix a problem that can not be seen.
    use COPY & PASTE so we can see what you do & how Oracle responds.
    what exactly do you expect/desire to see when the SQL works for you?

  • Email Notification - Oracle Scheduled job failed

    Hi,
    Am on 12.1.3
    DB 11.1.0.7.0
    RHEL - 5.6
    I have created a job as below:
    BEGIN
    sys.dbms_scheduler.create_job(
    job_name => '"DMIG"."INSERT_LATEST"',
    job_type => 'STORED_PROCEDURE',
    job_action => '"APPS"."XXINSERT"',
    start_date => systimestamp at time zone 'America/Chicago',
    job_class => '"DEFAULT_JOB_CLASS"',
    auto_drop => FALSE,
    enabled => TRUE);
    END;
    It was sucessfull ..
    Now my requirement is , i want to get a mail if this job failed ..
    Thanks

    Duplicate post -- https://forums.oracle.com/forums/message.jspa?messageID=9844042

  • Howto change NLS_ENV variables when creating Oracle Scheduler jobs

    Hello,
    i have installed EMGrid 10.2.0.3 x86_64 and 10.2.0.3 agent on other computer. With standard NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' settings.
    When I create DB job with EMGrid Oracle Sheduler interface, NLS_xx parameters are set as NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA'.
    How can I change the default settings to NLS_LANGUAGE='CZECH', NLS_TERRITORY='CZECH REPUBLIC' when creating DB jobs with EMGrid?
    Thanks for reply.
    Regards,
    Stanislav Studeny

    Hi,
    You need to call the create_job (or submit) procedure from a session which has the appropriate NLS settings set. I can think of two ways of doing this from EMGrid
    - create a stored procedure which takes in job parameters, does appropriate "alter session" statements and then calls create_job/subit with the passed in parameters. You can then call that stored procedure from EMGrid
    - create a job from EMGrid which as the action does the alter session statements and then creates the real job
    Hope this helps,
    Ravi.

  • How to create oracle scheduled job

    DECLARE
    jobno NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => jobno
    ,what => 'DEL_HIST_TABLE;'
    ,next_date => to_date('09/04/2009 18:23:00','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'null'
    ,no_parse => TRUE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(jobno));
    END;
    commit;
    i wrote the above job to run on specific time and date
    but i want to convert the same to run on
    every day @ 1:00 am using oracle 10g
    Edited by: [email protected] on May 17, 2009 11:39 PM

    Hi,
    You need to set the interval then:
    MHO%xe> select trunc(sysdate) + 1/24 + 1 from dual;
    TRUNC(SYSDATE)+1/24
    19-05-2009 01:00:00
    1 rij is geselecteerd.
    MHO%xe> DECLARE
      2  jobno NUMBER;
      3  BEGIN
      4  SYS.DBMS_JOB.SUBMIT
      5  ( job => jobno
      6  ,what => 'begin null; end;'
      7  ,next_date => to_date('09/04/2009 18:23:00','dd/mm/yyyy hh24:mi:ss')
      8  ,interval => 'trunc(sysdate) + 1/24 + 1'
      9  ,no_parse => TRUE
    10  );
    11  SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(jobno));
    12  END;
    13  /
    Job Number is: 21
    PL/SQL-procedure is geslaagd.
    Verstreken: 00:00:11.39
    MHO%xe> commit;
    Commit is voltooid.
    MHO%xe> select interval from user_jobs where job = 21;
    INTERVAL
    trunc(sysdate) + 1/24 + 1
    1 rij is geselecteerd.Edited by: hoek on May 18, 2009 8:49 AM added to example

  • Oracle scheduler jobs

    Hi,
    i have 11gR2 database. I have to create a job which should run for a period of two hours and have to stop it automatically .so please tell me how to create a job .

    HI,
    Sorry , I want to create a job that should be executed on daily basis for two hours and should be stopped automatically after two hours .
    I have created a job which can run for two hours for one day. if i stop that job . the state of job will changed to 'completed' state and will be dropped according AUTO_DROP option.
    now if i want to run a job for next day. how can i do it?

  • Oracle Schedule Jobs and Web Services

    Please, how can i write a DBMS_SCHEDULER that wil run onces a day, calling an oracle stored procedure (the procedure also calls an ASP.NET web service). Actually, i cant write PL/SQL too well. Thanx in advance

    Have a look here

  • Oracle Scheduling Sending Email Notifications of Job Errors

    Hi,
    We are Oracle E-Business Suite - 12.1.3 & DB 11gr1
    I want to send to configure - Oracle Scheduling Sending Email Notifications of Job Errors.
    I already created job.. how i can configure Email Notifications of Job Errors.
    Thanks
    KSV.DBA

    Duplicate posts?
    Email Notofication - scheduled job fails
    Email Notification - Oracle Scheduled job failed
    Scheduler - 11g
    Re: Create Job scheduler

  • How to drop all scheduled jobs

    Hi,
    in 8i, how to drop all oracle scheduled jobs ?
    Many thanks before.

    SELECT job FROM user_jobs;
    exec dbms_job.remove(23);
    To remove all jobs, you can write a pl/sql block to loop through all jobs and remove them.
    http://www.psoug.org/reference/dbms_job.html
    Aalap Sharma :)

  • Export scheduler job but chain step and chain rule failed with ORA-24150 ORA-06512 during executed sql script.

    Hi Folks,
    I used expdp utility to export all Oracle scheduler jobs and chains with below method, after that generate sql script by impdp, later on executing sql script encountered some errors.
    Only chain step and chain rule for executing script. Does anyone bright me some light? Thanks!
    My env: Oracle 11g + Oracle Linux 5.5
    My steps as below:
    1. export(expdp) oracle scheduler job(chain)
    2. generate sql script by impdp.
    3. remove orginal scheduler job(chain)
    4. execute sql script
    5. job with no chain well but job with chain failed
    [oracle@linux1 ~]$ expdp scott/tiger directory=db_dump_dir dumpfile=scott_job.dmp include=procobj:\" in \(select \
    > name from sys.obj$ where type\# in \(46,59,66,67,68,69,72,74,79\)\)\"  schemas=scott
    Export: Release 11.2.0.1.0 - Production on Tue Dec 3 17:42:31 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Starting "SCOTT"."SYS_EXPORT_SCHEMA_01":  scott/******** directory=db_dump_dir dumpfile=scott_job.dmp include=procobj:" in (select name from sys.obj$ where type# in (46,59,66,67,68,69,72,74,79))" schemas=scott
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 0 KB
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
    Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
      /u03/database/usbo/BNR/dump/scott_job.dmp
    Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at 17:42:54
    [oracle@linux1 ~]$ impdp scott/tiger sqlfile=scott_job.sql directory=db_dump_dir dumpfile=scott_job.dmp logfile=imp_scott_job.log
    Import: Release 11.2.0.1.0 - Production on Tue Dec 3 17:43:04 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    Master table "SCOTT"."SYS_SQL_FILE_FULL_01" successfully loaded/unloaded
    Starting "SCOTT"."SYS_SQL_FILE_FULL_01":  scott/******** sqlfile=scott_job.sql directory=db_dump_dir dumpfile=scott_job.dmp logfile=imp_scott_job.log
    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    Job "SCOTT"."SYS_SQL_FILE_FULL_01" successfully completed at 17:43:07
    [oracle@linux1 ~]$ more /u03/database/usbo/BNR/dump/scott_job.
    scott_job.dmp  scott_job.sql 
    [oracle@linux1 ~]$ more /u03/database/usbo/BNR/dump/scott_job.sql
    -- CONNECT SCOTT
    ALTER SESSION SET EVENTS '10150 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10904 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '25475 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10407 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '10851 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    ALTER SESSION SET EVENTS '22830 TRACE NAME CONTEXT FOREVER, LEVEL 192 ';
    -- new object type path: SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_1"','1=1',NULL, 'First link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_2"',':"CHAIN_STEP_1".COMPLETED = ''TRUE''',NULL, 'Second link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_3"',':"CHAIN_STEP_2".COMPLETED = ''TRUE''',NULL, 'Third link in the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule('"SCOTT"','"CHAIN_RULE_4"',':"CHAIN_STEP_3".COMPLETED = ''TRUE''',NULL, 'End of the chain.',0,NULL);
    END;
    COMMIT;
    END;
    BEGIN
    BEGIN
    dbms_rule_imp_obj.import_rule_set('"SCHED_RULESET$1"','"SCHED_EV_CTX$1"',NULL, 0);
    END;
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_1"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_1'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for first link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_3"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_3'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for last link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_program('"TEST_PROC_2"','PLSQL_BLOCK',
    'BEGIN
                             INSERT INTO tb_schduler (id, descr, cr_date)
                             VALUES (tb_schduler_seq.NEXTVAL, ''test_proc_2'', SYSDATE);
                             COMMIT;
                           END;'
    ,0, TRUE,
    'Program for second link in the chain.'
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
    , rule_set_name=>'"SCHED_RULESET$1"   '
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
    dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
    COMMIT;
    END;
    BEGIN
    dbms_scheduler.create_job('"TEST_CHAIN_1_JOB"',
    job_type=>'CHAIN', job_action=>
    'test_chain_1'
    , number_of_arguments=>0,
    start_date=>TO_TIMESTAMP_TZ('03-DEC-2013 05.38.56.718161000 PM +08:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'), repeat_interval=>
    'freq=minutely; interval=2'
    , end_date=>TO_TIMESTAMP_TZ('03-DEC-2013 06.08.56.000000000 PM +08:00','DD-MON-RRRR HH.MI.SSXFF AM TZR','NLS_DATE_LANGUAGE=english'),
    job_class=>'"DEFAULT_JOB_CLASS"', enabled=>FALSE, auto_drop=>TRUE,comments=>
    NULL
    COMMIT;
    END;
    [oracle@linux1 ~]$ export ORACLE_SID=usbo
    [oracle@linux1 ~]$ sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Tue Dec 3 17:44:43 2013
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    sys@USBO> show parameter db_name
    NAME                                 TYPE                              VALUE
    db_name                              string                            usbo
    sys@USBO> conn scott/tiger;
    Connected.
    --remove job and chain.
    scott@USBO> EXEC DBMS_SCHEDULER.drop_job(job_name => 'test_chain_1_job');
    EXEC DBMS_SCHEDULER.drop_chain (chain_name  => 'test_chain_1');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_1');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_2');
    EXEC DBMS_SCHEDULER.drop_program (program_name  => 'test_proc_3');
    PL/SQL procedure successfully completed.
    scott@USBO> @/u03/database/usbo/BNR/dump/scott_job.sql
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    Session altered.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    BEGIN
    ERROR at line 1:
    ORA-24150: evaluation context SCOTT.SCHED_EV_CTX$1 does not exist
    ORA-06512: at "SYS.DBMS_RULEADM_INTERNAL", line 28
    ORA-06512: at "SYS.DBMS_RULE_IMP_OBJ", line 40
    ORA-06512: at line 3
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    PL/SQL procedure successfully completed.

    Thanks all of you!
    Hi DK2010,
    I took some test that the data dict(dba_rule_sets/dba_evaluation_contexts) no any data returned after I had removed the job.
    So I tried to create evaluation context and re-executed script(only exception setion.) the first error has gone. For the second still have some issue.
    ---->no any returned
    scott@USBO> select * from dba_rule_sets where rule_set_owner='SCOTT';       
    no rows selected
    scott@USBO> select * from dba_evaluation_contexts WHERE evaluation_context_owner='SCOTT';
    no rows selected
    -->add new EVALUATION CONTEXT
    scott@USBO> exec DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT('SCOTT.SCHED_EV_CTX$1');
    PL/SQL procedure successfully completed.
    --->now it looks fine
    scott@USBO> BEGIN
      2  BEGIN
      3  dbms_rule_imp_obj.import_rule_set('"SCHED_RULESET$1"','"SCHED_EV_CTX$1"',NULL, 0);
      4  END;
      5 
      6  COMMIT;
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    --->add new rule set, it prompt aleady exists
    scott@USBO> exec DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1') 
    BEGIN DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1'); END;
    ERROR at line 1:
    ORA-24153: rule set SCOTT.SCHED_RULESET$1 already exists
    ORA-06512: at "SYS.DBMS_RULEADM_INTERNAL", line 28
    ORA-06512: at "SYS.DBMS_RULE_ADM", line 138
    ORA-06512: at line 1
    -->chain rule still could not find.
    scott@USBO> @job_chain_rules.sql
    no rows selected
    -->rerun
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-27477: "SCOTT.TEST_CHAIN_1" already exists 
    ORA-06512: at "SYS.DBMS_ISCHED", line 1148
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1598
    ORA-06512: at line 2
    -->drop chain
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1');
    BEGIN dbms_scheduler.drop_chain('TEST_CHAIN_1'); END;
    ERROR at line 1:
    ORA-27479: Cannot drop "SCOTT.TEST_CHAIN_1" because other objects depend on it
    ORA-06512: at "SYS.DBMS_ISCHED", line 1319
    ORA-06512: at "SYS.DBMS_ISCHED", line 1222
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1854
    ORA-06512: at line 1
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1',force=>TRUE);
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist   --->still returned no rule set
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    scott@USBO> exec DBMS_RULE_ADM.CREATE_RULE_SET('SCOTT.SCHED_RULESET$1')
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-27477: "SCOTT.TEST_CHAIN_1" already exists
    ORA-06512: at "SYS.DBMS_ISCHED", line 1148
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1598
    ORA-06512: at line 2
    scott@USBO> exec dbms_scheduler.drop_chain('TEST_CHAIN_1',force=>TRUE);
    PL/SQL procedure successfully completed.
    scott@USBO> BEGIN
      2  dbms_scheduler.create_chain('"TEST_CHAIN_1"', evaluation_interval=>NULL, comments=>'A test chain.'
      3  , rule_set_name=>'"SCHED_RULESET$1"   '
      4  );
      5  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_1"', program_name=>'"TEST_PROC_1"');
      6  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_2"', program_name=>'"TEST_PROC_2"');
      7  dbms_scheduler.define_chain_step('"TEST_CHAIN_1"', step_name=>'"CHAIN_STEP_3"', program_name=>'"TEST_PROC_3"');
      8  COMMIT;
      9  END;
    10  /
    BEGIN
    ERROR at line 1:
    ORA-24141: rule set SCOTT.SCHED_RULESET$1 does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_ISCHED", line 1694
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1638
    ORA-06512: at line 5
    Would you like to give me more clue?
    Thanks again.

  • How to stop a Scheduler Job in Oracle BI Publisher 10g

    Hello!
    Can someone tell me how can I stop a scheduler job in Oracle BI Publisher 10g?
    I scheduled a bursting job to run a report but is running during two days.
    I would like to stop it.
    Thanks.
    Edited by: SFONS on 19-Jan-2012 07:16

    Unfortunately there is no way to stop a job once it is being executed. Yes as you read, it is not possible once job has started.
    Same thing applies for running queries.
    Once queries are sent to the DB BIP loses control over them. The message you see (if any) "Click Here to Cancel" does not stop any query
    it is just a message.
    I guess you will have to stop/kill the process in your DB
    regards
    Jorge
    p.s If you consider your question answered then please mark my answer as *"Correct"* or *"Helpful"*

  • Scheduled Job to gather stats for multiple tables - Oracle 11.2.0.1.0

    Hi,
    My Oracle DB Version is:
    BANNER Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    In our application, we have users uploading files resulting in insert of records into a table. file could contain records ranging from 10000 to 1 million records.
    I have written a procedure to bulk insert these records into this table using limit clause. After the insert, i noticed my queries run slow against these tables if huge files are uploaded simultaneously. After gathering stats, the cost reduces and the queries executed faster.
    We have 2 such tables which grow based on user file uploads. I would like to schedule a job to gather stats during a non peak hour apart from the nightly automated oracle job for these two tables.
    Is there a better way to do this?
    I plan to execute the below procedure as a scheduled job using DBMS_SCHEDULER.
    --Procedure
    create or replace
    PROCEDURE p_manual_gather_table_stats AS
    TYPE ttab
    IS
        TABLE OF VARCHAR2(30) INDEX BY PLS_INTEGER;
        ltab ttab;
    BEGIN
        ltab(1) := 'TAB1';
        ltab(2) := 'TAB2';
        FOR i IN ltab.first .. ltab.last
        LOOP
            dbms_stats.gather_table_stats(ownname => USER, tabname => ltab(i) , estimate_percent => dbms_stats.auto_sample_size,
            method_opt => 'for all indexed columns size auto', degree =>
            dbms_stats.auto_degree ,CASCADE => TRUE );
        END LOOP;
    END p_manual_gather_table_stats;
    --Scheduled Job
    BEGIN
        -- Job defined entirely by the CREATE JOB procedure.
        DBMS_SCHEDULER.create_job ( job_name => 'MANUAL_GATHER_TABLE_STATS',
        job_type => 'PLSQL_BLOCK',
        job_action => 'BEGIN p_manual_gather_table_stats; END;',
        start_date => SYSTIMESTAMP,
        repeat_interval => 'FREQ=DAILY; BYHOUR=12;BYMINUTE=45;BYSECOND=0',
        end_date => NULL,
        enabled => TRUE,
        comments => 'Job to manually gather stats for tables: TAB1,TAB2. Runs at 12:45 Daily.');
    END;Thanks,
    Somiya

    The question was, is there a better way, and you partly answered it.
    Somiya, you have to be sure the queries have appropriate statistics when the queries are being run. In addition, if the queries are being run while data is being loaded, that is going to slow things down regardless, for several possible reasons, such as resource contention, inappropriate statistics, and having to maintain a read consistent view for each query.
    The default collection job decides for each table based on changes it perceives in the data. You probably don't want the default collection job to deal with those tables. You probably do want to do what Dan suggested with the statistics. But it's hard to tell from your description. Is the data volume and distribution volatile? You surely want representative statistics available when each query is started. You may want to use all the plan stability features available to tell the optimizer to do the right thing (see for example http://jonathanlewis.wordpress.com/2011/01/12/fake-baselines/ ). You may want to just give up and use dynamic sampling, I don't know, entire books, blogs and papers have been written on the subject. It's sufficiently advanced technology to appear as magic.

  • INSERT in PLSQL loop  in Oracle 9i  scheduled job has poor performance

    Hi,
    I have a scheduled job running in Oracle 9i. But everytime it executes the following piece of code, the INSERT process slows down drastically.
    -------------------------------typical piece of code having problem-----------------------------------
    LOOP
    FOR increbkgs IN bookings_cur (in_chr_fiscal_period_id,
    allrec.cust_name_string
    LOOP
    l_num_rec_count := l_num_rec_count + 1;
    INSERT INTO SA_PORTAL_CDW_BOOKINGS_INCTEMP
    (product_id, territory_code,
    global_target_id, service_type,
    equipment_deployment, created_date, updated_date,
    fiscal_period_id, customer_id,
    ship_to_country,
    bookings_amount, sams_alliance_id
    VALUES (increbkgs.product_id, increbkgs.territory_code,
    increbkgs.global_target_id, increbkgs.service_type,
    increbkgs.equipment_deployment, SYSDATE, SYSDATE,
    increbkgs.fiscal_period_id, increbkgs.customer_id,
    increbkgs.ship_to_country,
    increbkgs.bookings_amount, allrec.sams_alliance_id
    IF (l_num_rec_count = 500)
    THEN
    l_num_rec_count := 0;
    COMMIT;
    END IF;
    END LOOP;
    END LOOP;
    All the tablespaces are auto-extend. But we have still tried to increase the tablespace manually from 2% to 30% by adding datafiles. Still the INSERT is slowing down for some reason.
    (The same process in Oracle 8i is much faster)
    Any hint or guidance is greatly appreciated.
    Thanks and regards,
    Ambili

    commits in loops are great for slowing down things. Actually commits in loops are just about the best way of stalling any 'process' in Oracle.
    A much better way is to resize your undo tablespace to permit one single commit at the end of the whole thing. Yes it could be big, but that's the way Oracle works.
    If you want more info about this, buy Thomas Kyte's book found at http://apress.com/book/bookDisplay.html?bID=10008

Maybe you are looking for

  • BT Connection Issue

    I've recently moved home and have transferred my BT connection, however I cannot get a broadband connection. I've tried both the BT homehub (HH3) and my original router (Netlink) and neither can connect. I've changed the cable connecting the filter t

  • I have a 21" Samsung monitor that needs 1680x1050 resolution.  Do not have in my 13" MacBook Pro os 10.8.2.  Can I get app that will give me monitor resolution

    I have a 21" Samsung monitor that needs a 1680x1050 resolution connected to a 13" MacBook Pro os 10.8.2.  My display preferences do not offer this resolution.  Is there an app. that will give me this resolution or other way to solve this problem.  Th

  • From .psd in flash

    Hi! I`m new to Flash. I am trying to make a "story ",I can say. I made the background ,the ground etc. in Photoshop. And I inported them in flash. I would like to know how I can make the .psd or .jpg [as saved from photoshop] be editable in flash. Li

  • What is "g" data type? Is it STRING?

    Hi Experts, Simple and basic doubt,..... What is "g" data type? Is it STRING? Like these, when I get in future for others, Where Can I see them, I tried in SE11, and F4, but did not figure it out!! thanq

  • JSF vs. Struts

    Hi, we are just starting to looking at MVC technologies for building a java based web application. I just want to get you opinion about Struts and JSF. Are both are doing the same? What are the differences? Which one should I use? Makes JSF Struts ob