Sessions from apex are blocking by batch job

Hi All,
In my 10.2.0.3 linux with apex 3.1.1
We have a batch job using a package,that is doing DML operation in tables depends upon some condition.And this job will run daily 5 hours.
The sessions from apex that is also using some procedures in the same package.Some days the sessions from apex are blocking by batch job.While blocking wait event from apex sessions are 'library cache pin'.Once the batch job completes then automatically removes the block.
What may be the reason?
Thanks in Advance,
Sunil

The query against v$lock is not relevant if the blocked sessions are waiting on "library cache pin" - so you seem to have two separate problems.
If you have a session waiting on another session's transaction slot in mode 4 there are several possible causes - often related to indexes, but there are a couple of "internal" problems as well. If you see this locking issue again some of the simplest things to check for would be session 1 inserting (without commit) some rows in a table with a unique key, and session 2 then trying to insert a duplicate. Session 2 has to wait for session 1 to commit or rollback before deciding whether to return a "duplicate key" error, or to continue processing.
The "library cache pin" waits suggest that the package had become invalid while the batch job is running it, and one of the Apex jobs is trying to recompile it. But if the batch job is currently running (hence pinning) the "executable", then the Apex job can't get the necessary exlusive pin until the batch job ends and releases its pin.
Read the notes in the script $ORACLE_HOME/rdbms/admin/catblock.sql about creating views that let you see more of the information about library cache (KGL) locks and pins.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • What plug-in do I need to import file from scanner to make a batch job

    what plug-in do I need to import file from scanner to make a batch job

    Hi Atul,
    I`m having PS Elements Ver.13 and scanner Epson V500 Photo.
    Nice if your can help me.
    Sten

  • Invoice creation in batch jobas are not in sequence

    Hello ,
    I schedule two batch job with diffrent variant at the same time. When invoices are created in batch job there numbers are not in sequence. If I check creation time then Invoice creation time of Invoice  number 2 is latter than invoice creation time of number5.
    As per number range concept Invoice 2 should create before Invoice 5.
    Why this is happening?
    Regards
    RDC

    >
    > Thanks for the soon reply but here my legacy system is File it is having the fields like INV details and country key and customer details these details i want to send it to Target Ecc system based on the country .
    Use File Adapter in sender side to read the data from Legacy System ,if the legacy system data format not XML then use File content conversion in Sender comuniction channel to convert in to XML.
    > for exp: If the country is Us then create the vendor invoice in the Ecc system , if the country is IND then check whether the existed customer in the ECC system or not if Existed then those details update into one more legacy system .
    >
      You have to perfrom RFC Lookup in mapping level if the coiuntry is IND,anyway you are on PI7.11 so you can perform RFC llok to check the it is existed customer or not. search in sdn for RFC look up.
    Finally use enhanced Receiver determination to determin receiver.
    search in sdn you will get it hot to determine dthe receiver...everything..
    the requirement not complex..
    Regards,
    Raj

  • How to get all AD User accounts, associated with any application/MSA/Batch Job running in a Local or Remote machine using Script (PowerShell)

    Dear Scripting Guys,
    I am working in an AD migration project (Migration from old legacy AD domains to single AD domain) and in the transition phase. Our infrastructure contains lots
    of Users, Servers and Workstations. Authentication is being done through AD only. Many UNIX and LINUX based box are being authenticated through AD bridge to AD. 
    We have lot of applications in our environment. Many applications are configured to use Managed Service Accounts. Many Workstations and servers are running batch
    jobs with AD user credentials. Many applications are using AD user accounts to carry out their processes. 
    We need to find out all those AD Users, which are configured as MSA, Which are configured for batch jobs and which are being used for different applications on
    our network (Need to find out for every machine on network).
    These identified AD Users will be migrated to the new Domain with top priority. I get stuck with this requirement and your support will be deeply appreciated.
    I hope a well designed PS script can achieve this. 
    Thanks in advance...
    Thanks & Regards Bedanta S Mishra

    Hey Satyajit,
    Thank you for your valuable reply. It is really a great notion to enable account logon audit and collect those events for the analysis. But you know it is also a tedious job when thousand of Users come in to picture. You can imagine how complex it will be
    for this analysis, where more than 200000 users getting logged in through AD. It is the fact that when a batch / MS or an application uses a Domain Users credential with successful process, automatically a successful logon event will be triggered in associated
    DC. But there are also too many users which are not part of these accounts like MSA/Batch jobs or not linked to any application. In that case we have to get through unwanted events. 
    Recently jrv, provided me a beautiful script to find out all MSA from a machine or from a list of machines in an AD environment. (Covers MSA part.)
    $Report= 'Audit_Report.html'
    $Computers= Get-ADComputer -Filter 'Enabled -eq $True' | Select -Expand Name
    $head=@'
    <title>Non-Standard Service Accounts</title>
    <style>
    BODY{background-color :#FFFFF}
    TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}
    TH{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: ThreeDShadow}
    TD{border-width: 1px;padding: 2px;border-style: solid;border-color: black;background-color: Transparent}
    </style>
    $sections=@()
    foreach($computer in $Computers){
    $sections+=Get-WmiObject -ComputerName $Computer -class Win32_Service -ErrorAction SilentlyContinue |
    Select-Object -Property StartName,Name,DisplayName |
    ConvertTo-Html -PreContent "<H2>Non-Standard Service Accounts on '$Computer'</H2>" -Fragment
    $body=$sections | out-string
    ConvertTo-Html -Body $body -Head $head | Out-File $report
    Invoke-Item $report
    A script can be designed to get all scheduled back ground batch jobs in a machine, from which the author / the Owner of that scheduled job can be extracted. like below one...
    Function Get-ScheduledTasks
    Param
    [Alias("Computer","ComputerName")]
    [Parameter(Position=1,ValuefromPipeline=$true,ValuefromPipelineByPropertyName=$true)]
    [string[]]$Name = $env:COMPUTERNAME
    [switch]$RootOnly = $false
    Begin
    $tasks = @()
    $schedule = New-Object -ComObject "Schedule.Service"
    Process
    Function Get-Tasks
    Param($path)
    $out = @()
    $schedule.GetFolder($path).GetTasks(0) | % {
    $xml = [xml]$_.xml
    $out += New-Object psobject -Property @{
    "ComputerName" = $Computer
    "Name" = $_.Name
    "Path" = $_.Path
    "LastRunTime" = $_.LastRunTime
    "NextRunTime" = $_.NextRunTime
    "Actions" = ($xml.Task.Actions.Exec | % { "$($_.Command) $($_.Arguments)" }) -join "`n"
    "Triggers" = $(If($xml.task.triggers){ForEach($task in ($xml.task.triggers | gm | Where{$_.membertype -eq "Property"})){$xml.task.triggers.$($task.name)}})
    "Enabled" = $xml.task.settings.enabled
    "Author" = $xml.task.principals.Principal.UserID
    "Description" = $xml.task.registrationInfo.Description
    "LastTaskResult" = $_.LastTaskResult
    "RunAs" = $xml.task.principals.principal.userid
    If(!$RootOnly)
    $schedule.GetFolder($path).GetFolders(0) | % {
    $out += get-Tasks($_.Path)
    $out
    ForEach($Computer in $Name)
    If(Test-Connection $computer -count 1 -quiet)
    $schedule.connect($Computer)
    $tasks += Get-Tasks "\"
    Else
    Write-Error "Cannot connect to $Computer. Please check it's network connectivity."
    Break
    $tasks
    End
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($schedule) | Out-Null
    Remove-Variable schedule
    Get-ScheduledTasks -RootOnly | Format-Table -Wrap -Autosize -Property RunAs,ComputerName,Actions
    So I think, can a PS script be designed to get the report of all running applications which use domain accounts for their authentication to carry out their process. So from that result we can filter out the AD accounts being used for those
    applications. After that these three individual modules can be compacted in to a single script to provide the desired output as per the requirement in a single report.
    Thanks & Regards Bedanta S Mishra

  • Batch job - Delivery creation

    Hi all,
    Here in my project there are so many batch jobs ruuning.Deliveries are created manually and through batch job also
    A delivery was created manually.A particular delivery output type was not pulled in the delivery since we did not maintain the condition record for that.After some time(after 5 min) that output condition type has been added in the delivery output header.When I click the further details it shows that Manually changed by Batch job
    We are now surprised that how Batch job added this output type manually when it is not its responsibility.
    How to find out which particular job has done this activity.
    Has anybody faced this problem or any solution for this problem
    Regards
    Mano

    Use transaction SM37 to find which background job ran during the time when the change occurred.
    Verify the variant that is used in the background job.

  • Regarding Batch job "RISTRA20" getting fail

    Hi,
    There is one bacaground Job which is active for the past three days with no error it has not gererated an output also, its a standard report "RISTRA20" for PM module.
    have you got any idea why the job is active such a long time, it has not finished though the required output is generated.
    Please help me with the solution if you ever have exprience this probelm.
    Regards,
    Vishvesh

    Hi
    Yes you are right the batch job is related to ip30.
    We have scheduled background job (Ristra20) for generating maintenance orders through maintenance plan. Every night it runs automatically and generates orders.
    This batch job is running for the complete day without any output, May be it is going into loops beacuse of some data issue or the other.
    If you can please help me to investigate the same.
    Thanks in advance.
    Vishvesh

  • Were do I get the relation spool device batch job/programs

    Hi there,
    I need to know what batch jobs and what SAP programs/reports ... are related to specific spool devices.
    Our business need: we need to replace some old spool devices which are used for some batch jobs, SAP programs... so we need a list of them.
    Can anybody tell me what tables, reports, tcodes... are helpfull for this?
    Thanks in advance!

    Hi Alwina,
    thanks you for your reply - this helps me for spool request which are created by batch Jobs (only running in Background?!).
    What about spool request which are created by a user in dialog or when the output device is coded in source code of a ABAP program (I don't know if this is possible, i am not an ABAP developer)?
    Does the report BTCAUX05 (note 1145265) helps me here, too?
    Thanks

  • Batch jobs filter

    Dear all
    I have 150 delivery doc Nors, in this some are created Through Back ground jobs
    now we can find in vl03n -- Whether it is Normel or by  batch job it is created at header level-- sales tab
    but is very risky bz each and every one we cant check in VL013N
    SO i want to filter Which are created By back ground plz tell me

    Hi Amith,
    I think you can achive this using LIKP table.While executive LIKP table , please provide Batch User name and delivery creation date. It will display all deliveries which are created  by batch job.
    I hope this helps.
    Thanks,
    Regards,
    Jai

  • Cannot delete old sessions from SM35 - Batch Input...

    Cannot delete old sessions from SM35 - Batch Input...                
    We have an issue, we are trying to delete old batch input sessions via SM35 and no
    matter how hard we try we cannot get rid of them. They are still in status "In Process" but they are status incorrect.
    Those sessions have long finished and some are more than 5 years old.
    We have tried running rsdbcreo and RSBDC_REORG but it only returns with
    Temse Error, running SP12 does not list any inconsistencies. Basically we want all jobs in SM35 that ran this year only available in the SM35 queue, we have sessions that have run from year 2004 to 2008 we wish to
    delete.
    Anybody experience anything similar or have any advice, sorry this is an environment that i have inherited and wish to cleanup.
    We have checked the following notes 706478,76422,706478,76422 and many more.
    Thanks
    Suleman

    When you try to delete, you will be asked whether you want to delete logs too.
    Here try with 'No'.
    hope this helps

  • Is it possible to call a windows batch file from PL/SQL block ??

    Hi gurus,
    Would require your help.Is it possible to call a windows batch file from PL/SQL block ??If yes can you give an example for the same or any workaround for the same.
    Regards
    Vijay

    You didn't specify a database version, but if you are 10g or higher, it's quite straightforward using an external job type in DBMS_SCHEDULER. Funnily enough i'm looking at something similar myself at the moment.
    Useful guide to some of the issues here Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files

  • Find errors logged from oracle batch job...

    Hi,
    I have a batch job that calls a procedure.. code is as under
    begin
      sys.dbms_job.submit(job => :job,
                          what => 'begin
                                       delete_stale_data;
                                        end;',
                          next_date => to_date('29-06-2006 05:33:28', 'dd-mm-yyyy h24:mi:ss'),
                          interval => 'sysdate+(30/1440)');
      commit;
    end;Now, how can i get to view the error messages if
    1) procedure runs into an exception and hence job is not executed
    2) if job runs into some problem due to which it is not completed..
    Thanks,
    JP

    "Viewing errors" is the wrong term to use - it assumes that there are devices like STDERR and STDOUT in Oracle that is written to when an error occurs.
    There are no such devices in Oracle. Oracle itself will record system related errors (and messages) to the alert log of the database instance. Custom PL/SQL code can also write to the alert log using an undocumented call - but it is a very poor idea as the alert log is for the DBA to deal with system errors. Not with someone's application errors.
    The correct method is to implement an application logging PL/SQL interface (package) that allows applications to log errors and warnings and messages (including debug stuff). The basic method of this API implementation is to create a log table and write messages (from applications) to this table using autonomous transactions. The API call can also record the system date/time, the current PL/SQL stack trace, client session details, etc.
    Using such an API, you would schedule the job as follows:
    Method 1:
    The job becomes broken after 16 repeated failures (the exception is re-raised in order for DBMS_JOB to deal with it).
    sys.dbms_job.submit(job => :job,
    what => 'begin
    delete_stale_data;
    exception when OTHERS then
    APPLOG.CriticalError( 'Error occured running DELETE_STALE_DATA', SQLCODE );
    raise;
    end;',
    next_date => to_date('29-06-2006 05:33:28', 'dd-mm-yyyy h24:mi:ss'),
    interval => 'sysdate+(30/1440)');
    Method 2:
    The job will never break. The exception is supressed and DBMS_JOB will not know that any errors occurred:
    sys.dbms_job.submit(job => :job,
    what => 'begin
    delete_stale_data;
    exception when OTHERS then
    APPLOG.CriticalError( 'Error occured running DELETE_STALE_DATA', SQLCODE );
    end;',
    next_date => to_date('29-06-2006 05:33:28', 'dd-mm-yyyy h24:mi:ss'),
    interval => 'sysdate+(30/1440)');

  • Batch job for collecting Blocked Deliveries

    Hi,
    Can anyone help me, i need to collect all the orders that have been blocked for delivery and send the results to an email address.
    I created a batch job gave the program for SD Documents blocked for deliveries, but it doesnt seem to work, can anyone please give a step by step procedure.
    Thanks alot,
    Michelle.

    1. T.code SM36- Here you will creating the job
    2. Give the appropriate variants and the back ground user id
    3. once this is done, go to the Spool receipient and give the email id where you want to send the mail to. Run the job now. You should receive the mail now, provide the connections are maintained.
    Hope this will resolve the issue.
    Mani

  • Regarding Batch Jobs for migration of data from client DB to our local DB

    Hi Folks,
    GoodDay, Previously I worked as a Oracle Developer and recently shifted into a BIG organisation as PL?SQL developer. Here my base work is with INTERFACES(Stored Procedure). That is retrieving data from client DB and need to put the data in our staging tables. For that i created 2 INTERFACES(stored procedures). One is for one time migration. No need to run on regular basis. The second one is to run regularly why because if any updations are done in client DB that should be replicate to our DB. For that we need to run a BATCH JOB regulary 24X7 basis.
    But i dont have any working knowledge on BATCH JOB creation and running. Please let me guide on this issue ASAP.
    Regards,
    Ramesh.

    You can try
    dbms_job(9i)
    or
    dbms_scheduler(10g)
    just out of curiosity.. tell me if you are interested...
    what you were doing as a "oracle developer" ( is it like writing only "sql" )...

  • Is there a way to access ABAP OO instances from a batch job report

    Hello,
    I am looking for a way to access ABAP OO instances from a batch job report. My circumstances are the following:
    I have got some ABAP OO coding that identifies other objects (class instances) that have to be processed (they have a DoIt method that does some calculation). As this processing is time consuming and performace relevant I have to parallelize this in batch jobs. This batch jobs however can only be "simple" ABAP reports according to SM36. The problem is now that I dont really know how to tell the batch job report what objects to process. Somehow I have to access theses instances from  that batch job report.
    Does anybody have an idea?
    Greetings
    Matthias

    Hi David,
    thanks a lot for your help. After a lot of searching on the net this seems to be the only way to cope with it. However I am not sure about the locking mechanisms and if its suitable for mass data processing. In the help page you suggested the following is stated which I do not fully understand::
    "The current lock logic does not enable you to set specific locks for the following requirements:
    ·        Many parallel read and write accesses
    ·        Frequent write accesses
    ·        Division into changeable and non-changeable areas
    Although the lock logic makes the first two points technically possible, they are not practical because most accesses would be rejected."
    Does this mean
    a) if I dont want to set "specific locks" for frequent write accessess I am fine
    or
    b) I am discouraged from use shared memory technics for frequent write accessess?
    In the latter case I will have a problem...
    What do you think?
    Greets
    Matthias

  • Automatically output report to excel from a batch job

    We have business users who require that a standard report be run daily as a batch job and output to a printer, which is using a large pile of paper every day.  I have challenged the rationale for this without success, and am trying to find a way to continue to run the batch job but output the report to an excel file and e-mail it to a manager.  I know that this can be done by a good ABAP programmer, but I am trying to find a way to set up the batch job to do this without additional ABAP, as programming resources are very limited.  I would appreciate input from anybody who knows how to do this.

    Likely because your user is continuing to call the service in a Windows (classic) DOMAIN\username format, and not in the Claims identity it should be.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for