Can't stop a job execution

I have Oracle 10g and a scheduled job which executes a hot backup every day at 2 AM.
Yesterday evening at 10 PM the listener hung. I rebooted the machine this morning and everything is fine now.
However, the Jobs page shows, that the last backup has been running for 15 hours now!
When I try to stop it, it says "The job was stopped successfully", but I see status is still "Running". I tried to delete it, but it says it must be stopped first.
Is there any way to kill this job?
I know there is a DBMS_SCHEDULER.STOP_JOB procedure, but it requires job name and I don't know how to get that.
I didn't find anything useful in dba_jobs or any other view.

I have had some success with finding the offending session and killing it, then killing the offending OS process.
Since we are using RAC (on RHEL), and the session is known to be running under a job class, which runs under a service, we find the offending session by:
select sid, serial#, status from gv$session where service_name = 'BACKUPS';
SID SERIAL# STATUS
3185 4664 ACTIVE
Then issue: ALTER SYSTEM KILL SESSION '3185, 4664' IMMEDIATE;
SID SERIAL# STATUS
3185 4664 KILLED
Now, find the OS process associated with that SID (assuming you are using UNIX):
select s.username, s.status, s.sid oracle_sid, s.process unix_pid, s.serial#, p.spid, s.machine, s.lockwait
     from v$session s, v$process p
     where s.sid = '&oracle_sid'
     and s.paddr = p.addr
Enter value for oracle_sid: 3185
USERNAME STATUS ORACLE_SID UNIX_PID
APP_SERVER INACTIVE 3185 1234
Then, leave sqlplus, and kill the offending OS process using a command prompt on the server:
kill -9 1234
After this, the job can be disabled/modified/dropped

Similar Messages

  • Can't stop a job

    Hello,
    The job "refreshfrommetalink" is running since 4 days and I can't stop it through the manager.
    When I click on "Stop" the job is flagged "Stop pending", but it dones not stop.
    On other screens it is still flagged "Running".
    How can I stop it ?
    Version 10.0.1.2
    Regards

    I have had some success with finding the offending session and killing it, then killing the offending OS process.
    Since we are using RAC (on RHEL), and the session is known to be running under a job class, which runs under a service, we find the offending session by:
    select sid, serial#, status from gv$session where service_name = 'BACKUPS';
    SID SERIAL# STATUS
    3185 4664 ACTIVE
    Then issue: ALTER SYSTEM KILL SESSION '3185, 4664' IMMEDIATE;
    SID SERIAL# STATUS
    3185 4664 KILLED
    Now, find the OS process associated with that SID (assuming you are using UNIX):
    select s.username, s.status, s.sid oracle_sid, s.process unix_pid, s.serial#, p.spid, s.machine, s.lockwait
         from v$session s, v$process p
         where s.sid = '&oracle_sid'
         and s.paddr = p.addr
    Enter value for oracle_sid: 3185
    USERNAME STATUS ORACLE_SID UNIX_PID
    APP_SERVER INACTIVE 3185 1234
    Then, leave sqlplus, and kill the offending OS process using a command prompt on the server:
    kill -9 1234
    After this, the job can be disabled/modified/dropped

  • Can't stop a job from plsql 27486 - stops fine from sql

    Hi,
    I'm trying to create a simple package that will stop known jobs that the user owns. (Same user owns the jobs and the package)
    the code just does
    dbms_scheduler.disable('JOB_EMAIL_QUEUE', TRUE);
    dbms_scheduler.stop_job('JOB_EMAIL_QUEUE', TRUE);
    At stop_job I get
    ORA-27486 insufficient privilege
    ORA-06512 at "SYS.DBMS_ISCHED", line 164
    ORA-06512 at "SYS.DBMS_SCHEDULER", line 483
    Yet if I put the exact same code in an anon block it runs fine in sqlplus for the same user. The user holds the role SCHEDULER_ADMIN but I have now granted him execute access on both dbms_isched and dbms_scheduler.
    Whassup?
    Thanks,
    Steve

    Hi,
    I think what you're seeing is caused by the following two facts
    - a user must have the manage scheduler system privilege to stop a job with force=>true
    - definer's rights pl/sql stored procedures don't honour system privileges granted through roles. See
    http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10807/08_subs.htm#sthref1072
    The simplest solution is to grant MANAGE SCHEDULER directly to the definer of the definer's rights stored procedure.
    Hope this helps,
    Ravi.

  • Cannot stop Oracle job

    Hi there,
    I have a scheduled backup job which set to run daily, for some reason or another it has failed and it's current status is skipped and has been so for the last couple of days. I have tried to stop the job, but it sill remains there in the same state. I have tried restarting the database, but have had no joy.
    How can I stop the job, and getting it back on schedule?
    Thanks...

    The job is a database backup job which reported an obscure error the other day, I posted it but got no useful replies as to the nature of the error, the error was as follows
    Failed due to Unexpected error. No future executions will be scheduled. Details: ORA-28239: no key provided
    ORA-06512: at "SYS.DBMS_CRYPTO_FFI", line 67
    ORA-06512: at "SYS.DBMS_CRYPTO", line 44
    ORA-06512: at "SYSMAN.DECRYPT", line 9
    I have restarted the database and now I plan to stop the job and reshedule it, but the problem is that I can't stop the job, any suggestions?

  • How to stop the job which is running infinite time......

    Hi ,
    I created one procedure with the below code. Using dbms_scheduler i created one job and called that program. That job is in sleep mode for long time. How can i stop that job.
    create or replace procedure bpc_test_batch
    is
    begin
    dbms_lock(30000000)
    end;
    Regards,
    Thiru

    Have you tried this already?
    exec dbms_scheduler.stop_job('Your_Job_Name',true);

  • Can't "stop" data pump job via dbms_datapump

    DBMS_DATAPUMP.101
    I have a job I have OPENd, but never started. How do I get rid of it?
    SQL> declare
    2 v_handle number;
    3
    4 begin
    5
    6 v_handle := DBMS_DATAPUMP.ATTACH('RefreshFromDev','SYSTEM')
    7 DBMS_DATAPUMP.STOP_JOB(v_handle );
    8
    9 end;
    10 /
    declare
    ERROR at line 1:
    ORA-31626: job does not exist
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 911
    ORA-06512: at "SYS.DBMS_DATAPUMP", line 3279
    ORA-06512: at line 6
    SQL> SELECT JOB_NAME, OWNER_NAME , STATE FROM DBA_DATAPUMP_JOBS;
    JOB_NAME
    OWNER_NAME
    STATE
    RefreshFromDev
    SYSTEM
    DEFINING
    Obviously the job exists. I've tried issuing another Open with the same name and It complains that the job already exists. As I understand it, I have to attach to the job and issue a stop_iob in order to dispose of it.
    Thanks
    Steve

    OK, mystery solved, sort of. If I close my sqlplus session, and log in again, issuing the same sql, it works.
    I suppose I should read the message "job does not exist" as something like "already attached to a job, detach or disconnect"
    Can anyone shed some light on this? I guess it means you can only attach to one job per session, or that only one handle can be issued per job per session. But I'm only guessing.
    Thanks,
    Steve

  • I can't stop my song from looping back to the beginning

    I have created some backing tracks for a swing band that has lost its rhythm section and have to date played them back (via a big speaker) using Logic pro X on a macbook air.
    I want to use my ipad instead as it's smaller and handier when you have to juggle with ipad, an instrument, sheet music and mutes etc..
    I've succeeded in copying tracks exported from Logic into GarageBand iOS version using the "Export All Tracks as Audio Files" option.  I imported them as individual tracks into GB and they play back just fine.  However...
    I can't stop them from looping back and starting again, which in a rehearsal environment I DO NOT need!  I assume this is because I had to import them using the loop-loading tool - set to "audio" - in GB iOS.  Can anyone help me get round this please.  Or is there an iOS DAW that would do this job instead of GB?
    Many thanks in advance.

    Looks like playback for GB on iOS always loops the current section or the whole song. Export the songs to iTunes and you can play them as you want, probably putting each in its own playlist so it is easier to play once then stop, or by adding long silences between tracks that you can then skip when you are ready.
    tt2

  • How can I stop Firefox from asking me over and over (even on pages with no flash content) to install Flash? I don't want Flash installed and this stupid pop-up.

    So even when I load up websites (like ones we here at my job have created) with very simple HTML and absolutely nothing Flash related, I still get a pop-up asking me to install flash (pops down from the URL bar at left.) How can I stop this without disabling all plug-in updates?
    Moreover, why in the name of all that's good is it asking me about Flash when I have no pages open with anything remotely Flash like on them?
    Thanks to anyone who can answer.

    I do not see why this should happen because of Firefox. Maybe you have some sort of adware on your system.
    Please attach a screenshot of the popup
    * [[How do I create a screenshot of my problem?]]
    Try Firefoxin safe mode to rule out your standard extensions. if that does not solve the problem then scan for malware with multiple and up-to-date tools.
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • How to stop print job in SAP?

    Can some help in explaining how to stop print job in SAP .???
    i

    HI Swati,
    Thanks for the additional info. as per previously mentioned use SM37 - however be sure to check the box ''Sched' when performing the search for the job in question (and untick the others so the resulting list will be clearer to read etc.)
    You can then choose to delete the job and reschedule it to different periods via SM36
    Best of luck,
    Rgds, Derrick

  • Can we schedule DI jobs in crontab?

    Hi All,
    I have one dought ,Can we schedule DI jobs in Crontab.if 'yes' then how?
    pls give me some suggestion.
    Thanks-Rajeev khokhar

    if your job server is on Unix then you can use Managment Console to schedule you jobs in cron, DS uses cron to schedule jobs
    or you can export the job execution command to a script and schedule that script in cron manually

  • How can I reduce BEx Query execution time

    Hi,
    I have a question regarding query execution time in BEx.
    I have a query that takes 45 mins to 1 hour to execute in BEx analyser. This query is run on a daily basis and hence I am keen to reduce the execution time.  Are there any programs or function modules that can help in reducing query execution time?
    Thanks and Regards!

    Hi Sriprakash,
    1.Check if your cube is performance tuned: in the manage cube from RSA1 / performance tab: check if all indexes and statistics are green. Aggregate IDx should as well be.
    2.Condense your cubes regularly
    3. Evaluate the creation of an aggregate with all characteristic used in the query (RSDDV).
    4.Evaluate the creation of a "change run aggregate": based on a standalone NavAttr (without its basic char in the aggr.) but pay attention to the consequent change run when loading master data.
    5. Partition (physically) your cubes systematically when possible (RSDCUBE, menu, partitioning)
    6. Consider logical partitioning (by year or comp_code or ...) and make use of multiproviders in order to keep targets not too big...
    7.Consider creating secondary indexes when reporting on ODS (RSDODS)
    8.Check if the query runtime is due the master data read or the infoprovider itself, or the OLAP processor and/or any other cause in tx ST03N
    9.Consider improving your master reads by creating customized IDX (BITMAP if possible and depending on your data) on master data table and/or attribute SIDs when using NAvs.
    10.Check that your basis team did a good job and have applied the proper DB parameters
    11.Last but not least: fine tune your datamodel precisely.
    hope this will give you an idea.
    Cheers
    Sunil

  • Sql Server Agent Job Execution

    Hi All,
    I want to run a sql agent job (one job is execution one package) in such a way that as soon as job1 completes , it should be run again (without any time loss)
    I am folowing Below approach:
    Job 1 has 2 steps , in both the steps I am calling same package to execute . After that on Success/Failure action. I am selecting the same step.it is running in an infinite loop and continue fetching data.
    is there any dis-advantages on the above approach?
    Is there any other approach to achive the Same?
    Thanks in Advance....

    Hello,
    The two-step recursive (on success) technique should be fine.  I would just recommend the introduction of short-circuit”techniques that stops a runaway job in the event of logical issues (the “on failure” action will still catch the general error issues).
    Other patterns that are sometimes used for continual-execution requirements:
    Service Broker (for example, continually watch the queue and act on new messages)
    T-SQL home-grown job that runs in a loop and then executes the job based on some condition – and would require you to check job execution state
    For a continuously running package watching for new files in a folder, one example is detailed in the following blog post:
    Continuously watching files with WMI Event Watcher Task
    Best Regards, Joe Sack, MVP, SQL MCM | SackHQ.com

  • Enable server group in BPC job execution

    Dear Experts
    [Note 1476057 - Enable server group in BPC job execution|https://websmp130.sap-ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=0001476057&nlang=E]
    After upgrade, the server group logic will be :
    1, Create a correct server group with server assigned,
        job will be executed in specified server group;
    2, Create a server group without server assigned,
         job will be successfully submitted to BW,
         but will not be executed until server is assigned to the server group;
    3, Incorrectly specify a server group in web admin,
         client will get error message when run package.
    As I understand the group server is defined in BW Server. Where should I specify this group server in BPC. I could not find the parameter in BPC Web Admin - Appset Parameters or BPC Server (.Net Server) - Server Options.
    Appreciate if somebody can help ?
    Thanks
    Ashish
    Edited by: Ashish Narway on Oct 14, 2010 2:55 PM

    HI John,
    The group settings in WGM SL and Leopard are different.
    Yes, they are. I booted to my eval copy of SL Server and ran through the settings in WGM, Server Admin and Server Preferences; as you pointed out, all the mail list admin tools I could find are in the Mail service in Server Admin.
    The only thing that may be of interest that I could find is that for the group mail list, the email address for the group is group_shortname@ServerDNSname, not groupshortname@yourdomain (this is in the Mail Services Admin Guide for 10.6). This might explain why your email to the group may have been rejected?
    -Doug

  • Stopping Mapping Program Execution.

    Hi all,
    How can I stop execution of a message mapping program based on some condition in mapping?
    Is here java code sample I can use in this?
    Please help me.
    -kanth.

    Hi,
    could you have a look at the following thread please?
    Re: XPATH and Receiver Determination
    thanks,
    kanth.
    Message was edited by:
            sri kanth

  • Can I stop the event to add an entry with the event et_FORM_DATA_ADD???

    My problem is when i add a record , for example a BusinessPartner. I want to stop the event  et_FORM_DATA_ADD  when not comply  a condition.This is my code:
    Private Sub SBO_Application_FormDataEvent) Handles SBO_Application.FormDataEven
    Dim IC As SAPbobsCOM.BusinessPartners
    If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And  BusinessObjectInfo.BeforeAction = False Then
          Select Case BusinessObjectInfo.Type
          Case 2 // BusinessPartners
                IC = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
                IC.Browser.GetByKeys(BusinessObjectInfo.ObjectKey)
                Dim ZP As String = IC.ZipCode
                if ZP  = "99999"
                  // STOP. I Dont want to add this record.how can stop it??    
                 End if
    End if
    Thanks.

    Hi Edy;
    From what my understanding is that you want to stop this Add event if the user type in something wrong in the form.Is this correct ? if so, can you tell me which field ? maybe I can help you with some code.
    Remember the code:
    If BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD And BusinessObjectInfo.BeforeAction = True Then
    IC = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
    IC.Browser.GetByKeys( BusinessObjectInfo.ObjectKey )
    //open Form1
    oXmlDoc.Load(NameForm)
    creationPackage = SBO_Application.CreateObject   (SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    creationPackage.XmlData = oXmlDoc.InnerXml
    oForm1 = SBO_Application.Forms.AddEx(creationPackage)
    dim Class as NewClass = new (oForm1 ,IC)
    // STOP. I Dont want to add this record until the Form1 get me a value. This value I have to selected from a Grid on the Form1, so until I select it I can't continue with the execution, because I need to assign to the IC
    // assign to the IC the Value
    IC.UserFields.Fields().Item("UserField").Value = Class.Value  
    End if
    Thank you very much Edy

Maybe you are looking for

  • NO Wireless for my iPad Air

    Eight hours of trying, but still no wireless. I am ready to give up. I have read several posts, and I have tried everything: 1. Shut off my Netgear router/restarted it 2. Reset settings on my iPad Air 3. Used airplane mode to turn off wireless before

  • I keep getting error message when trying to convert a pdf to a word doc

    I keep getting an error message when ttying to convert pdf to word.

  • Resizing by pixel and placing in Illustrator

    Hello: Complete newbie here, please have mercy. I am resizing a very large jpg image from 1544x1024 px to 170x113px using PS CS3.  When I then place the image in Illustrator the image only fills 40x17px.  I have tried saving the image as a jpg & psd

  • Tax calculation in SC

    Hi Experts ,         I have a problem, when i am creating shopping cart by using BBP_PD_SC_CREATE.In FM ,I have sent the all the header and table parameters then suceessfully created a shopiing cart.In table parameters tab(I_TAX) also sent the data (

  • Anyone else having trouble exporting the grid effect to QuickTime?

    Other transition effects convert to QuickTime correctly but grid is a mess! The black grid background does not show up and the different slides appear oversize and overlap. Any ideas? I'm using a theme from Keynote Theme Park with photo cutouts. Powe