Job hang in RUNNING state

Hi,
Database ver. 11g (11.1.0.7.0)
I have created simple job using DBMS_SCHEDULER.
begin
dbms_scheduler.create_job (
job_name => 'test_job',
job_type => 'plsql_block',
job_action => 'null;',
enabled => true);
end;
SELECT job_name, job_action, schedule_type, state
FROM all_scheduler_jobs
WHERE job_name = 'TEST_JOB';
JOB_NAME  JOB_ACTION   SCHEDULE_TYPE    STATE
TEST_JOB   null;        IMMEDIATE      RUNNING
SELECT job_name, session_id , running_instance, cpu_used
FROM dba_scheduler_running_jobs
WHERE job_name = 'TEST_JOB';
JOB_NAME  SESSION_ID  RUNNING_INSTANCE, CPU_USED
TEST_JOB   null          null          null Job is remaining in hang state, could you please let me know possible reason?
Many thanks.

Hi,
Actually your syntax is exactly right for running a single run-immediate job.
it looks like the slave running your job may have crashed or terminated unexpectedly. You should do a stop_job (force=>true) on your job and you should look through your job slave trace files j0trc for reasons why your job slave did not finish the job. You can also try grepping your job slave traces for the job name 'TEST_JOB' to find the right trace.
Hope this helps,
Ravi.

Similar Messages

  • Backup job stuck in running state

    Hi
    I am using 11gR2 RAC on Windows 2008 R2. I have several different database jobs stuck in a running state. However if I check the view v$session_longops I can not see anything in there relating to RMAN. If I drill down to the job and the step that is running, in the Error Log it states:
    error writing input to command
    Could someone point me in the right direction as to how to investigate this?
    Thanks

    if you know that the execution finished or is hung,use this query:
    SELECT p.SPID, s.sid, s.serial#, sw.EVENT, sw.SECONDS_IN_WAIT AS
    SEC_WAIT, sw.STATE, CLIENT_INFO
    FROM V$SESSION_WAIT sw, V$SESSION s, V$PROCESS p
    WHERE s.client_info LIKE 'rman%'
    AND s.SID=sw.SID
    AND s.PADDR=p.ADDR;
    and kill them.

  • ODI 11g Scheduled job stays in running state

    Hello All ,
    In ODI operator in the integration process ,there arer 3 scenarios scheduled .
    When the first is completed it switches to second ,but the next step/process keep running and never comes to an end,though the corresponding backend activity has been completed(which the scenario is supposed to do).
    Which ultimately results into timeout.
    Please suggest a solution for this.
    Thanks in advance ,
    ABHIJEET

    Hi,
    Actually your syntax is exactly right for running a single run-immediate job.
    it looks like the slave running your job may have crashed or terminated unexpectedly. You should do a stop_job (force=>true) on your job and you should look through your job slave trace files j0trc for reasons why your job slave did not finish the job. You can also try grepping your job slave traces for the job name 'TEST_JOB' to find the right trace.
    Hope this helps,
    Ravi.

  • Jobs are hanging in running status

    Hey ,
    I have some overnight jobs that refresh materialized views over a dblink from a remote db. I came this morning and noticed that some of the jobs where hanging in RUNNING state with "more data from dblink" event but there was no corresponding sessions in the remote db. It seems like the refresh process was already done (by the size of the mviews). Tracing the session is useless (i've tried) since no actual job is being done. The alert log gave no clue.
    any ideas on what the problem is or what to do in order to find it?
    could it be a locking issue ?
    Thanks

    Hi,
    I think you may need to use normal database hang diagnostic methods to try to figure out what is going on.
    The first thing to do is look in the dba_scheduler_running_jobs view, there should be sessions associates with the running view (you can also check that there are real j0 slave processes running the jobs). Once you have checked that there is a real session that is still running the job maybe you could check the v$session view and any other v$ views that should be able to tell you what SQL statement the job is hanging on. You may also be able to check locks held by those sessions.
    You may also be able to use Oracle's ADDM reporting tools to get some diagnostic info.
    Another possible thing to try is running the job action by hand manually in pl/sql and seeing whether that hangs and possibly figure out where.
    Where do you see the "more data from dblink" message ?
    -Ravi

  • BPEL instances in Running state - SOA version 11.1.1.4

    Hi ALL,
    I am Working with the Orace SOA 11.1.1.4 version and facing the same issue
    Description :
    I have developed a synchronous BPEL / Composite that listens over a JMS Queue configured in weblogic (MessageType is Text /String - XML Stirng). Based on the Operation Type in the Message the BPEL forwards the message to other Composites .
    If the server is restarted or the composite is redeployed , the mesages get processed fine ,but if there are more no of messages in the queue , the instances hang in running state , this happens frequenlty.
    I tried modifying the DispatchThreds and invoke Thread which make thing even worse :-(
    Help Needed Got badly stuck up :-(
    -Lakshmi

    Team,
    Any idea? I have "Validation" enabled for the composite and my testsuites are not working. When I test using unit tests, I am only seeing "Running" status of the processes and these are not getting completed.
    Your help is appreciated.

  • Jobs stays in waiting state but does not ever run in target system

    This usually happens when there is a network problem or the target system is down for some reason. Is there a way to ignore the waiting status so that the next scheduled job runs would be affected? If not can CPS be configured to constantly request for the actual status of the job in the target system?

    Hi,
    Set the below parameter on the process server of the target system for which  jobs stays in waiting state.
    Parameter: SAP_MaxReconnectTime  value: 60
    Reason: Process servers tries to connect to Target system at the time when the network issue happens and due to that It does not connect to the target SAP system and all the jobs stays in waiting status.
    When you set this parameter with the value (what ever you want in Minutes), it will automatically try to reconnect to the target SAP System at every 60 min (or the value provided) when ever it loses the connection with Target system and Jobs will start processing again.
    Thanks and Regards,
    Vipul Kaswala

  • Background Job hangs!

    Hello Friends,
    I am encountering a problem with background jobs which has driven me crazy.
    The background job hangs and when I try to debug it using the JDBG command the results are surprising.
    When the program control reaches a particular PERFROM statement, then no matter what command I give (F5, F6 or if I double click on any of the variables) it hangs. When I press F5, it should atleast go in to the corresponding FORM, and hang during some processing or it should go into an infinite loop but this is not the case. The system hangs even when I press F5 on the PERFORM. The FORM routine exists in the program, so that possibility is ruled out.
    Actually the job processes records of a custom table, this problem starts with a particular record and if I skip the processing of this record then it happens with almost all the records after this one. Also, this does not happen every time the job is run, but whenever it does, it starts with a particular record.
    When the system hangs then even if I try to stop the transaction by right clicking on the task bar then it has no effect, the only way to close the session is by using the 'Windows task manager'.
    I tried transaction SM50, but there were no changes on that screen for this particular session indicating that it has hanged.
    Please let me know if you require any more information.
    Thanks and Regards,
    Haseeb.

    Hi,
    Debug it in Sm66.
    kishore.

  • Job is not running in Source system.

    Hi Experts,
    One issue I have because of this I am not able to load data into Data sources.
    I am in BI 7.0 environment.
    when I execute infopackage, total and techinical status are in yellow.
    I found in R/3 Job is not running, based on this statement in SM37. from the fallowing.
    Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 0 records
    Result of customer enhancement: 0 records
    IDOC: Info IDoc 2, IDoc No. 3136, Duration 00:00:00
    IDoc: Start = 14.05.2009 07:23:39, End = 14.05.2009 07:23:39
    Synchronized transmission of info IDoc 3 (0 parallel tasks)
    IDOC: Info IDoc 3, IDoc No. 3137, Duration 00:00:00
    IDoc: Start = 14.05.2009 07:23:39, End = 14.05.2009 07:23:39
    Job finished
    Job satrt time and end time are same, so job is not running in the sourcesystem, am i right. let me known if i am worng.
    It is Standard Data source but in the above statement becasue  *result of Customer enhancement:0 records.*
    please help me to reslove this issue to load data into BI.
    1. what I have to do to run job in source system side.
    2. should I take any help from Basis.
    Regards
    Vijay
    Edited by: vijay anand on May 14, 2009 3:02 PM
    Edited by: vijay anand on May 14, 2009 3:04 PM

    Hi Rupesh,
    in RSA3 data is availbale,
    but it is not coming to BI,
    Messages from source system
    see also Processing Steps Request
    These messages are sent by IDoc from the source system. Both the extractor itself as well as the service API can send messages. When errors occur, several messages are usually sent together.
    From the source system, there are several types of messages that can be differentiated by the so-called Info-IDoc-Status. The IDoc with status 2 plays a particular role here; it describes the number of records that have been extracted in a source system and sent to BI. The number of the records received in BI is checked against this information.
    the abovemessage I am getting in details tab.
    Regards
    Vijay

  • Job is in scheduled state for longer time.

    Hi All,
    I am running a load which involves extraction from source system. The load was taking longer than the usual time. I grew suspicious and checked the status of the job in the source system. But that was sitting in the scheduled state and when i try to change the job status , not able to do so. I checked the BGD processes availability and they were all in waiting status.
    What can be done for this? Suggest ....

    Hi..the issue you have is probably due to the fact that already a lot many jobs are running in background in your R/3 system and unless they finish you job will not get any background processes to get it to active state from the scheduled state.
    Now thats why usually BW loading are done at night or off hours of business when transactions or r/3 jobs are not running much.
    Schedule your job at a time when background processes are available then you won't face this issue.
    Contact the basis handling the R/3 system.
    Regards,
    RK

  • Oracle automatic statistics optimizer job is not running after full import

    Hi All,
    I did a full import in our QA database, import was successful, however GATHER_STATS_JOB is not running after sep 18 2010 though its enable and scheduled, i did query last_analyzed table to check and its confirmed that it didnt ran after sep18,2010.
    Please refer below for the output
    OWNER JOB_NAME ENABL STATE START_DATE END_DATE LAST_START_DATE NEXT_RUN_D
    SYS GATHER_STATS_JOB TRUE SCHEDULED 18-09-2010 06:00:02
    Oracle defined automatic optimizer statistics collection job
    =======
    SQL> select OWNER,JOB_NAME,STATUS,REQ_START_DATE,
    to_char(ACTUAL_START_DATE, 'dd-mm-yyyy HH24:MI:SS') ACTUAL_START_DATE,RUN_DURATION
    from dba_scheduler_job_run_details where
    job_name='GATHER_STATS_JOB' order by ACTUAL_START_DATE asc; 2 3 4
    OWNER JOB_NAME STATUS REQ_START_DATE ACTUAL_START_DATE
    RUN_DURATION
    SYS GATHER_STATS_JOB SUCCEEDED 16-09-2010 22:00:00
    +000 00:00:22
    SYS GATHER_STATS_JOB SUCCEEDED 17-09-2010 22:00:02
    +000 00:00:18
    SYS GATHER_STATS_JOB SUCCEEDED 18-09-2010 06:00:02
    +000 00:00:26
    What could be the reason for GATHER_STATS_JOB job not running although its set to auto
    SQL> select dbms_stats.get_param('AUTOSTATS_TARGET') from dual;
    DBMS_STATS.GET_PARAM('AUTOSTATS_TARGET')
    AUTO
    Does anybody has this kind of experience, please share
    Apprecitate your responses
    Regards
    srh

    ?So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run, but i see tables are updated still the job is not running. I did >query dba_scheduler_jobs and the state of the job is true and scheduled. Please see my previous post on the output
    Am i missing anything here, do i look for some parameters settings
    So basically you are saying is if none of the tables are changed then GATHER_STATS_JOB will not run,GATHER_STATS_JOB will run and if there are any table in which there's a 10 percent change in data, it will gather statistics on that table. If no table data have changes less than 10 percent, it will not gather statistics.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41282
    Hope this helps.
    -Anantha

  • SSIS 2012 job hangs dataflow task

    hi all,
    i have 2 data flow tasks in a package that run based on parameters.
    the package is being run as a sql agent job using catalog execution model.
    the job sometimes hangs without reason. also, when i looked at the target sql tables, only few rows have been loaded into the 2 target tables and stopped when the job hanged,
    the data flow tasks loads data from source into a target sql table.please advice on why the job hangs, are there issues with the catalog model of ssis 2012 that is causing this?

    Perhaps this info (scripts) somehow shed light on the problem
    http://sqlblog.com/blogs/davide_mauri/archive/2014/07/23/ssisdb-analysis-script-on-gist.aspx
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Job is in suspened state

    Dear SDNers,
    How do we know a job is in suspended state.
    because some of my ECC jobs are in Released\ from last 2 days and scheduled time as 2 days back only..it runs for every 3 hrs .
    Thanks,Swathi

    Hi,
    Well here's what you need to do.
    If the job is in 'Released' state in ECC, that implies that it has received no background work process (WP) to start the activity.
    Please check the background work processes with SM66 or SM51 (here choose the server and check the work process status).
    Check how many BGD (background) work processes are in 'Waiting' state.
    Here the work processes will most probably be either 'On hold' or 'running' state. Go inside the work process and see what activity was being done last after which it got stuck and then inform the basis team to end the work process forcefully.
    This will solve your issue.

  • AQ Propagation job hanging

    Hi,
    We have an Oracle 11 Enterprise Edition installed on our central UNIX environment.
    On the other side we have a PC's that runs an oracle 11 xe database on Windows.
    Between these databases, data is send with AQ.
    Now, we noticed that when AQ is sending data and at that same moment the network connection between the databases is interrupted, then the propagation job hangs.
    Restarting the progragation also is hanging because of the hanging progagation job.
    The hanging propagation job is then killed on the UNIX at the central environment.
    When this issue occurs when sending from the PC to the central server, we reboot the PC.
    Afterwards we can restart the propagation.
    Is someone recogniziging this problem?
    Is this a know bug?

    Probably better off asking AQ questions in the AQ forum.
    Advanced Queueing
    Cheers,

  • Dbms_scheduler - how to stop a job in next run

    HI All,
    I have scheduled a job to run every 20 mins. Its a collection of procedures. During business hours, the scheduled job runs more than 1 hour because of this next cycle will be in queue, Once this cycle completes next wil be triggered in micro seconds.
    I need to stop this JOb after completing the current cycle. I tried stop_job. I failed. Also I am not able to find the Job in scheduled state, due to above conditions. Its always in running state. I dont want to stop the current cycle forefully.
    Maintenance window is running, I need to stop the Job after it completes current run.
    Is it possible ? Can some one help me to achieve this.
    Thanks

    Thanks for the replies.
    I already tried with dbms_scheduler.disable('name');
    It failed due to running Job. I dont want do it forcefully due to business requirement. cycle shouldnt be killed.
    stop_job - though I stop the next run. subsequent runs are in queue. job frequency is 20 mins. But job runs for 60 to 90 mins. because of this, many jobs which are in queue are kicked off one by one.
    How to proceed ?

  • Connection rejected, the server is in a running state.

    Have deployed webservice within weblogic. WLS starts up fine. Users can access the webserver, after a period of time, webservice hangs up and users that try to connect recieve this following message, I also see this in the weblogic.log
    The server is not able to service the request. Connection rejected, the server is in a running state. Starting service weblogic.application.internal.BackgroundDeploymentService$WaitForBackgroundCompletion, 110 of 112. Last service weblogic.deploy.service.internal.adminserver.HeartbeatService took 2ms.
    I have no idea what to do. Right now the only way to bring back the webservice is to stop the WLS process and then restart. The service can fail anywhere from within about 20 mins of WLS start-up or about within 12hrs.
    Any Ideas what this error is trying to tell me.. Is there a more permanent fix other that restarting the WLS process.
    Thank you

    wow same case here in weblogic 10.2. But I have not deployed any EJB or JMS service . It shows in Console that "Mejb" Stateless service is running. I use https port from SSL mostly.
    the error was:
    The Server is not able to service this request: [Server:002623]Connection rejected, the server is in the RUNNING state. Starting service weblogic.jms.JMSServicePostDeploymentImpl, 120 of 122. Last service weblogic.ejb.container.timer.EJBTimerStarterActivator took 2ms.
    The client could not connect to https pages then.
    It occured for hours.
    I saw a solution that said:
    BEA-002623
    Notice: Connection rejected, the server is in the state state.\r\n Starting service svr, num of total.\r\n Last service last took timems.
    Description
    Clients are trying to connect to the server before it is in the RUNNING state.
    Cause
    Clients are trying to connect to the server before it is in the RUNNING state.
    Action
    When I was not starting any service why should it say so?
    I am in a big mess in my production server .
    Dear oracle weblogic geeks please come forward and show your ability.
    I cannot restart my server every 1 hour or 4 hour or 12 hour.
    I use Jrockit 1.6
    ojdbc6 driver
    I also use a connection pool from with in Weblogic to test my Oracle 10.2 RAC.
    let me know asap if any solution exist.

Maybe you are looking for