Error in creating event based  jobs.

while trying to creating event based jobs. I am getting below error
ORA-00904: "SYS"."SCHEDULER$_QP_5187"."F3": invalid identifier
ORA-06512: at "SYS.DBMS_ISCHED", line 99
ORA-06512: at "SYS.DBMS_SCHEDULER", line 295
ORA-06512: at line 2
I am using 10g database.
Even below small procedure is not working.
begin
DBMS_SCHEDULER.create_job
                     ('test1F' ,
                      job_type             => 'plsql_block',
                      job_action           =>    'begin  test_proc end;',
                      event_condition      =>    'tab.user_data.object_name ='' test''  and  tab.user_data.event_type = ''JOB_FAILED''',
                      queue_spec           => 'sys.scheduler$_event_queue,myagent',
                      enabled              => TRUE
end; and
Myagent is subscribe to
SELECT consumer_name
  FROM dba_queue_subscribers
WHERE queue_name = 'SCHEDULER$_EVENT_QUEUE';
MYAGENT
SCHEDULER$_EVENT_AGENTEdited by: ma**** on 25-Aug-2012 01:55

Please lock this thread, post to the scheduler forum, and when you do include sufficient information for someone to help you ... this isn't it.
What version number.
What is the code you are running?
In what schema with what explicit and role-based permissions?
At what point do you get the error? The way it is posted, above, it is impossible to be sure.

Similar Messages

  • Query on event based job in a client schema and not SYS schema

    Hi, I am fairly new to oracle job scheduler and wanted your inputs on how to create a event based job that sends a mail based on success of another job.
    I was able to implement this with the jobs being created under SYS schema. I did get email notifcation when errors were logged in exception table.
    However, now the requirement has changed to create the jobs under a client specific schema.
    The jobs got created successfully in CLIENT schema but the event based job is not working. It does not send the email notification.
    I feel this is to do with not correctly subscribing to the event queue {sys.scheduler$_event_queue}.
    Can CLIENT schema use the agent "AGENT" created under SYS to subscribe to the Scheduler event queue {sys.scheduler$_event_queue}? CLIENT is the schema in which the all jobs and procedures are created.
    BEGIN
    DBMS_AQADM.ENABLE_DB_ACCESS('AGENT', 'CLIENT');
    END;
    --Main Job that will load data and errors will be logged into exception table
    BEGIN    
    dbms_scheduler.create_job( job_name=> 'CLIENT.LOAD_DATA',                              
    job_type=>'PLSQL_BLOCK',                              
    job_action=>'BEGIN  CLIENT.p_loaddata;                                     
    END;',                              
    start_date=>systimestamp,                              
    repeat_interval=>'FREQ=MINUTELY;INTERVAL=1;',                              
    number_of_arguments=>0,                              
    enabled=> true);
    END;
    --set raise_events attribute = job_succeeded for main job
    BEGIN
    DBMS_SCHEDULER.set_attribute ('CLIENT.LOAD_DATA', 'raise_events', DBMS_SCHEDULER.job_succeeded);
    END;
    --Event Job that will send email based on condition. Condition is checked in procedure CLIENT.p_check_sendmail; If errors are found in the exception table, this job will raise exception and will be JOB_FAILED status. This job will send a email notification.
    BEGIN 
    DBMS_SCHEDULER.create_job (       job_name          => 'CLIENT.EMAIL_JOB',     
    job_type          => 'PLSQL_BLOCK',     
    job_action        => 'BEGIN  CLIENT.p_check_sendmail;                                   END;',     
    event_condition  => 'tab.user_data.event_type = ''JOB_SUCCEEDED'' and tab.user_data.object_name = ''LOAD_DATA''',      
    queue_spec        => 'sys.scheduler$_event_queue,AGENT',      
    enabled          => true);
    END;
    BEGIN    
    dbms_scheduler.add_job_email_notification ( job_name => 'CLIENT.EMAIL_JOB',     recipients => '[email protected]',events => 'JOB_FAILED');
    END;
    Is the way i am subscribing to the event queue correct? Could you please share an example/document of event based job in a schema other than SYS and how subscription is being done to event queue?
    Thanks

    Hi,
    It's a good decision you made because you shouldn't create objects in the SYS schema. I see you're using the add_job_email_notification procedure, so I'm assuming you're on 11g onwards.
    This procedure is meant to make the job easy for you. That is, you don't need to worry about setting up AQ, the procedure does it all for you. All you need to do is setup the mail server if not already done, and call this procedure to add the mail notification. That's it.
    You can also specify a filter to the add_job_email_notification procedure, so maybe you could specify directly your CLIENT.LOAD_DATA job to this procedure.

  • Documentation for tab.user_data with event based jobs

    Hi,
    Are all the atributes for tab.user_data when used as part of an event based job documented somewhere?
    I have been looking but all I can find are examples rather than explicit documentation.
    Thanks
    Pete

    Hi Pete,
    The type of the object tab.user_data is the type used to create the AQ queue with. So it varies depending on the type you used to create the queue with.
    If you are consuming messages from the scheduler event queue, the type is sys.scheduler$_event_info and to figure out what fields it has you can use
    desc sys.scheduler$_event_info
    Hope this helps,
    Ravi.

  • Scheduler - Event Based Jobs

    Hi,
    I've been trying to create an event based job dependent on multiple jobs. I tried queuing, but it seems like it can only hand one Job at a time. Also, chains were recommended to me, but I want the Job to run on the dependence on the Job that ran on specific program at the specific time. I currently know that chains can only handle, programs, other chains and/or events.
    In my mind chains wouldn't work, because If I wanted to run Job3 dependent on the outcome of Job1 running Program1 and Job2 running Program2, chains wouldn't be able to accomdate that. For it to happen in chains I would have to attach Program1 and Program2 to the new chain Job and that is not exactly what I would want.
    Can anyone help/clarify this situation for me. Thank you.
    Tony

    Hi Tony,
    So the requirement is to run a job after 2 prior jobs have completed.
    There are two ways I can think of to do this, both using events. In both cases you need to set job A and job B to raise events on completion (succeeded, failed or stopped) and setup an agent for the Scheduler event queue in the schema in which you are working
    dbms_scheduler.add_event_queue_subscriber('myagent')
    In order to get Job C to start after jobs A and B have completed there are 2 options.
    1) Let job C point to a chain and start running whenever job A has completed. The chain will have 2 steps, one event step waiting on B and one that runs your task C. An event step does nothing but wait for a particular event and complete successfully when the event is received. The second step will run when the event step waiting on job B has completed.
    So your chain would look something like
    begin
    dbms_scheduler.create_chain('chain1');
    dbms_scheduler.define_chain_event_step('chain1','stepB',
    'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''',
    'sys.scheduler$_event_queue,myagent');
    dbms_scheduler.define_chain_step('chain1','stepC','finalTaskProg');
    dbms_scheduler.define_chain_rule('chain1','true','start stepB');
    dbms_scheduler.define_chain_rule('chain1', 'stepB completed', 'start stepC');
    dbms_scheduler.define_chain_rule('chain1', 'stepC completed', 'end');
    dbms_scheduler.enable('chain1');
    end;
    And your job would point to the chain and run whenever job_A completes (similar condition and queue_spec). It would keep waiting till job_B runs and then the final task would run and it would complete.
    2) The second way is to require job_A to insert a row into a table somewhere. Rule conditions can access table data so you could have job_C have an event condition which checks for a completion event for job_B and checks the table to see whether job_A has completed. Then the code you run should then remove the row in the table
    e.g.
    queue_spec=>'sys.scheduler$_event_queue,myagent'
    event_condition=>'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''' and
    (select count(*) from mytab where col='job_A')>0'
    Then when running C do - delete from mytab where col='job_a';
    Both of these assume that job_A always completes before job_B but both of these will then run job_C after job_B completes. Modifying either of these so that either job A or B runs first is also possible by having another job that waits on A rather than B.
    Hope this helps, if you have any more questions, let me know.
    -Ravi

  • How to limit the number of parallel instances of a given event-based job?

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

    Hi,
    DB version : 11.2.0.3
    I'm using an event-based job with parallel_instances attribute set to true.
    It works perfectly fine, messages are enqueued then dequeued and processed simultaneously by separate instances of the same job.
    Now, I'd like to limit the number of parallel instances of this job running at the same time, say to an arbitrary number n.
    What would be the best way to do that?
    Maybe using a notification callback is a better option in this case?
    Thanks in advance for any input.

  • Error while creating a Scheduled job in OIM 11g

    While creating a scheduled job, if i click on the Task and search to select the value, i get the following error.
    <Nov 14, 2011 5:10:24 PM IST> <Error> <oracle.adfinternal.view.faces.config.rich
    .RegistrationConfigurator> <BEA-000000> <ADF_FACES-60096:Server Exception during
    PPR, #1
    javax.servlet.ServletException: java.lang.AssertionError
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:341)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.j
    ava:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter
    (RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:447)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter
    .java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:447)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilt
    erImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilte
    r(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFi
    lter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmt
    NavigationFilter.java:122)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthCon
    textFilter.java:108)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:1
    76)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:31
    3)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUt
    il.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.jav
    a:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:1
    61)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:13
    6)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
    ilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused By: java.lang.AssertionError
    at org.apache.myfaces.trinidad.component.ChildArrayList.__removeFromPare
    nt(ChildArrayList.java:191)
    at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayLi
    st.java:53)
    at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayLi
    st.java:69)
    at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayLi
    st.java:33)
    at oracle.iam.consoles.faces.render.canonic.UIValue$UIEntitySelector.sea
    rch(UIValue.java:1670)
    at oracle.iam.consoles.faces.render.canonic.UIValue$UIEntitySelector.acc
    ess$2400(UIValue.java:1467)
    at oracle.iam.consoles.faces.render.canonic.UIValue$EntitySelectorQueryL
    istener.processQuery(UIValue.java:1787)
    at oracle.adf.view.rich.event.QueryEvent.processListener(QueryEvent.java
    :67)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXC
    omponentBase.java:675)
    at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:108)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.r
    un(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._pr
    ocessPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.bro
    adcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclu
    de.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.r
    un(ContextSwitchingComponent.java:93)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._pr
    ocessPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.bro
    adcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclu
    de.java:96)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents
    (LifecycleImpl.java:902)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(L
    ifecycleImpl.java:313)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(Lifecyc
    leImpl.java:186)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.j
    ava:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter
    (RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:447)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter
    .java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:447)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilt
    erImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilte
    r(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFi
    lter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmt
    NavigationFilter.java:122)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthCon
    textFilter.java:108)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:1
    76)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:31
    3)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUt
    il.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.jav
    a:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:1
    61)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:13
    6)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
    ilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:57)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    >
    This behavior is seen in most of the lookups when we try to search for value.
    Please let me know for any configuration steps for the same issue.

    Have you tried restarting the db and the server? I have seen this on user search and a db restart along with server restart solved it for me. Also note that this error in my case was due to wrong mds file. so for you also check ur tasks and any custom xml which might have some errors into it.
    HTH,
    BB

  • Can't Seem to Get my Event Based Job To Execute

    What makes this slightly different than other posts on this topic is that we want to use our own queue/payload object rather than the built-in SCHEDULER$_EVENT_QUEUE. There are many reasons for this. What follows in under 11gR2 (11.2.0.3)
    So, the following code blocks are just for a proof of concept piece intended to create a simple job and to have it fired based on the arrival of a message in a queue. (Something we have a requirement to do) The issue that I just can't seem to resolve is that, for some reason, the scheduler object never triggers the job. I can't find any trace or alert log entries to help me diagnose. What I do know is that the queue itself is fine (dequeues and enqueues work normally). The object payload type is fine (All of these tested from the EVENT_JOB_MGR package provided below).
    Here's the PL/SQL Type that is the payload object of the queue and is also referenced in the package:
    CREATE OR REPLACE TYPE RUN_MSG AS OBJECT
      STATUS VARCHAR2(255)
    Here are the queue and queue table:
    BEGIN
      DBMS_AQADM.CREATE_QUEUE_TABLE
        QUEUE_TABLE           =>        'JUPSHAW.EVENT_JOB_QT'
       ,QUEUE_PAYLOAD_TYPE    =>        'JUPSHAW.RUN_MSG'
       ,COMPATIBLE            =>        '10.0.0'
       ,STORAGE_CLAUSE        =>        '
                                         TABLESPACE RISKDM_DATA'
       ,SORT_LIST             =>        'ENQ_TIME'
       ,MULTIPLE_CONSUMERS    =>         TRUE
       ,MESSAGE_GROUPING      =>         0
       ,SECURE                =>         FALSE
    End;
    BEGIN
      DBMS_AQADM.CREATE_QUEUE
        QUEUE_NAME          =>   'JUPSHAW.EVENT_JOB_Q'
       ,QUEUE_TABLE         =>   'JUPSHAW.EVENT_JOB_QT'
       ,QUEUE_TYPE          =>   SYS.DBMS_AQADM.NORMAL_QUEUE
       ,MAX_RETRIES         =>   0
       ,RETRY_DELAY         =>   0
       ,RETENTION_TIME      =>   -1
    END;
    DECLARE
      aSubscriber sys.aq$_agent;
    BEGIN
      aSubscriber := sys.aq$_agent('SCHEDULER$_EVENT_AGENT',
                                  0);
      dbms_aqadm.add_subscriber
         ( queue_name     => 'EVENT_JOB_Q'
          ,subscriber     => aSubscriber);
    END;
    BEGIN
      SYS.DBMS_AQADM.START_QUEUE
        QUEUE_NAME => 'JUPSHAW.EVENT_JOB_Q'
       ,ENQUEUE => TRUE
       ,DEQUEUE => TRUE
    END;
    (I think the scheduler automatically added itself as a subscriber (see above) after the queue itself was created)
    So, here's the simple package:
    CREATE OR REPLACE PACKAGE EVENT_JOB_MGR
    AS
        PROCEDURE DEQUEUE_JOB_STATUS_MSG;
        PROCEDURE ENQUEUE_JOB_STATUS_MSG;
        PROCEDURE RECORD_DEQUEUED_STATUS( a_RunMsg  RUN_MSG );
    END EVENT_JOB_MGR;
    CREATE OR REPLACE PACKAGE BODY EVENT_JOB_MGR
    AS
        PROCEDURE RECORD_DEQUEUED_STATUS( a_RunMsg  RUN_MSG )
        IS
            ls_Status       VARCHAR2(32);
        BEGIN
            ls_Status := a_RunMsg.STATUS;
            INSERT INTO DEQUEUE_RECORD
            ( STATUS )
            VALUES
            ( ls_Status );
            COMMIT;    
        END;       
        PROCEDURE DEQUEUE_JOB_STATUS_MSG
        IS
            l_DeQOptions    DBMS_AQ.DEQUEUE_OPTIONS_T;
            l_MsgProps      DBMS_AQ.MESSAGE_PROPERTIES_T;
            l_DeQMsgID      RAW(16);
            l_RunMsg        RUN_MSG;                
        BEGIN
            l_DeQOptions.CONSUMER_NAME := 'EVENT_JOB';
            DBMS_AQ.DEQUEUE(    queue_name          =>  'EVENT_JOB_Q',
                                  dequeue_options     =>  l_DeQOptions,
                                  message_properties  =>  l_MsgProps,
                                  payload             =>  l_RunMsg,
                                  msgid               =>  l_DeQMsgID );
            COMMIT;                             
            RECORD_DEQUEUED_STATUS( l_RunMsg );                              
        END;
        PROCEDURE ENQUEUE_JOB_STATUS_MSG
        IS
            l_EnQOptions    DBMS_AQ.ENQUEUE_OPTIONS_T;
            l_MsgProps      DBMS_AQ.MESSAGE_PROPERTIES_T;
            l_EnQMsgID      RAW(16);
            l_RunMsg        RUN_MSG;               
        BEGIN   
            l_RunMsg := RUN_MSG('Success');
            DBMS_AQ.ENQUEUE(  QUEUE_NAME          =>  'EVENT_JOB_Q',
                                ENQUEUE_OPTIONS     =>  l_EnQOptions,
                                MESSAGE_PROPERTIES  =>  l_MsgProps,
                                PAYLOAD             =>  l_RunMsg,
                                MSGID               =>  l_EnQMsgID);
        END;
    END EVENT_JOB_MGR;
    -- Finally the program, schedule and job
    BEGIN
        DBMS_SCHEDULER.CREATE_PROGRAM(
            PROGRAM_NAME          => 'EVENT_JOB_PROG',
            PROGRAM_ACTION        => 'EVENT_JOB_MGR.RECORD_DEQUEUED_STATUS',
            PROGRAM_TYPE          => 'STORED_PROCEDURE',
            NUMBER_OF_ARGUMENTS   => 1,
            ENABLED               => FALSE );
        DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT (
            program_name        => 'EVENT_JOB_PROG',
            argument_position   => 1,
            metadata_attribute  => 'EVENT_MESSAGE' );  
        DBMS_SCHEDULER.ENABLE( NAME => 'EVENT_JOB_PROG');        
    EXCEPTION
      WHEN OTHERS THEN RAISE ;       
    END;
    COMMIT
    BEGIN
      DBMS_SCHEDULER.CREATE_EVENT_SCHEDULE (
       schedule_name     =>  'EVENT_JOB_SCHED',
       start_date        =>  SYSTIMESTAMP,
       event_condition   =>  'TAB.USER_DATA.STATUS = ''SUCCESS''',
       queue_spec        =>  'EVENT_JOB_Q');
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_JOB (
       job_name            =>  'EVENT_JOB',
       program_name        =>  'EVENT_JOB_PROG',
       schedule_name       =>  'EVENT_JOB_SCHED',
       enabled             =>  TRUE,
       comments            =>  'Start if you get a success message');
    END;
    I call the ENQUEUE_JOB_STATUS_MSG method to stick a message on the queue. I can confirm that it can be dequeued and logged using the DEQUEUE_JOB_STATUS_MSG method in the package. However, nothing seems to happen (at all) as far as the scheduler job when a message is put on the queue. I am thinking it should dequeue the message with status set to SUCCESS and then, kick off the job.
    Can anyone see why the above wouldn't work? Been stuck here for a couple of days.
    Thanks,
    -Joe

    Try to create job that react on event directly not using schedule.
    BEGIN
        dbms_scheduler.create_job(job_name => 'EVENT_JOB',
                                  program_name =>  'EVENT_JOB_PROG',
                                  event_condition => 'TAB.USER_DATA.STATUS = ''SUCCESS''',
                                  queue_spec => 'EVENT_JOB_Q',
                                  enabled => true,
                                  auto_drop => FALSE);
    END;
    Check if your schedule EVENT_JOB_SCHED is enabled

  • Event based job

    we have a job that needs to be restarted after db reboot,is it possible to create an event based inside oracle that starts the queue and our main job for us ?
    v11.2

    Hello;
    Oracle has an System Event Trigger "AFTER STARTUP" which could be used for this.
    "Ask Tom" has a note on this with example :
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:49818662859946
    ( This shows after logon, but you should be able to use the example with the other trigger )
    Best Regards
    mseberg
    OR
    http://www.datadisk.co.uk/html_docs/oracle/scheduler.htm
    http://psoug.org/reference/dbms_scheduler.html
    Edited by: mseberg on Nov 3, 2011 9:31 AM

  • How to create event based process chains

    Hi All,
    I would like to know about event based process chains. In connection to this, could you please answer the following queries,
    1. How to create events
    2. How to link created event to the process chain in the same BI or BW system and as well as from  
        externel BI system.
    3. How link one process chain with other process chain (i.e, After completion of one process chain, it
        should trigger other dependent process chain)
    Thanks and Regards,
    Kotesh.

    1). Doubt regarding first question.
    For example, i would like to create time based event (it should be trigger daily at specified time),
    where we have to maintain scheduling options while creating event.
    When i checked SM62 there i found only two options a). Event name and b). Description.
    Could please send any doucument link if you have.
    Ans : You can use function modules like "BP_EVENT_RAISE" in a program and schedule the program to trigger.
    2). For externel BIW system also same procedure we need to follow or any difference.
    Ans : Externally you need to trigger the same event.
    3). i found dependent process chain also had scheduling options as direct scheduling insted of start using meta chain or API. As you said dependent process chain should be mata chain. it seems dependent process chain may be Meta chain or Direct scheduilg.
    Ans : Its your choice how you want to schedule it.You can either make that dependent chain a metachain or schedule it separately.
    I found at the end of first process chain they kept one process like Raise event and second process chain connected with the help of raise event process event name. If you have any idea about this process could explain a bit more.
    Ans : May be they are raising the event in the main chain and triggering the dependent chain using this event.
    But Metachain is preferred for such thing.Though it does similar thing.
    Hope this helps.

  • How to Create event, background Job & Assing event to backgroud job to trig

    Hi Experts,
    I want to trigger events in Backgroud for data scheduling purpose to automate.
    I can able to create event in SM62. then i want to create background job in SM36 then how to assign to event in Background to trigger.
    can anybody give some suggestion on this.
    Best Regards
    Siri

    Hi,
    There are two cases
    1) to raise an event after the completion of a job
    This can be done by using ABAP coding, trigger the event using a program by the 'RAISE' statement. The job can be scheduled to run in the background daily or weekly(or anything as per the requirements)
    2) to run a job after an event
    in the start condition of the job, give the event name which should trigger that job in the after event field.
    or if you want to run multiple jobs after one event completes, give that event in the start condition of all the jobs.. or model a process chain which will run this jobs..
    I hope this clrifies your doubt...
    Regards
    Shilpa

  • View not copied or enhanced with wizard Error while creating Event Handler method in Z Component

    Hello Friends,
    In one Z Component (Custom Component), in one of the views, while creating event handler, it gave me error message that view not copied or enhanced with wizard.
    I am aware that in Standard Component, if we want to create the event handler method then we need to first Enhance the Component and then we need to enhance the view.
    But, in the Z Component (Custom Component), how to create event handler method in one of the views as while creating event handler method i am getting view not copied or enhanced with wizard error.

    Hi,
    Add a method in views impl class with naming convention eh_on__* with htmt and html_ex parameters.  I dont have have the system right now. Please check any existing event import export parameters.
    Check out do handle event method in the same class.
    Redefine that method.  Call that event method in this handle method. See existing code for reference.
    Attach that event to the button on click event in .htm page.
    Regards,
    Bhushan

  • Error while creating https based web clipping portlet

    Please help me if any one has created https based web clipping portlet. I'm getting the following error when https url is used during clipping :
    An exception has occurred : oracle.portal.wcs.transport.http.HttpTransportException WCS-510 -- HTTP connection failed to URL https://google.com by method get
    Please click "Cancel" or "Back" in the above panel (if present) to retry. Otherwise, please try to click "Back" (from the browser) to go back to the Oracle Portal page to restart.
    both are not working
    Steps performed :
    1) Added proxy settings in provider.xml
    2) Imported certificates from https site into WLS_Portlet key store
    Thanks
    Bikash

    Hi,
    Are you using proxy server? if yes you have to configure it, or it is problem with your provider.xml file. Can you past the code from provider.xml related to proxy setting?
    I have resolved this issue by follow following technique, Look this code from provider.xml
    <proxyInfo class="oracle.portal.provider.v2.ProxyInformation">
    <!-- <httpProxyHost></httpProxyHost>
    <httpProxyPort></httpProxyPort>
    <dontProxyFor>*.mycompany.com</dontProxyFor> -->
    <proxyUseAuth></proxyUseAuth>
    <proxyType></proxyType>
    <proxyRealm></proxyRealm>
    <proxyUseGlobal></proxyUseGlobal>
    <proxyUser></proxyUser>
    </proxyInfo>
    commented first three tags and removed value from remaining tags.
    Just try with that, Hope this will solve your problem
    Muhammad Nasir

  • Error handler for event based messaging framework

    I've been very interested in using the event based messaging framework (described here http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/td-p...) for my next large application.
    My main concern is the fact that it seems like typos would be very difficult to debug since you need to ignore unknown commands to make this system work.
    To solve this problem I've been considering the idea of having a single message error handler VI which will store all valid commands and check all sent commands to see if they are valid.  Each VI would send out a register message on startup with their name and all messages they can send and receive.  The message error handler would store these and then check all future messages to be sure it is a valid message, throwing an error if it is not.
    My basic problem is this: for this to work the message error handler VI would have to be started before any messages are sent so that it can capture all the register events.  If this is a VI that will be continuously running the entire application how can I ensure it starts first since I cannot wait for it to complete? (I.e. the usual method of running an error out wire or using a sequence structure will not work since everything will then wait for it to complete which will not happen until the program is ready to shut down)
    I'm assuming the answer might be to use an asynchronous call but I'm not very familiar with this method.  
    Any help is appreciated.  Thanks. 

    Could you just use the error handler as a subVI inside a case structure that is only called when you have new message to be checked? I'm not sure I understood the exact functionality you are looking for, so sorry if this does not apply.
    Zach P.
    Product Support Engineer | LabVIEW R&D | National Instruments

  • Time and event-based jobs

    Jobs scheduled based on time in DBMS_SCHEDULER. Can we changed to event-based without dropping the job?
    Thanks in advance.

    Hi,
    You can try this :
    - disable the job
    - set event_spec to be NULL for the job e.g.
    exec dbms_scheduler.set_attribute_null('j1','event_spec')
    - use set_attribute to set your time-based schedule
    - re-enable the job
    This should work.
    Hope this helps,
    Ravi.

  • Error in creating Federation Replication Job

    I am trying to use Federation on XI3.5. I have created a Replication List and a Remote Connection. However, when I tried to create a new Replication Job, I encountered the following error and I have no idea how to troubeshoot this problem. I searched the internet but could not get any helpful information. Hence, posting my problem here & hope to get some help.
    Error 500--Internal Server Error
    java.lang.VerifyError: class loading constraint violated (class: org/apache/axis2/util/StreamWrapper method: getAttributeName(I)Ljavax/xml/namespace/QName;) at pc: 0
         at java.lang.J9VMInternals.verifyImpl(Native Method)
         at java.lang.J9VMInternals.verify(J9VMInternals.java:69)
         at java.lang.J9VMInternals.initialize(J9VMInternals.java:131)
         at com.businessobjects.dsws.Consumer.CreateAxisFault(Unknown Source)
         at com.businessobjects.dsws.Consumer.propagateAsDSWSException(Unknown Source)
         at com.businessobjects.dsws.Consumer.(Unknown Source)
         at com.businessobjects.dsws.session.Session.(Unknown Source)
    Any kind of help is every much appreciated.

    Try this
    create or replace procedure apsp.job_test_ram
    as
       v_sql   varchar2 (1000);
    begin
       for i
       in (select   gbm.owner_name owner_name,
                    vdb.name || '_BU_' || gbm.bu_code,
                    gbm.bu_id bu_id
             from   apps_global.GLOBAL_BU_MAPPING gbm, v$database vdb
            where   owner_name not in ('APPS_GLOBAL'))
       loop
          v_sql :=
             q'[begin
                  dbms_scheduler.create_job
                      job_name   => '#OWNER_NAME#_archive_job'
                    , job_class  => '#OWNER_NAME#_job_class'
                    , job_type   => 'STORED_PROCEDURE'
                    , job_action => q'{APSP.POP_TARGET('APPS_XX','#OWNER_NAME#','#BUILD#')}'
                    , auto_drop  => TRUE
                    , comments   => '#OWNER_NAME#'
                    , enabled    => TRUE
                end;]';
             v_sql := replace(replace(v_sql, '#OWNER_NAME#', i.owner), '#BUILD#', i.build);
          execute immediate v_sql;
       end loop;
    end;
    /

Maybe you are looking for

  • Help needed Displaying ALV  Secondary list without using oops concept

    Hi Experts Help needed Displaying ALV  Secondary list without using oops concept. its urgent regds rajasekhar

  • How do I open a .qfl file on my iMac 10.6.8?

    The following statement appears when I try to open my saved file: The file "/Users/georgejacob/Desktop/Trust papers/Barb - Health Care.qfl" does not appear to be compressed or encoded.  It is advised  that you obtain further information about the con

  • Dead iPod?

    I've had my 120gb Classic for about 13 months now. A few weeks ago it stopped working. I got a message on iTunes mid-use saying something was wrong with it and I needed to restore it. Easy enough. I've had problems before and there was nothing a good

  • Find my iMac issues

    I have multiple users on my iMac. When I sign in as Admin, I give authorization in iCloud to "Find my Mac". When someone else logs in, the Find my Mac is grayed out and says Administrator authorization required. How do I fix this so no matter who is

  • Query to obtain tables in SH schema using data-dictionary views/tables.

    Hi, I have just installed Oracle 10g Database. Logged on to SQL Plus by scott (changed the password as prompted). I want to see the tables in SH schema (which comes by default with Oracle 10g database). The problem, I am facing is: I can see the sche