Jobs running since 4 hours

Hi,
from dba_jobs_running table how can I find the jobs running since 4 hours ego ?
SELECT count(*) from dba_jobs_running where THIS_DATE-SYSDATE < 4 hours
DBA_JOBS_RUNNINGDBA_JOBS_RUNNING lists all jobs that are currently running in the instance.
Column Datatype NULL Description
SID NUMBER  
JOB NUMBER   
FAILURES NUMBER   
LAST_DATE DATE   
LAST_SEC VARCHAR2(8)  
THIS_DATE DATE   Date that this job started executing.
THIS_SEC VARCHAR2(8)   
INSTANCE NUMBER  Thank for help.

Hi
Have you tried this?
SELECT *
FROM dba_jobs_running
WHERE this_date <= SYSDATE - INTERVAL '4' HOURCheers
Ben
http://www.munkyben.wordpress.com
Don't forget to mark replies helpful or correct ;)

Similar Messages

  • A job I have seen was running since 11 hours but in history its duration is 48 minutes only

    SQL Server agent 2008 :
    A job I have seen was running since 11 hours but in history its duration is 48 minutes only.is It possible.
    Thanks

    Check all the steps and how much time each step took...
    SELECT sj.name
    , sja.*
    FROM msdb.dbo.sysjobactivity AS sja
    INNER JOIN msdb.dbo.sysjobs AS sj ON sja.job_id = sj.job_id
    WHERE sja.start_execution_date IS NOT NULL
    AND sja.stop_execution_date IS NULL
    http://thomaslarock.com/2012/10/how-to-find-currently-running-long-sql-agent-jobs/
    Raju Rasagounder Sr MSSQL DBA

  • The latest update is running since 2 hours

    The latest update is running since 2 hours. The actual information is: step 7 and 99% finished.
    The aperture libary is about 80 GB. Should I still wait or seems it to be a failure?

    To repair you library quit Aperture (or Force Quit, if necessary), then launch it again, while firmly pressing down the options- and the command key combination (⌥⌘). This will bring up the Aperture Library First Aid panel. Try first "Repair Permissions", then if necessary "Repair Database".

  • EU_CLONE_MIG_DT_PRP running since 7 hours -

    Hello Experts ,
    We are migrating our ECC system from Oracle to HANA DB using DMO - but the mentioned phase 57.6 % done (in phase: MAIN_SHDIMP/SUBMOD_MIG_UPTIME_PRP/EU_CLONE_MIG_DT_PRP)  is running since 7 hours with no update in the logs.
    Last log updated was EUMIGRATEDTPRP and there are no errors written in it.
    Few lines from the log are :
    3 ETQ123 20150113065919 (2): PID 9164 exited with status 0 (time 0.000 real)
    1 ETQ399 Got 18 split conditions for table 'PCL4' in 'h:\DMO_E\SUM\SUM\abap\migrate_dt\MIGRATE_DT_PRP0003_SPLIT.WHR' - adding to cache.
    3 ETQ123 20150113072306 (1): PID 3656 exited with status 0 (time 0.000 real)
    1 ETQ399 Got 4 split conditions for table 'PPOIX' in 'h:\DMO_E\SUM\SUM\abap\migrate_dt\MIGRATE_DT_PRP0011_SPLIT.WHR' - adding to cache.
    Our environment is as followed :
    Source ECC6 Ehp5 702 on Oracle.
    Target  ECC6 Ehp7 740 on HANA.
    SUM SP12 PL02
    What checks i can perform to ensure if the phase is running properly ?
    What can i do to speed up the process.?
    My CPU usage is 15% only and CPU usage is 5%.
    Thanks
    Dev

    Hi Dev,
    indeed this phase may take long, depending also on the performance of the source database.
    You should check whether there are still processes running, esp. SAPuptool.
    The number of R3load uptime processes is relevant for this phase. It can be adapted via browser, see section 4.2.2 "Changing processing parameters during runtime" in the DMO documentation.
    Best regards, Boris

  • Migration pc to mac runs since 24 hours! What shall i do?

    I bought a new Macbook pro an dwant to migrate from pc to mac.
    I connected pc and MBP by LAN.
    Started the migration soft ware on both, controle number was OK.
    Now the programm runs still 24 hours looking for documents andnothing happens.
    What shall i do ?
    Cancel ?
    I bought a time capsule at the same time.
    Shall i try to use time capsule for migration ?

    Stop what you are doing and see Pondinis Excellent advise here...
    Setting-up a new Mac from an old one, its backups, or a PC
    Using Migration Assistant on Lion
    Migration Assistant tips and tricks

  • DELETE is running since

    Hi,
    on 10g R2 on Win 2003
    I issues a DELETE sql command. It is running since 6 hours ego. How to see if the rows are being deleted ? Obviously I can not see from another session (by select count(*) from mytable ) every 30 minutes or ... because there is no commit yet.
    Do you have any suggestion ?
    thank you.

    >
    I issues a DELETE sql command. It is running since 6 hours ego.
    Do you have any suggestion ?
    >
    How many records are being deleted?
    How many records are there in the table.
    If you are deleting a high percentage of the records it can be quicker to:
    1. query and save the records you want to keep (CREATE TABLE saveData AS SELECT * FROM myTable WHERE . . .
    2. truncate the table
    3. put the saved records back
    a. ALTER TABLE myTable NOLOGGING
    b. INSERT /*+ APPEND */ INTO myTable SELECT * FROM saveData
    c. ALTER TABLE myTable LOGGING
    d. DROP TABLE saveData

  • Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up

    Ever since the systyem upgraded me to 3.6.6. I can not even run one eight hour day without firefoc either crashing or locking up which requires me use C/A/Deleate to close the program. I used to be able to run 8 to 12 windows at a time and NEVER lock up or crash with the older version. Is this problem being looked into and or being corrected. I use Firefox with Google and my system is XP Pro 32 bit. THIS IS REALLY making me MAD. My email is [email protected] and would appreciate a response to this ASAP. I have tried a couple of items from your help section and nothing works.

    <u>'''Anonymous'''</u>
    Please post a separate question. Thank you. https://support.mozilla.com/tiki-ask_a_question.php?locale=en-US&forumId=1
    <u>'''chris'''</u>
    <u>'''''Crashing'''''</u>
    See:
    http://support.mozilla.com/en-US/kb/Firefox+crashes
    http://kb.mozillazine.org/Firefox_crashes
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+loading+certain+pages
    http://support.mozilla.com/en-US/kb/Firefox+crashes+when+you+open+it
    http://support.mozilla.com/en-US/kb/Firefox+will+not+start
    http://kb.mozillazine.org/Browser_will_not_start_up
    ''<u>'''Hanging'''</u>''
    See: http://support.mozilla.com/en-US/kb/Firefox+hangs
    <u>'''''Hanging at exit'''''</u>
    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    ''<u>'''Safe Mode'''</u>''
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.
    <u>'''chris'''</u>
    <u>'''''Other Issues'''''</u>: ~~red:You have installed plug-ins with known security issues. You should update them immediately.~~
    <u>'''Update Java'''</u>: your ver. 1.6.0.~~red:17~~; current ver. 1.6.0.20 (<u>important security update 04-15-2010</u>)
    (Firefox 3.6 and above requires Java 1.6.0.10 or higher; see: http://support.mozilla.com/en-US/kb/Java-related+issues#Java_does_not_work_in_Firefox_3_6 )
    ''(Windows users: Do the manual update; very easy.)''
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates Updating Java]'''
    Do the update with Firefox closed.
    <u>'''NOTE:'''</u> Java version 1.6.0.21 has been released. It is mainly an update for developers of Java applications and most users do not need to be concerned about downloading version 1.6.0.21. <u>'''''At this time'''''</u>, the update option in existing installations of Java 1.6.0.20 are not updating to version 1.6.0.21; <u>'''''at this time'''''</u>, it must be manually downloaded and installed. According to the Java release notes:
    ''"'''Bug Fixes'''''
    ''Java SE 6 Update 21 does not contain any additional fixes for security vulnerabilities to its previous release, Java SE 6 Update 20. Users who have Java SE 6 Update 20 have the latest security fixes and do not need to upgrade to this release to be current on security fixes."'' Source: http://java.sun.com/javase/6/webnotes/6u21.html
    <u>'''Install/Update Adobe Flash Player for Firefox (aka Shockwave Flash)'''</u>: your ver. 10.0 r~~red:45~~; current ver. 10.1 r53 ('''important security update 2010-06-10'''; see: http://www.adobe.com/support/security/bulletins/apsb10-14.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: '''[http://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash Updating Flash]'''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    -exit Firefox (File > Exit)
    -''<u>In Windows,</u>'' check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -''<u>In Windows,</u>'' double-click on the Adobe Flash installer you just downloaded to install/update Adobe Flash
    -when the Flash installation is complete, start Firefox, and test the Flash installation here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&sliceId=1
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version of Flash. To install/update the IE ActiveX Adobe Flash Player, same instructions as above, except use IE to download the ActiveX Flash installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Flash ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]
    <u>'''Update Shockwave for Director (aka Shockwave Player)'''</u>: your ver. ~~red:10.1 (very old)~~; current ver. 11.5.7.609 (<u>important security update released 2010-05-11</u>; see http://www.adobe.com/support/security/bulletins/apsb10-12.html)
    NOTE: this is not the same as Shockwave Flash; this installs the Shockwave Player.
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    SAVE the installer to your hard drive (Desktop is a good place so you can find it). When the download is complete, exit Firefox (File > Exit), locate and double-click in the installer you just downloaded, let the install complete.
    See: '''[http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox#_Installing_Shockwave Installing Shockwave]'''
    <u>'''You '''</u>~~red:<u>'''MAY'''</u>~~<u>''' need to Update Adobe Reader for Firefox (aka Adobe PDF Plug-In For Firefox)'''</u>: your ver. N/A; current ver. 9.3.3 (important security update release 06-29-2010; see: http://www.adobe.com/support/security/bulletins/apsb10-15.html)
    ~~red:Check your version here~~: http://www.mozilla.com/en-US/plugincheck/
    See: http://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox#Installing_and_updating_Adobe_Reader
    ''<u>You may be able to update from the Adobe Reader installed on your system</u>'' instead of going to the Adobe site and downloading. Open the Adobe Reader installed on your system (''in Windows, Start > Program Files, find and click Adobe Reader to open''), click Help, click Check for Updates.
    ''<u>If you go to the Adobe site to download the current Adobe Reader:</u>''
    -'''<u>use Firefox to download</u>''' and <u>'''SAVE to your hard drive'''</u> (save to Desktop for easy access)
    ~~red:-See the images at the bottom left of this post to see the steps to take on the Adobe site~~
    -exit Firefox (File > Exit)
    -In Windows: check to see that Firefox is completely closed (''Ctrl+Alt+Del, choose Task Manager, click Processes tab, if "firefox.exe" is on the list, right-click "firefox.exe" and choose End process, close the Task Manager window'')
    -In Windows: double-click on the Adobe Reader installer you just downloaded to install/update Adobe Reader
    *<u>'''NOTE: On Vista and Windows 7'''</u> you may need to run the plugin installer as Administrator by starting the installer via the right-click context menu if you do not get an UAC prompt to ask for permission to continue (i.e nothing seems to happen). See this: http://vistasupport.mvps.org/run_as_administrator.htm
    *'''<u>NOTE for IE:</u>''' Firefox and most other browsers use a Plugin. IE uses an ActiveX version. To install/update the IE ActiveX version, same instructions as above, except use IE to download the ActiveX installer. See: [[ActiveX]]
    *Also see: http://kb.mozillazine.org/Adobe_Reader ~~red:'''''AND'''''~~ [[How do I edit options to add Adobe to the list of allowed sites]]

  • Background Job Running long time in Production system ???

    Hi guys,
    I have custom report which runs normally in 20 minutes.  i am executing this report every day.  but when i execute the same report yesterday it took 5 hours.
    i did the performance trace ....the sql statements are in acceptable range only. i don't see any major time consumption. 
    since it's in production system  we can't debug the active job....
    can u guys, throw light on this issue.
    Note : there are many posts related to this already in the forum, but not helps to resolve my issue.
    Regards
    Girish

    Giri,
    You can use STAD (or older one SE30) to have a trace of the program if you have that access and will be a great help in finding the problem.
    If you can't due to some reason, then next time job runs for long (while in ACTIVE state), check SM50 regularly to see that the is process hanging on a table fetch, check that any of the DB table is not getting frequent locks in SM12.
    Also, you should check that if your job does any table update, is there any new index created in prod system for that table.
    If you can't find anything, then take the necessary access in Prod from basis temporarily and debug the job to find exact issue.
    Regards,
    Diwakar

  • EIMAdaptiveProcessingService is unreponsive and Dataservice job run slow down

    Hi all,
    I have a BO DS 4.0 SP3 installed on Win SQL Server 2008 R2 and IPS 4.0.
    The CPU is Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz 2.19 GHz(4 processors) with 16GB RAM.
    Since several weeks, the new DS job run in the production. the job run sometimes during 1hour and sometimes during 5hours.
    when it run more than 2 hours, we find BODS service do nothing during serval hours. I found there is some errors "WebIntelligenceProcessingServer' is being marked as down because it is unresponsive" in the event viewer.
    The AdaptiveProcessingService as below:
    GC: [4612]  03:39:34    Suspiciously long running GC (turn this off via -XX:-DumpGCStatisticForLongGCs or change the time threshold via -XX:LongGCTime=<time in seconds>):
    GC: [4612]  03:39:34    GC Nr.                                : 58
    GC started                            : Tue May 20 03:37:35 2014
    Nr. of full GCs                       : 5
    GC algorithm                          : -XX:+UseParallelGC
    Reason                                : Allocation Failure
    Type                                  : partial
    Forced SoftRef clearing               : no
    Duration                              : 119471.03 ms
    Cumulative duration                   : 123392.10 ms
    CPU time                              : 78.00 ms
    Cumulative CPU time                   : 7878.03 ms
    Page faults during GC                 : 15
    Cumulative page faults during GCs     : 94406
    Allocation goal                       : 48 B (48)
    Used in Java heap before GC           : 223.57 MB (234431584)
    Used in Java heap after GC            : 110.65 MB (116024464)
    Bytes freed in Java heap during GC    : 112.92 MB (118407120)
    Committed in Java heap before GC      : 336.31 MB (352649216)
    Committed in Java heap after GC       : 313.56 MB (328794112)
    Bytes decommitted in Java heap        : 22.75 MB (23855104)
    Nr. of unloaded classes               : 0
    Nr. of non-array classes before GC    : 8580
    Nr. of non-array classes after GC     : 8580
    Nr. of array classes before GC        : 574
    Nr. of array classes after GC         : 574
    Cumulative unloaded non-array classes : 32
    Cumulative unloaded array classes     : 0
    Used in eden before GC                : 113.13 MB (118620160), 100.00% of committed, 33.14% of young gen max
    Used in eden after GC                 : 48 B (48),  0.00% of committed,  0.00% of young gen max
    Bytes freed in eden                   : 113.12 MB (118620112), 33.14% of young gen max
    Committed in eden before GC           : 113.13 MB (118620160), 33.14% of young gen max
    Committed in eden after GC            : 113.13 MB (118620160), 33.14% of young gen max
    TLAB waste in eden space before GC    : 15.48 MB (16228992), 13.68% of used in eden
    Used in 'from' space before GC        : 2.31 MB (2424880),  9.74% of committed,  0.68% of young gen max
    Used in 'from' space after GC         : 2.41 MB (2523184), 98.72% of committed,  0.71% of young gen max
    Bytes freed in 'from' space           : -96.00 kB (-98304), -0.03% of young gen max
    Committed in 'from' space before GC   : 23.75 MB (24903680),  6.96% of young gen max
    Committed in 'from' space after GC    : 2.44 MB (2555904),  0.71% of young gen max
    Used in 'to' space before GC          : 0 B (0),  0.00% of committed,  0.00% of young gen max
    Used in 'to' space after GC           : 0 B (0),  0.00% of committed,  0.00% of young gen max
    Bytes added in 'to' space             : 0 B (0),  0.00% of young gen max
    Committed in 'to' space before GC     : 25.31 MB (26542080),  7.42% of young gen max
    Committed in 'to' space after GC      : 23.88 MB (25034752),  7.00% of young gen max
    Max in young gen                      : 341.31 MB (357892096)
    Used in young gen before GC           : 115.44 MB (121045040), 33.82% of max
    Used in young gen after GC            : 2.41 MB (2523232),  0.71% of max
    Bytes freed in young gen              : 113.03 MB (118521808), 33.12% of max
    Committed in young gen before GC      : 136.88 MB (143523840), 40.10% of max
    Committed in young gen after GC       : 115.56 MB (121176064), 33.86% of max
    Tenuring threshold                    : 15
    Max in old gen                        : 682.69 MB (715849728)
    Used in old gen before GC             : 108.13 MB (113386544), 62.10% of committed, 15.84% of max
    Used in old gen after GC              : 108.24 MB (113501232), 62.16% of committed, 15.86% of max
    Bytes freed in old gen                : -112.00 kB (-114688), -0.02% of max
    Committed in old gen before GC        : 174.13 MB (182583296), 25.51% of max
    Committed in old gen after GC         : 174.13 MB (182583296), 25.51% of max
    Max in perm gen                       : 256.00 MB (268435456)
    Used in perm gen before GC            : 60.30 MB (63226432), 65.14% of committed, 23.55% of max
    Used in perm gen after GC             : 60.30 MB (63226432), 65.14% of committed, 23.55% of max
    Bytes freed in perm gen               : 0 B (0),  0.00% of max
    Committed in perm gen before GC       : 92.56 MB (97058816), 36.16% of max
    Committed in perm gen after GC        : 92.56 MB (97058816), 36.16% of max
    Bytes allocated in non-perm until now : 6.77 GB (7273341072)
    Bytes freed in non-perm until now     : 6.67 GB (7160953417)
    Bytes allocated in perm until now     : 60.45 MB (63388408)
    Bytes freed in perm until now         : 176.66 kB (180899)
    Nr. of soft refs cleared until now    : 1754
    Nr. of soft refs enqueued until now   : 61
    Nr. of weak refs cleared until now    : 48369
    Nr. of weak refs enqueued until now   : 47736
    Nr. of final refs enqueued until now  : 52559
    Nr. of phantom refs enqueued until now: 0
    Number of parallel scavenge threads   : 4
    Nr. of GC events                      : 3
    GC Event Nr.                          : 1
    GC event name                         : Young generation reference handling
    Event start time                      : Tue May 20 03:39:34 2014
    Duration                              : 12.36 ms
    CPU time                              : 15.60 ms
    Page faults during event              : 0
    Max last used time (ms) of SoftRefs   : 70000
    Nr. of SoftRefs found                 : 35
    Nr. of SoftRefs kept alive by policy  : 20
    Nr. of dead SoftRefs cleared          : 15
    Nr. of dead SoftRefs not cleared      : 0
    Nr. of live SoftRefs                  : 20
    Nr. of SoftRefs newly enqueued        : 1
    Nr. of new alive SoftRefs found       : 0
            during SoftRef handling
    Nr. of new alive WeakRefs found       : 0
            during SoftRef handling
    Nr. of new alive FinalRefs found      : 0
            during SoftRef handling
    Nr. of new alive PhantomRefs found    : 0
            during SoftRef handling
    Nr. of WeakRefs found                 : 1193
    Nr. of dead WeakRefs                  : 1192
    Nr. of live WeakRefs                  : 1
    Nr. of WeakRefs newly enqueued        : 1185
    Nr. of FinalRefs found                : 1121
    Nr. of live FinalRefs                 : 21
    Nr. of FinalRefs newly enqueued       : 1100
    Nr. of new alive SoftRefs found       : 0
            during FinalRef handling
    Nr. of new alive WeakRefs found       : 0
            during FinalRef handling
    Nr. of new alive FinalRefs found      : 0
            during FinalRef handling
    Nr. of new alive PhantomRefs found    : 0
            during FinalRef handling
    Nr. of PhantomRefs found              : 1
    Nr. of live PhantomRefs               : 1
    Nr. of PhantomRefs newly enqueued     : 0
    Nr. of new alive SoftRefs found       : 0
            during PhantomRef handling
    Nr. of new alive WeakRefs found       : 0
            during PhantomRef handling
    Nr. of new alive FinalRefs found      : 0
            during PhantomRef handling
    Nr. of new alive PhantomRefs found    : 0
            during PhantomRef handling
    Soft reference handling duration      : 0.01 ms
    Soft reference handling CPU time      : 0.00 ms
    Weak reference handling duration      : 0.47 ms
    Weak reference handling CPU time      : 0.00 ms
    Final reference handling duration     : 11.67 ms
    Final reference handling CPU time     : 15.60 ms
    Phantom reference handling duration   : 0.01 ms
    Phantom reference handling CPU time   : 0.00 ms
    JNI weak reference handling duration  : 0.16 ms
    JNI weak reference handling CPU time  : 0.00 ms
    GC Event Nr.                          : 2
    GC event name                         : Parallel scavenge (young generation GC)
    Event start time                      : Tue May 20 03:37:35 2014
    Duration                              : 119470.94 ms
    CPU time                              : 78.00 ms
    Page faults during event              : 15
    Used in eden before event             : 113.13 MB (118620160)
    Used in eden after event              : 0 B (0)
    Freed in eden                         : 113.13 MB (118620160)
    Used in 'from' space before event     : 2.31 MB (2424880)
    Used in 'from' space after event      : 2.41 MB (2523184)
    Freed in 'from' space                 : -96.00 kB (-98304)
    Used in 'to' space before event       : 0 B (0)
    Used in 'to' space after event        : 0 B (0)
    Added in 'to' space                   : 0 B (0)
    Used in young generation before event : 115.44 MB (121045040)
    Used in young generation after event  : 2.41 MB (2523184)
    Freed in young generation             : 113.03 MB (118521856)
    Used in old generation before event   : 108.13 MB (113386544)
    Used in old generation after event    : 108.24 MB (113501232)
    Freed in old generation               : -112.00 kB (-114688)
    Used in perm generation before event  : 60.30 MB (63226432)
    Used in perm generation after event   : 60.30 MB (63226432)
    Freed in perm generation              : 0 B (0)
    System load average                   : 0.03, 0.03, 0.64
    Promotion failed                      : no
    Number of successful steal operations : 123
    Number of failed steal operations     : 4
    Number of failed steals and yields    : 0
    Size of 'to' space PLAB (per thread)  : 32.00 kB (32768 bytes)
    Objects of age  0                     : 22228, 1.02 MB (1071744 bytes)
    Objects of age  1                     : 4917, 188.57 kB (193096 bytes)
    Objects of age  2                     : 3006, 100.47 kB (102880 bytes)
    Objects of age  3                     : 1775, 147.48 kB (151016 bytes)
    Objects of age  4                     : 2384, 71.31 kB (73024 bytes)
    Objects of age  5                     : 2362, 65.82 kB (67400 bytes)
    Objects of age  6                     : 3254, 107.34 kB (109912 bytes)
    Objects of age  7                     : 1972, 56.80 kB (58168 bytes)
    Objects of age  8                     : 2720, 83.50 kB (85504 bytes)
    Objects of age  9                     : 2210, 62.80 kB (64312 bytes)
    Objects of age 10                     : 2646, 81.98 kB (83944 bytes)
    Objects of age 11                     : 1863, 59.31 kB (60736 bytes)
    Objects of age 12                     : 2751, 110.47 kB (113120 bytes)
    Objects of age 13                     : 2419, 67.50 kB (69120 bytes)
    Objects of age 14                     : 2872, 92.19 kB (94400 bytes)
    Objects of age 15                     : 2766, 95.27 kB (97552 bytes)
    Objects of age 16                     : 0, 0 B (0 bytes)
    Objects of age 17                     : 0, 0 B (0 bytes)
    Objects of age 18                     : 0, 0 B (0 bytes)
    Objects of age 19                     : 0, 0 B (0 bytes)
    Objects of age 20                     : 0, 0 B (0 bytes)
    Objects of age 21                     : 0, 0 B (0 bytes)
    Objects of age 22                     : 0, 0 B (0 bytes)
    Objects of age 23                     : 0, 0 B (0 bytes)
    Objects of age 24                     : 0, 0 B (0 bytes)
    Objects of age 25                     : 0, 0 B (0 bytes)
    Objects of age 26                     : 0, 0 B (0 bytes)
    Objects of age 27                     : 0, 0 B (0 bytes)
    Objects of age 28                     : 0, 0 B (0 bytes)
    Objects of age 29                     : 0, 0 B (0 bytes)
    Objects of age 30                     : 0, 0 B (0 bytes)
    Objects of age 31                     : 0, 0 B (0 bytes)
    GC Event Nr.                          : 3
    GC event name                         : Skipped parallel scavenge (young generation GC)
    Event start time                      : Tue May 20 03:39:34 2014
    Reason to skip GC                     : Too much time spend in GC
    Thanks for your help
    Xin

    Hello Xin SUN,
    Try checking whether any other database application running at the back end.
    when that particular job is running see the CPU usage, if it is high try to find which process takes lot of memory.

  • Background Jobs running for long time.

    Dear All,
    I had done the Homogeneous System Copy on my ECC 6 QA System successfully by restoring the offline backup of Production system. My system is up & running but  I have some Performace issues in the system. I also observed that some jobs are running since long time & most commonly i got the below line in the BGD Trace "WP has reached abap/heaplimit = 40000000 bytes".
    I search for the notes but couldn't find anything.
    Please help me to resolve this issue.
    Below is the Trace :-
    trc file: "dev_w7", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ
    M sysno      12
    M sid        UBQ
    M systemid   370 (Solaris on SPARCV9 CPU)
    M relno      7000
    M patchlevel 0
    M patchno    52
    M intno      20050900
    M make:      single threaded, Unicode, 64 bit, optimized
    M pid        16335
    M
    M
    M Mon Nov 10 19:01:10 2008
    M  kernel runs with dp version 210000(ext=109000) (@(#) DPLIB-INT-VERSION-210000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ThInit: running on host UBSQAS
    M  calling db_connect ...
    C  Client NLS settings: AMERICAN_AMERICA.UTF8
    C  Logon as OPS$-user to get SAPSR3's password
    C  Connecting as /@UBQ on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1 0x1067f1be0 0x1067f96a0 0x106809e38
    C  Attaching to DB Server UBQ (con_hdl=0,svchp=0x106809d68,svrhp=0x10680c0b8)
    C  Starting user session (con_hdl=0,svchp=0x106809d68,srvhp=0x10680c0b8,usrhp=0x1067f9eb8)
    C  Now '/@UBQ' is connected (con_hdl 0, nls_hdl 0).
    C  Got SAPSR3's password from OPS$-user
    C  Disconnecting from connection 0 ...
    C  Closing user session (con_hdl=0,svchp=0x106809d68,usrhp=0x1067f9eb8)
    C  Now I'm disconnected from ORACLE
    C  Connecting as SAPSR3/<pwd>@UBQ on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1 0x1067f1be0 0x1067f96a0 0x106809e38
    C  Starting user session (con_hdl=0,svchp=0x106809d68,srvhp=0x10680c0b8,usrhp=0x1067f9eb8)
    C  Now 'SAPSR3/<pwd>@UBQ' is connected (con_hdl 0, nls_hdl 0).
    C  Database NLS settings: AMERICAN_AMERICA.UTF8
    C  Database instance UBQ is running on UBSQAS with ORACLE version 10.2.0.2.0 since 20081109
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20081110 190110 UBSQAS
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip
    I  MtxInit: 7 0 0
    M  SHM_PRES_BUF###(addr: 0xffffffff6c400000, size: 4400000)
    M  SHM_ROLL_AREA##(addr: 0xfffffffe56000000, size: 134217728)
    M  SHM_PAGING_AREA##(addr: 0xfffffffe50000000, size: 67108864)
    M  SHM_ROLL_ADM###(addr: 0xffffffff7000a000, size: 2672386)
    M  SHM_PAGING_ADM##(addr: 0xffffffff77a00000, size: 656416)
    M  ThCreateNoBuffer##allocated 572152 bytes for 1000 entries at 0xfffffffe48004000
    M  ThCreateNoBuffer##index size: 3000 elems
    M  ThCreateVBAdm##allocated 12176 bytes (50 server) at 0xffffffff77900000
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 7 initializing ....
    X  Using implementation std
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 7, WP_CNT = 12, CON_ID = -1
    B  dbtbxbuf: Buffer TABL  (addr: 0xfffffffe42000100, size: 30000000, end: 0xfffffffe43c9c480)
    B  dbtbxbuf: Buffer TABLP (addr: 0xffffffff6b800100, size: 10240000, end: 0xffffffff6c1c4100)
    B  dbexpbuf: Buffer EIBUF (addr: 0xffffffff65800108, size: 4194304, end: 0xffffffff65c00108)
    B  dbexpbuf: Buffer ESM   (addr: 0xffffffff65000108, size: 4194304, end: 0xffffffff65400108)
    B  dbexpbuf: Buffer CUA   (addr: 0xfffffffe4b01e108, size: 3072000, end: 0xfffffffe4b30c108)
    B  dbexpbuf: Buffer OTR   (addr: 0xffffffff64800108, size: 4194304, end: 0xffffffff64c00108)
    M  rdisp/reinitialize_code_page -> 0
    M  icm/accept_remote_trace_level -> 0
    M  rdisp/no_hooks_for_sqlbreak -> 0
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 0x106ab5bb0
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 0xfffffffe4b30e070
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 0xfffffffe4b30e548
    S    using messages for server info
    S  size of spec char cache entry: 297032 bytes (timeout 100 sec)
    S  size of open spool request entry: 2168 bytes
    S  immediate print option for implicitely closed spool requests is disabled
    A Mon Nov 10 19:01:11 2008
    A
    A     PXA
    A  PXA INITIALIZATION
    A  PXA: Fragment Size too small: 73 MB, reducing # of fragments
    A  System page size: 8kb, total admin_size: 11048kb, dir_size: 10992kb.
    A  Attached to PXA (address 0xfffffffe20000000, size 300000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A     PXA
    A
    A  ABAP ShmAdm attached (addr=0xfffffffe60590000 leng=20938752 end=0xfffffffe61988000)
    A  >> Shm MMADM area (addr=0xfffffffe6083edd0 leng=140480 end=0xfffffffe60861290)
    A  >> Shm MMDAT area (addr=0xfffffffe60862000 leng=17981440 end=0xfffffffe61988000)
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 2
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects##allocated 12676 bytes at 0xffffffff77700000
    N  SsfSapSecin: putenv(SECUDIR=/usr/sap/UBQ/DVEBMGS12/sec): ok
    N
    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is /usr/sap/UBQ/DVEBMGS12/exe/libsapsecu.so .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================
    N  =================================================
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    W    ipl_Init(): wp task type is 4:BTC, skip initialization
    W  === ipl_Init() returns 0, ITSPE_OK: OK
    W  =================================================
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.
    B
    B Mon Nov 10 19:30:28 2008
    B  dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
    B   max_blocking_factor =  15,  max_in_blocking_factor      =   5,
    B   min_blocking_factor =  10,  min_in_blocking_factor      =   5,
    B   prefer_union_all    =   0,  prefer_join                 =   0,
    B   prefer_fix_blocking =   0,  prefer_in_itab_opt          =   1,
    B   convert AVG         =   0,  alias table FUPD            =   0,
    B   escape_as_literal   =   1,  opt GE LE to BETWEEN        =   0,
    B   select *            =0x0f,  character encoding          = STD / <none>:-,
    B   use_hints           = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
    B                         rule_fae->0, concat_fae->0, concat_fae_or->0
    M  SecAudit(RsauShmInit): WP attached to existing shared memory.
    M  SecAudit(RsauShmInit): addr of SCSA........... = 0xffffffff78500000
    M  SecAudit(RsauShmInit): addr of RSAUSHM........ = 0xffffffff78500768
    M  SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 0xffffffff785007a0
    M  SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 0xffffffff785007ac
    A
    A Mon Nov 10 20:04:25 2008
    A  WP has reached abap/heaplimit = 40000000 bytes
    A
    A Tue Nov 11 02:25:41 2008
    A  generated report /1BCWDY/BSAEKROD3IX58HSBOTLJ==CP         with fingerprint 1078C98BF377F2618A7F4843DE257FC8   50556
    Tue Nov 11 02:36:40 2008
    actual OCI-type (1) of OUT-variable 0 differs from cached statement (96) ==> reparsing
    sc_p=0x10673a550,no=176,idc_p=0x106750c68,con=0,act=1,slen=149,smax=768,#vars=5,stmt=0x107ba9dc0,table=TADIR
    prep=1,lit=0,nsql=0,lobret=0,#exec=455,dbcnt=0,upsh_p=(nil),ocistmth_p=0x1073f3ec0
    IN : cols=5,rmax=1,xcnt=0,rpc=0,rowi=0,rtot=0,upto=4294967295,rsize=108,vmax=32,bound=1,iobuf_p=0x1068680e0,vda_p=0x1073f8960
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    OUT: cols=1,rmax=0,xcnt=0,rpc=0,rowi=0,rtot=0,upto=1,rsize=0,vmax=32,bound=1,iobuf_p=(nil),vda_p=0x1073f90f0
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    SELECT /*+ FIRST_ROWS  */ "OBJ_NAME" FROM "TADIR" WHERE "PGMID" = :A0 AND ( "OBJECT" = :A1 OR "OBJEC\
    T" = :A2 ) AND "OBJ_NAME" = :A3 AND ROWNUM <= :A4;
    actual OCI-type (96) of OUT-variable 0 differs from cached statement (1) ==> reparsing
    sc_p=0x10673a550,no=176,idc_p=0x106750c68,con=0,act=1,slen=149,smax=768,#vars=5,stmt=0x107ba9dc0,table=TADIR
    prep=1,lit=0,nsql=0,lobret=0,#exec=2,dbcnt=0,upsh_p=(nil),ocistmth_p=0x1073f3ec0
    IN : cols=5,rmax=1,xcnt=0,rpc=0,rowi=0,rtot=0,upto=4294967295,rsize=108,vmax=32,bound=1,iobuf_p=0x1068680e0,vda_p=0x1073f8960
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    OUT: cols=1,rmax=0,xcnt=0,rpc=0,rowi=0,rtot=0,upto=1,rsize=0,vmax=32,bound=1,iobuf_p=(nil),vda_p=0x1073f90f0
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    SELECT /*+ FIRST_ROWS  */ "OBJ_NAME" FROM "TADIR" WHERE "PGMID" = :A0 AND ( "OBJECT" = :A1 OR "OBJEC\
    T" = :A2 ) AND "OBJ_NAME" = :A3 AND ROWNUM <= :A4;
    Tue Nov 11 02:36:42 2008
    actual OCI-type (1) of OUT-variable 0 differs from cached statement (96) ==> reparsing
    sc_p=0x10673a550,no=176,idc_p=0x106750c68,con=0,act=1,slen=149,smax=768,#vars=5,stmt=0x107ba9dc0,table=TADIR
    prep=1,lit=0,nsql=0,lobret=0,#exec=3,dbcnt=0,upsh_p=(nil),ocistmth_p=0x1073f3ec0
    IN : cols=5,rmax=1,xcnt=0,rpc=0,rowi=0,rtot=0,upto=4294967295,rsize=108,vmax=32,bound=1,iobuf_p=0x1068680e0,vda_p=0x1073f8960
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    OUT: cols=1,rmax=0,xcnt=0,rpc=0,rowi=0,rtot=0,upto=1,rsize=0,vmax=32,bound=1,iobuf_p=(nil),vda_p=0x1073f90f0
          lobs=0,lmax=0,lpcnt=0,larr=(nil),lcurr_p=(nil),rret=0
    SELECT /*+ FIRST_ROWS  */ "OBJ_NAME" FROM "TADIR" WHERE "PGMID" = :A0 AND ( "OBJECT" = :A1 OR "OBJEC\
    T" = :A2 ) AND "OBJ_NAME" = :A3 AND ROWNUM <= :A4;
    Thanks,
    Shambo

    Hi Shambo
    have you checked the oracle parameters as per the sap note 830576,and also the backup which you have taken is a logical backup,in that case you have to run the update database statistics either from DB13 or BRTOOLS
    also check ST04 and also ST02 to do a  performance tuning
    I believe its more Database Parameter issue
    regards
    George Varghese

  • How to get spool from background job run?

    Hello,
    I have this situation and need help on how to resolve:
    I have RFC FM which called from another system, in that FM I am submitting BDC section as a batch job by report RSBDCSUB. The problem is that this job may run for 1 or 2 hours and my RFC call will be close by that time. How can I bring the result of my batch job run back to the calling system in this case? Will appreciate any hints.
    Thank you,
    Glenn

    Hi
    After you the Job completes. Use the spool ID and fetch the Spool list using the report RSPOLST2.
    You can download the spool job using the Function module RSPO_DOWNLOAD_SPOOLJOB.
    Thanks
    Dev

  • How to make a job run on a appointed node

    I have a problem. The database is Oracle 10g, RAC, two nodes
    There are some job which run on everyday night. Now, something happened, the job run on Node A can't work as normal, but if run on node B, It will work well.
    so I just want to submit the jobs on Node B, I submited the jobs on Node B, but the jobs always run on Node A.
    I want to know how to make a job run on a appointed node.

    the Job just transfer some procedure to add partitions for some table, to merge the records from some tables to one table and so on.
    the problem is when the job run on Node A, it is very very slow, the procedure would run hours and not success end, but if on Node B it will successfully end in seconds.
    restart the Node A would be a way for the problem, but may it will leave a hidden trouble. I want save the scene to find out the problem
    so can you help me

  • Background Job  running long time.

    Hello All,
    One of customer background job running for long time more than 11 hours, but usually this jobs get completed within 4 hrs.
    I have checked in WP trace file, it shows "WP has reached abap/heaplimit=40000000".
    This is the Value I can see in RZ11. Now it is not possible to change the value.
    Frequently facing this problem, please guide me to solve this issue.
    Regards
    Vinay.

    Hi
    First of all, abap/heaplimit is the limit of memory usage by a WP.
    Follwing is the documentation from help.sap.com
    The value of the parameter should be between 10000000 (10 MB) and 2000000000 (2GB), the recommended default setting is 40000000 (40 MB).
    The objective is to have the least number of work process restarts as possible, without a swap space bottleneck occurring.  The heap memory allocated by the work processes has to be released again.
    As shown in the graphic, the value of abap/heaplimit should be smaller than abap/heap_area_dia or abap/heap_area_nondia, so that the dialog step that is running can still be executed. This prevents the work process from working against the operating systemu2019s swap space limit if there is a programmed termination of the work process.
    So,Do the above checks. And importantly check the memory utilizations at the time of running your job and check whether any other job was also running at the sametime.
    Increasing the parametes is not a good idea.. If you continuously face this issue then only think of parametes. As u said ,this problem is not happenng too often.
    Hope this is useful

  • Background job running for a long time - trace is not capturing.

    hi guys,
    My background job runs for more thatn 4 hours.  some times. (normally it completes withing one hour)
    i tried to trace using st12 ....and executed this program. but not got complete trace report of 4 hours.
    what is the best way to trace long running programs like this.
    is there any alternative for this...???
    regards
    girish

    Giri,
    There is no need to trace a program for the full 4 hours. There is usually just one piece of rogue code causing the problem, and it can be identified quite quickly.
    If I were you I would just watch the job run via SM50, to see if it lingers on any database tables. Also check if the memory is filling up - this is the sign of a memory leak.
    You can also try stopping the program (via SM50 debugging) at random points, to see what piece of code it is stuck in.
    The issue should reveal itself fairly quickly.
    Tell us what you find!
    cheers
    Paul

  • How to kill Forms Runaway Process using 95% CPU and running for 2 hours.

    We had a situation at E-Business Suite customer (using Oracle VM server) where some of Form processes were not being cleared by form timeout settings automatically.
    Also when user exits the form session from front end, the linux form process (PID) and DB session did not exit properly, so they got hung.
    They were spiking CPU and memory usage and causing e-business suite to perform slowely and ultimately causing VM host to reboot the production VM guest (running on Linux).
    We could see the form processes (PIDs) using almost 100% cpu with "top" command and running for a long time.
    Also we verified those Form Sessions did not exist in the application itself.
    ie. Using from Grid Control -> OAM-> Site Map -> Monitoring (tab) -> "Form Sessions".
    It means that we could safely kill that form process from Linux using "kill -9 <PID>" command.
    But that required a continuous monitoring and manual DBA intervention as customer is 24x7 customer.
    So, I wrote a shell script to do the following;
    •     Cron job runs every half an hour 7 days a week which calls this shell script.
    •     Shell script runs and tries to find "top two" f60webmx processes (form sessions) using over 95% cpu with 2 minutes interval.
    •     If no process is found or CPU% is less than 95%, it exits and does nothing.
    •     If top process is found, it searches for its DB session using apps login (with hidden apps password file - /home/applmgr/.pwd).
    a.     If DB session is NOT found (which means form process is hung), it kills the process from unix and emails results to <[email protected]>
    b.     If DB session is found, it waits for 2 hours so that form process times automatically via form session timeout setting.
    It also emails the SQL to check the DB session for that form process.
    c.     If DB session is found and it does not timeout after 2 hours,
    it kills the process from unix (which in turn kills the DB session). Output is emailed.
    This are the files required for this;
    1. Cron job which calls the shell script looks like this;
    # Kill form runaway process, using over 95% cpu having no DB session or DB session for > 2hrs
    00,30 * * * * /home/applmgr/forms_runaway.sh 2>&1
    2. SQL that this script calls is /home/applmgr/frm_runaway.sql and looks like;
    set head off
    set verify off
    set feedback off
    set pagesize 0
    define form_client_PID = &1
    select count(*) from v$session s , v$process p, FND_FORM_SESSIONS_V f where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='&form_client_PID';
    3. Actual shell script is /home/applmgr/forms_runaway.sh and looks like;
    # Author : Amandeep Singh
    # Description : Kills runaway form processes using more than 95% cpu
    # and Form Session with no DB session or DB session > 2hrs
    # Dated : 11-April-2012
    #!/bin/bash
    . /home/applmgr/.bash_profile
    PWD=`cat ~/.pwd`
    export PWD
    echo "`date`">/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR1=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID1=`echo $VAR1|awk '{print $1}'`
    CPU1=`echo $VAR1|awk '{print $2}'`
    TIME1=`echo $VAR1|awk '{print $3}'`
    PROG1=`echo $VAR1|awk '{print $4}'`
    PID_1=`echo $VAR1|awk '{print $5}'`
    CPU_1=`echo $VAR1|awk '{print $6}'`
    TIME_1=`echo $VAR1|awk '{print $7}'`
    PROG_1=`echo $VAR1|awk '{print $8}'`
    echo "PID1="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    echo "PID_1="$PID_1", CPU%="$CPU_1", Running Time="$TIME_1", Program="$PROG_1>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    sleep 120
    echo "`date`">>/tmp/runaway_forms.log
    echo "----------------------------------">>/tmp/runaway_forms.log
    VAR2=`top -b -u applmgr -n 1|grep f60webmx|grep -v sh|grep -v awk|grep -v top|sort -nrk9|head -2|sed 's/^[ \t]*//;s/[ \t]*$//'| awk '{ if ($9 > 95 && $12 = "f60webmx") print $1 " "$9 " "$11 " "$12; }'`
    PID2=`echo $VAR2|awk '{print $1}'`
    CPU2=`echo $VAR2|awk '{print $2}'`
    TIME2=`echo $VAR2|awk '{print $3}'`
    PROG2=`echo $VAR2|awk '{print $4}'`
    PID_2=`echo $VAR2|awk '{print $5}'`
    CPU_2=`echo $VAR2|awk '{print $6}'`
    TIME_2=`echo $VAR2|awk '{print $7}'`
    PROG_2=`echo $VAR2|awk '{print $8}'`
    HRS=`echo $TIME1|cut -d: -f1`
    exprHRS=`expr "$HRS"`
    echo "PID2="$PID2", CPU%="$CPU2", Running Time="$TIME2", Program="$PROG2>>/tmp/runaway_forms.log
    echo "PID_2="$PID_2", CPU%="$CPU_2", Running Time="$TIME_2", Program="$PROG_2>>/tmp/runaway_forms.log
    echo " ">>/tmp/runaway_forms.log
    # If PID1 or PID2 is NULL
    if [ -z ${PID1} ] || [ -z ${PID2} ]
    then
    echo "no top processes found. Either PID is NULL OR CPU% is less than 95%. Exiting...">>/tmp/runaway_forms.log
    elif
    # If PID1 is equal to PID2 or PID1=PID_2 or PID_1=PID2 or PID_1=PID_2
    [ ${PID1} -eq ${PID2} ] || [ ${PID1} -eq ${PID_2} ] || [ ${PID_1} -eq ${PID2} ] || [ ${PID_1} -eq ${PID_2} ];
    then
    DB_SESSION=`$ORACLE_HOME/bin/sqlplus -S apps/$PWD @/home/applmgr/frm_runaway.sql $PID1 << EOF
    EOF`
    echo " ">>/tmp/runaway_forms.log
    echo "DB_SESSION ="$DB_SESSION >>/tmp/runaway_forms.log
    # if no DB session found for PID
    if [ $DB_SESSION -eq 0 ] then
    echo " ">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "Killed: `hostname -a` Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    # If DB session exists for PID
    if [ ${exprHRS} -gt 120 ]; then
    echo $DB_SESSION "of Database sessions exist for this forms process-PID="$PID1". But its running for more than 2 hours. ">>/tmp/runaway_forms.log
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo "Killed Following Runaway Forms Process:">>/tmp/runaway_forms.log
    echo "-------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "PID="$PID1", CPU%="$CPU1", Running Time="$TIME1", Program="$PROG1>>/tmp/runaway_forms.log
    kill -9 $PID1
    #Email the output
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    else
    echo "Process running time is "$exprHRS" minutes.">>/tmp/runaway_forms.log
    echo $DB_SESSION "of Database sessions exist for PID="$PID1" and is less than 2 hours old. Not killing...">>/tmp/runaway_forms.log
    echo "For more details on this PID, run following SQL query;">>/tmp/runaway_forms.log
    echo "-----------------------------------------------------------------------">>/tmp/runaway_forms.log
    echo "set pages 9999 lines 150">>/tmp/runaway_forms.log
    echo "select f.user_form_name, f.user_name, p.spid DB_OS_ID , s.process client_os_id,, s.audsid, f.PROCESS_SPID Forms_SPID,">>/tmp/runaway_forms.log
    echo "to_char(s.logon_time,'DD-Mon-YY hh:mi:ss'), s.seconds_in_wait">>/tmp/runaway_forms.log
    echo "from v\$session s , v\$process p, FND_FORM_SESSIONS_V f">>/tmp/runaway_forms.log
    echo "where S.AUDSID=f.audsid and p.addr=s.paddr and s.process='"$PID1"' order by p.spid;">>/tmp/runaway_forms.log
    mailx -s "`hostname -a`: Runaway Form Processes" [email protected] </tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    fi
    else
    #if PID1 and PID2 are not equal or CPU% is less than 95%.
    echo "No unique CPU hogging form processes found. Exiting...">>/tmp/runaway_forms.log
    cat /tmp/runaway_forms.log
    fi
    If you have the same problem with some other unix and DB processes, the script can be easily modified and used.
    But use this with thorough testing first (by commenting out <kill -9 $PID1> lines.
    Good luck.
    Edited by: R12_AppsDBA on 19/04/2012 13:10

    Thanks for sharing the script!
    Hussein

Maybe you are looking for

  • Dropbox - no longer able to open/save with 6.1.3

    I recently updated my iPad software to iOS 6.1.3, and I can no longer "Open In" Dropbox. I can still open in all other apps such as Kindle, Evernote, etc.  Does anyone have a fix for this? I have uninstalled and reinstalled twice. In fact, Dropbox is

  • Hebrew Language dosent shown in oracle 11g

    Hi all can't see hebrew from what I have been told its should have be solved by setting the REGEDIT NLS_LANG to AMERICA.AMERICA.US7ASCII but its dosent solved it could someone helps regards Yaniv

  • Wrong assignment of user

    Hi Folks, Initially we assigned the user to the purchase organization and purchase orders created by him.Later business raised an issue saying that Assign me tab is not working for that particular user in Sourcing cockpit.As we analysed the Assign me

  • Beta testers wanted

    Hi all, I'm looking for help testing a new plugin for Lightroom and the iPad. If you're interested and would like to help out, please contact me at the support address on the website below. Requirements: - PC or Mac - Lightroom 3 or 4 - iPad 2 or bet

  • Having Trouble With 25fps Video in CS4

    Whenever I try to play something recording in a PAL format (1080p25 to be precise). I've had sure the preset is set on 1080p25 and I have no trouble playing the video on programs that aren't Adobe Premiere. When I try to play it in Premiere it might