Scheduled Jobs and Server Maintenance

Hi All,
Running SQL 2012.  We have a series of scheduled jobs that run once per day, with no retry interval set.  I was informed by IT today that they need to perform unscheduled maintenance on the server this evening - which may or may not be completed
by the time our jobs are set to run.  My question is: if a job is set to run at (say) 10pm, and the server is off - when it is restarted, does it try and execute this missed job?  Or does it just do nothing and next execute according to it's regular
schedule (so, at 10pm the following night?)
Thanks.

The job doesn't fail if SQL Server isn't started when the job is supposed to start. If SQL Server isn't started, then there is nothing tat will attempt to start the job and there's nothing to fail.
There's no re-try here. SQL Server Agent will run the job next time (assuming it is started, of course).
Tibor Karaszi, SQL Server MVP |
web | blog
Hello Tibor,
I guess this is what Prashanth was trying to say. That if job is missed,because agent was not online, when agent comes online it wont execute it immediately but would follow normal course. Hope I am saying correct
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP

Similar Messages

  • XL Reporter Scheduled Jobs and connection settings

    Company needs to decommission current SQL Server and move to new box.
    Company has many XL Reporter scheduled jobs that run on a client machine.
    When the new sql server is in place, what will happen to those jobs? The client machine SBO installation will be directed to the new sql server and the license server there. Will the scheduled jobs "know' from the SBO client to go to the new server for data? Or is the connection string somehow encapsulated in the scheduled job such that they will still try to access data on the old server?
    SBO 2007 A SP 00 PL 48
    (Yes, I know it's old. There are reasons.)
    TIA.

    Your 2nd guess is true: the connection string somehow encapsulated in the scheduled job such that they will still try to access data on the old server. It will not automatically find the new server unless new server has the identical settings.
    You probably need to re-schedule those jobs.
    Thanks,
    Gordon

  • How to create schedule job and event trigger in XI to start a ABAP program?

    Dear All:
    Here are what i need to do:
    1.To run a ABAP program to start an XI scenario per hour.
    2.To run a ABAP program to start an XI scenario per day at 6 PM.
    3.To run a ABAP program used event trigger to make sure that XI scenario has finished the process and after that wait for 10 min later and run again.
    only i know is used sm36 & sm37 to set up a schedule job.
    but what i don't know is how to do it step by step.
    especially point 3.
    are there any step by step example can show me how?
    it better be simple and details...
    thanks you all
    Regards
    Jack Lee

    Hi,
    If you want to trigger the event manually from within SAP, use transaction
    SM64
    in SAP this is done by scheduling a job
    once a new customer is entered
    your scheduled report sends customer master data
    you can schedule your report (TCODE - BD12 I think) to one day or every 5 minutes... it depend on your needs and the system performence
    Regards,
    Surya

  • 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

  • Delete DM scheduled job and .mrc file

    Hi,
    What's the best way for a BPC admin to stop a DM scheduled job either scheduled by error or incorrectly set up?
    My understanding was that deleting the .mrc automation file would take care of it but it doesn't stop the job automatically created in BI (that can be seen in SM37). The BI job can be manually deleted by the BI team but is there a way for the BPC Admin to completely delete it from BPC?
    Thanks
    David

    Hi,
    If the schedule has not started yet, then you can delete the automation from DM package list. It will stop the scheduling. Next time onwards, you can run the package by double clicking on it.
    Hope this helps.

  • Schedule Job and Read Spool

    Hi Guru's,
    my requirement is
    1.I need to run one standard program 3 times with 3 diffrent selection's.
    2.the resultant 3 diffrent ouput will be displayed in only ONE output.
    ( the prgram should have the capalibilty to ceate 3 diffrent jobs simulatenously I.e submitting  the job in background once submit dont wait for the result sicne this should be stored in spool and then submit the secound and thrid)
    after scheduling this 3 prgram program need to wait until all this 3 jobs beein scheduled which were running in paralled to complete. then read ther respective spool and output one result .

    Hi,
    You can check if FM: 'SUBST_SCHEDULE_BATCHJOB' is available on your system ,
    There u can pass the following parameters
    IMPORT
    REPNAME = "Name of the Report"
    LANGUAGE = 'Language in which job should run"
    SDLSTRTDT = "Start date"
    SDLSTRTTM = "Start time"
    STRTIMMED = 'X' = Immediate start
    TABLES
    SELTAB = "to fill selection screen"
    use this FM 3 times with different selections
    Get the Spool Numbers & Read them
    Regards,
    Gaurav

  • CCM schedule job and OCI used

    Hi all,
    We are using Requisite BugsEye 4.0.5.6 with SRM 4.0.  I'm studying CCM 2.0 to replace BugsEye and need helps from all of you:
    Q1: I saw a screen in service marketplace presentation, schedule upload catalog job in CCM need to specify Catalog ID and Supplier ID.  Are these IDs mandatory and what if we have 20 catalog and 500 suppliers, thus in worst case I need to run 20x500 jobs.  It this true?
    Q2: Can CCM schedule daily job to run at specific time?
    Q3: In Requisite, OCI-HTML document will be posted to SRM. What OCI document is posted back by CCM, OCI-HTML or OCI-XML?
    Q4: On the same presentation there is a statement "SAP CCM does not support exporting of content as files ...". Since we have other application polling export file from BugsEye catalog content.  Is there any other way to export CCM catalog content?
    Thanks in advance.
    Regards,
    Donald Lee

    Hi,
    Q1: Yes
    Q2: CCM is an SAP WAS 640 Add-on, the job schedduling is made manually, There is no CCM customizing point that automatically creates jobs, so you can scheddule them whenever you want, and specify the time.
    Q3: OCI is an SAP norm, you can use OCI-XML for asynchronous process, it should also be possible with CCM (depends on the catalog link definition)
    Q4: There is no sytandard exporting tool within CCM, but, once again, CCM is a SAP WAS addon developed in BSP and the data are stored in the WAS database. So you canmake whatever development you want, especially for exporting purposes.
    Regards.
    VAdim

  • Scheduling jobs and sending emails

    I wrote a procedure in Application Express that checks for expiring data and notifies its creator. The procedure is owend by the schema that houses the APEX application and data. I want this procedure to run everyday. I scheduled a job to run in Oracle to perform this duty. The dbms_job was created by SYS. However when I try to submit this job, I am getting this error:
    ORA-12011: execution of 1 jobs failed
    ORA-06512: at "SYS.DBMS_IJOB", line 406
    ORA-06512: at "SYS.DBMS_JOB", line 272
    ORA-06512: at line 1
    I have been looking at this over and over again and can't figure out what I'm doing wrong. I tried creating the job as sys and the "schema name" owner.
    Job code:
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'CHANGETRK.BLANKET_EXPIRATION_NOTICE;'
    ,next_date => to_date('09/12/2008 12:08:27','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'TRUNC(SYSDATE+1)+6/24'
    ,no_parse => TRUE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    END;
    commit;
    PROCEDURE:
    CREATE OR REPLACE PROCEDURE "BLANKET_EXPIRATION_NOTICE"
    IS
    blanket_email_addr VARCHAR2 (100);
    GROUP_ID NUMBER;
    CURSOR exp_blnkts
    IS
    SELECT script_id, app_rej_by, title, bl_app_end_date
    FROM changetrk.scripts_main
    WHERE app_rej = 'BLANKET'
    AND TO_CHAR (bl_app_end_date, 'MM/DD/YYYY') =
    TO_CHAR (ADD_MONTHS (SYSDATE, 1), 'MM/DD/YYYY');
    blnkt exp_blnkts%ROWTYPE;
    BEGIN
    BEGIN
    SELECT nv ('FLOW_SECURITY_GROUP_ID')
    INTO GROUP_ID
    FROM DUAL;
    wwv_flow_api.set_security_group_id (GROUP_ID);
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    END;
    FOR blnkt IN exp_blnkts
    LOOP
    blanket_email_addr := NULL;
    blanket_email_addr := HTMLDB_UTIL.get_email (blnkt.app_rej_by);
    DBMS_OUTPUT.put_line ( 'script id: '
    || blnkt.script_id
    || ' '
    || 'titlel: '
    || blnkt.title
    || ' '
    || 'expiration date: '
    || blnkt.bl_app_end_date
    || ' '
    || 'email address: '
    || blanket_email_addr
    htmldb_mail.send (p_to => blanket_email_addr,
    p_from => '[email protected]',
    p_body => 'Script ID: '
    || blnkt.script_id
    || CHR (10)
    || 'TITLE: '
    || UPPER (blnkt.title)
    || CHR (10)
    || 'EXPIRATION DATE: '
    || TO_CHAR (blnkt.bl_app_end_date,
    'MM/DD/YYYY'
    || CHR (10)
    || 'This script will expire in 30 days'
    || CHR (10),
    p_subj => 'BLANKET SCRIPT: '
    || blnkt.script_id
    || ' '
    || 'EXPIRING'
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    NULL;
    WHEN OTHERS
    THEN
    raise_application_error (-20100, SQLERRM);
    END;
    Edited by: UserLJ on Dec 10, 2008 5:38 AM

    The suggestion is valid. However in your case the call to the function
    nv ('FLOW_SECURITY_GROUP_ID')
    is going to return nothing because there is no 'FLOW_SECURITY_GROUP_ID' for your session since it was started outside of the APEX context.
    You should be able to obtain the 'security_group-id' for your application from the 'WWV_FLOWS' table. This table is owned by the schema into which APEX is installled (Usually FLOWS_XXXXX where XXXX is the APEX release id).The column named 'SECURITY_GROUP_ID' from the row corresponding to your application can be used in your call to to the 'wwv_flow_api.set_security_group_id' API.
    Varad

  • 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

  • Database shutdown and scheduled jobs

    Hi:
    We are planning to shut down our server for two days, and would like to know following.
    1. We have about 100 jobs scheduled throughout the day. We will shut down the server for two days. What will happen when we restart the server, will same daily scheudle job will execute twice ?
    2. Is there any place in OEM where you select all schedule jobs and suspend all ?
    3. Is there any place in OEM where you select all suspended jobs and resume all ?
    Thanks

    Hi,
    If all your jobs are running from OEM, then simple solution will be to define blackout period for the duration your server will be out, so when the server comes up then jobs will be started except for the jobs to be run during black out period.
    Regards

  • 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.

  • Schedule jobs issue after the upgrade

    We have Data Services jobs scheduled via management console in 4.0 Environment. I upgraded the repository to 4.2 and attach it in CMC and also in Server manager. Both the environments are in different servers.
    Login to Data Services management console. Click on the upgraded repository schedules, scheduled jobs listed there. But there is no Job server atatched to it. When i try to activate or edit the schedule, i am getting below error.
    Schedule:billing_rep Error:Socket is closed] When contacting the server above exception was encountered, so it will be assumed the schedule is not active anymore.
    Am i missing any steps?

    Hi Jawahar,
    Below is my suggestion regarding your query:
    Edit existing Job server and update the details regarding Local reporsitory and save it.
    Now try to map the same job server in scheduled jobs and check it was working or not
    Or Else
    Create new Job server and assign it to local repository.
    In this case you have to update your all real time & batch Job configuration.
    Thanks,
    Daya

  • Scheduling Jobs

    I have tried to create scheduling jobs and schedule them. But the error message is 'Server throws in an exception'. My server is O8.0.5. Hope someone can enlighten me.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Justin Cave ([email protected]):
    Are you using an ODBC client to schedule these jobs? I'm not clear what you're trying to do.
    Justin Cave
    ODBC Development<HR></BLOCKQUOTE>
    I used the OEM on my server. It is used also for my routine exporting of tables from my databases. I tried both ways, creating scheduling job on the OEM console, and scheduling on the export dialog box, but the same error message came. Then, it exited my OEM console/data manager, depending on the active window.
    null

  • How can I locate a Scheduler job?

    Hi there,
    In the alert log, I see the following error :
    ORA-12012: error on auto execute of job 2915
    My question is - how do I find the definition for job 2915?
    And before you say - "that's easy, it's in all_scheduler_jobs", it's
    not in all_scheduler_jobs. The old dbms_job package had a column for
    job number, but the Scheduler doesn't. I've scrutinized the definition for
    all the Scheduler views, but nothing reveals the job number.
    When I look at all the jobs listed in dba_scheduler_jobs, nothing seems
    likely to be this mysterious job 2915.
    Does anyone have any idea how I can locate it?
    Thanks!
    Paul Stuart

    Hi,
    Actually I've been meaning to write this info up as a DBA tip, but never get round to doing it...
    The job number referred to is in fact the Object ID of the Job when dealing with a new Scheduler job and not an original DBMS_JOB job.
    Scheduler jobs are database objects now rather than just 'rows in a table' so have an object ID, visible in dba_objects. But the dba_scheduler jobs view does not display this column!
    See this example, I create a Job that refers to a non existant procedure. The object ID matches that put into the alert log when it fails only a second later:
    SQL> declare
      2    jname varchar2(30) := 'JOB_TEST';
      3    jtype varchar2(16) := 'PLSQL_BLOCK'; -- 'PLSQL_BLOCK', 'STORED_PROCEDURE', 'EXECUTABLE'
      4    jaction varchar2(256) := 'not_a_real_proc;';
      5  begin
      6
      7    dbms_scheduler.create_job (
      8                  job_name        => jname,
      9                  job_type        => jtype,
    10                  job_action      => jaction,
    11                  start_date      => systimestamp,
    12                  enabled         => TRUE,
    13                  auto_drop       => FALSE,
    14                  comments        => 'Test job can be dropped'
    15                  );
    16
    17  end;
    18  /
    PL/SQL procedure successfully completed.
    SQL> select object_id,  object_type,object_name
      2  from dba_objects
      3  where object_name = 'JOB_TEST' and object_type = 'JOB';
    OBJECT_ID OBJECT_TYPE         OBJECT_NAME
         53645 JOB                 JOB_TEST
    SQL> select job, error_date, error_line2 from dba_job_errors;
           JOB ERROR_DATE          ERROR_LINE2
         53646 04/09/2007 22:03:17 PLS-00201: identifier 'NOT_A_REAL_PROC' must be declaredHTH
    Chris

  • How to stop a scheduled job using OMB*Plus ?

    Hello everyone,
    I use a OMB*Plus script to deploy a project in various environments. This includes scheduled jobs.
    In this context, I need to stop the schedules of the previous versions to avoid a script crash.
    I found the OMBSTOP command thad could do, but I need to retrieve the job ID of the schedule I want to stop. And I don't know how to get the Job ID.
    I could get it from a previous launch and save it somewhere, but it wouldn't work if the schedule was manually stopped and restarted. Maybe is there a command that lists the running / scheduled jobs and their IDs? I didn't find it.
    Thanks in advance for your help.
    Cedric.

    Frankly, I cannot see where this is available via pure OMB+, however you could back-door it if if you can figure out how to get these values from the public views (I would guess from the "Scheduling Views" section at http://download-east.oracle.com/docs/cd/B31080_01/doc/owb.102/b28225/toc.htm).
    Then you could use my SQL library from OMB+ to get these values and stop the schedules before deploying. you can save this file as omb_sql_library.tcl and then just "source /path/to/omb_sql_library.tcl in your own script to make the functions available in your script.
    {code}
    package require java
    # PVCS Version Information
    #/* $Workfile: omb_sql_library.tcl $ $Revision: 1.0 $ */
    #/* $Author: $
    #/* $Date: 03 Apr 2008 13:43:34 $ */
    proc oracleConnect { serverName databaseName portNumber username password } {
    # import required classes
    java::import java.sql.Connection
    java::import java.sql.DriverManager
    java::import java.sql.ResultSet
    java::import java.sql.SQLWarning
    java::import java.sql.Statement
    java::import java.sql.CallableStatement
    java::import java.sql.ResultSetMetaData
    java::import java.sql.DatabaseMetaData
    java::import java.sql.Types
    java::import oracle.jdbc.OracleDatabaseMetaData
    # load database driver .
    java::call Class forName oracle.jdbc.OracleDriver
    # set the connection url.
    append url jdbc:oracle:thin
    append url :
    append url $username
    append url /
    append url $password
    append url "@"
    append url $serverName
    append url :
    append url $portNumber
    append url :
    append url $databaseName
    set oraConnection [ java::call DriverManager getConnection $url ]
    set oraDatabaseMetaData [ $oraConnection getMetaData ]
    set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
    puts "Connected to: $url"
    puts "$oraDatabaseVersion"
    return $oraConnection
    proc oracleDisconnect { oraConnect } {
    $oraConnect close
    proc oraJDBCType { oraType } {
    #translation of JDBC types as defined in XOPEN interface
    set rv "NUMBER"
    switch $oraType {
    "0" {set rv "NULL"}
    "1" {set rv "CHAR"}
    "2" {set rv "NUMBER"}
    "3" {set rv "DECIMAL"}
    "4" {set rv "INTEGER"}
    "5" {set rv "SMALLINT"}
    "6" {set rv "FLOAT"}
    "7" {set rv "REAL"}
    "8" {set rv "DOUBLE"}
    "12" {set rv "VARCHAR"}
    "16" {set rv "BOOLEAN"}
    "91" {set rv "DATE"}
    "92" {set rv "TIME"}
    "93" {set rv "TIMESTAMP"}
    default {set rv "OBJECT"}
    return $rv
    proc oracleQuery { oraConnect oraQuery } {
    set oraStatement [ $oraConnect createStatement ]
    set oraResults [ $oraStatement executeQuery $oraQuery ]
    # The following metadata dump is not required, but will be a helpfull sort of thing
    # if ever want to really build an abstraction layer
    set oraResultsMetaData [ $oraResults getMetaData ]
    set columnCount [ $oraResultsMetaData getColumnCount ]
    set i 1
    #puts "ResultSet Metadata:"
    while { $i <= $columnCount} {
    set fname [ $oraResultsMetaData getColumnName $i]
    set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
    #puts "Output Field $i Name: $fname Type: $ftype"
    incr i
    # end of metadata dump
    return $oraResults
    # SAMPLE CODE to run a quick query and dump the results. #
    #set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
    #set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
    #for each row in the result set
    #while {[$oraRs next]} {
    #grab the field values
    # set procName [$oraRs getString name]
    # set procCount [$oraRs getInt numlines]
    # puts "Program unit $procName comprises $procCount lines"
    #$oraRs close
    #oracleDisconnect $oraConn
    {code}
    So you would want to connect to the control center, query for scheduled jobs, stop them, and then continue on with your deployment. I assume that you also need to pause and check that an scheduled job in mid-run has time to exit before moving ahead. You could do a sleep loop querying against system tables looking for active sessions running mappings and waiting until they are all done or something if you really want to bulletproof the process.
    Hope this helps,
    Mike

Maybe you are looking for

  • Two images at the same time

    Hi! I'm new into FCE and I would like to ask for some help. Can I work with two images at the same time? I mean, Can I superimpose two images to make one? How can I do it? Maybe this is something easy, but I'm just starting, thanks in advance for you

  • How do I reference "ok" button in file path?

    Here's a quick question, I am using the LabVIEW file path control icon, when you hit the little file browser up pops the window where one can browse  and select a file. Once they are happy they can hit the OK button. I am trying to embed this as a pa

  • Feature Request: KML import

    I just recently discovered how to download saved Google Maps[1].  A number of my friends use it, and several of the conferences I go to have a ton of local data in it.  However, when I travel, I don't always have an always-on data connection (especia

  • Problem when importing Configuration Objects in ID

    Hi, i have a problem, when importing configuration objects in my integration directory. i have one development system and one corresponding quality assurance system. in sld i have defined my business systems + groups + transport targets. the export w

  • EXPORT 시 DATE FUNCTION 을 FILE NAME 으로 이용하기

    제품 : ORACLE SERVER 작성날짜 : 2002-04-08 EXPORT 시 DATE FUNCTION 을 FILE NAME 으로 이용하기 ================================================= PURPOSE 다음은 export시에 date function을 file name으로 이용하는 방법을 설명한다. Explanation 1)DATE 를 넣어서 shell program 으로 exp 를 하는 방안은 다음