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

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

  • 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

  • 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

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

  • 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

  • Create spool in a program and read spool in same program

    hi all,
    i have a requirement like i have to create a spool in a program and should read that spool and send a email in same program.
    i m done with creating spool and sending email but the problem is when i execute a program the spool is created only after total program execution, is there a way to create a compleate spool before finishing the report execution.
    thanks,

    Solution:
    call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = 'LP01'
            copies         = count
            list_name      = 'ZTEST'
            list_text      = 'ZTESTSPOOL'
            immediately    = ' '
            release        = 'X'
            new_list_id    = 'X'
            expiration     = days
            line_size      = 90
            line_count     = 65
            layout         = 'X_PAPER'
            sap_cover_page = 'X'
            receiver       = 'SAP*'
            department     = 'System'
            no_dialog      = 'X'
          importing
            out_parameters = params
            valid          = valid.
        new-page print on parameters params no dialog.
    write : hi this is the test for spool.
    new-page print off.
        commit work.
    write : / sy-spono.   "system variable for spool no
    solved thanks
    anupama.

  • 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

  • P2 gen.spool; how to call it several times from P1 in Job and look spools ?

    Hi
    I have a Program 2  wich generates a report (list). If i create a Job (SM36) with this Program 2, the Job generates the corresponding spool.
    I have other Program 1 wich call several times the Program 2, but if i create a Job with this Program 1, the Job does not generates anything spool.
    PROGRAM 1
       LOOP AT  itab.
           SUBMIT  PROGRAM2
                  USING SELECTION-SET  vari
                  WITH   p_werks     =  itab-werks
                  AND RETURN.
       ENDLOOP.
    I hope to see in the Program 1 Job all the resulting spools (reports) for each Program 2 execution , but it does generates anything, the executions are realized, but the spool are not generated in the Job.
    Does somebody knows how can i achieve this, how to create a Job for a program wich call anhoter program wich generates a report, and see the reports in spool ?
    Regards
    Frank

    Hi,
    Check this example from the standard sap help..
    Output is to the SAP spool database with the specified parameters. The print parameters are passed by the field string params which must have the structure of PRI_PARAMS. The field string can be filled and modified with the function module GET_PRINT_PARAMETERS. The specification arparams with ARCHIVE PARAMETERS must have the structure of ARC_PARAMS. This parameter should only be processed with the function module GET_PRINT_PARAMETERS. Before output to the spool, you normally see a screen where you can enter and/or modify the spool parameters. However, you can suppress this screen with the following statement
    DATA: PARAMS LIKE PRI_PARAMS,
          DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING DESTINATION           = 'LT50'
                COPIES                = COUNT
                LIST_NAME             = 'TEST'
                LIST_TEXT             = 'SUBMIT ... TO SAP-SPOOL'
                IMMEDIATELY           = 'X'
                RELEASE               = 'X'
                NEW_LIST_ID           = 'X'
                EXPIRATION            = DAYS
                LINE_SIZE             = 79
                LINE_COUNT            = 23
                LAYOUT                = 'X_PAPER'
                SAP_COVER_PAGE        = 'X'
                COVER_PAGE            = 'X'
                RECEIVER              = 'SAP*'
                DEPARTMENT            = 'System'
                NO_DIALOG             = ' '
      IMPORTING OUT_PARAMETERS        = PARAMS
                VALID                 = VALID.
    IF VALID <> SPACE.
      SUBMIT RSTEST00 TO SAP-SPOOL
        SPOOL PARAMETERS PARAMS
        WITHOUT SPOOL DYNPRO.
    ENDIF.
    Thanks,
    Naren

  • 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

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

  • 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

  • Suspending of scheduled jobs

    Hi,
    We are running the initialization of PM / QM & Purchasing in R/3 so that we can take the data into BW.
    To run the initialization, we had taken the downtime  and not allowed the users to login to the system.
    But, we want to stop all the jobs which are scheduled.
    Can anyone please advise on how to suspend the all the scheduled jobs and start the same again after my initialization process is completed.
    Thanks
    Ramesh Ganji

    Hi,
    If you have already defined the process chain, then you need to go to each and every infopackage and change the job setting as to suspending or reschedule
    on different timings..
    Hope this helps..
    Assign points if useful..
    Cheers,
    Pattan.

  • 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

Maybe you are looking for

  • Web Start doesn't work on Fresh Window XP!!

    I have a fresh Windows XP professional just installed with latest service pack 1a. I downloaded the latest JDK 1.4.2 and NetBeans3.5.1. After installation, I can not find any Web Start icon. There is a javaws folder (C:\j2sdk_nb\j2sdk1.4.2\jre\javaws

  • Invoice for México

    I want to pay for Creative Cloud from México, ¿how do I get an invoice valid for tax deduction?

  • Menu as library item blocks view (was: Lib item) [subject edited by moderator]

    Säker är det någon inställning jag missat men har en navigering som Lib Item som döljer sidan bakom. Nu måste jag ta bort denna varje gång jag ska redigera sidan och sedan lägga till den igen, mycket frustrerade!  Någon som har ett tips på vad jag gö

  • Why won't my RSS feeds update since July 10, 2012?

    I subscribe to several blogs through my RSS feed.  I just went into my feed in Mac Mail and notice that none of them have updated since July 10, 2012.  What would cause all of my feeds to stop updating after that date?  I just performed a software up

  • Mac pro harddrive, good for audio production

    I currently have this Western Digital WDC WD1001FALS-41K1B0. Im really not happy with this drive, its slow and i get this slow disc message in logic all the time and its also very noise especially because it goes in to sleep mode all the time. I want