Possible reasons of a lock

Hello, All,
hope you'll give me some advise which would explain the behaviour I have and guide me how to fix it.
First about the DB and application itself. We use 11.2 and there are several clients using OCCI as an interface.
One process (A) initiates a long transaction (could be few hours) which inserts records into some linked tables (3-4 tables).
Another process (B) performs polling of the DB based on the timestamp reading the data which were recently inserted into those tables where process A writes to. The issue is that process B hangs for quite the whole duration of that long operation which is being performed by process A. As soon as process A completes writing to all those tables (last commit issued) process B reads all new data and starts operating fast as usual.
What I also noticed it that process B may even hang on the SELECT made from a table which is not being modified by the process A.
I suspect there is some lock happening somewhere but what I also noticed is that when this issue happens (process B is hanging) I am able to run the same query that hangs in process B from another host using SQLDeveloper and it runs extremely fast as usual. So I started thinking there might be some issue with how we use connections from OCCI. Since if there is a lock then why it only locks SELECTs from one connection/session but not from the others?
Separate question (that's how I tried to make the behavior better) - is this a proper way to reduce the amount of data commited per transacton if I do something like this in a long lasting procedure:
create procedure X ()
as
declare i number := 0;
begin
for rc in (select id from table) loop -- start long operation using the list of records
[process the single record] -- inserts into several (3-4) related tables
i := i + 1;
if mod (i, 50000) = 0 then -- commit after every 50000 records processed
commit;
end if
end loop;
end;
Thank you very much for your help,
Max

Max Afanasiev wrote:
Hello, All,
hope you'll give me some advise which would explain the behaviour I have and guide me how to fix it.
First about the DB and application itself. We use 11.2 and there are several clients using OCCI as an interface.
One process (A) initiates a long transaction (could be few hours) which inserts records into some linked tables (3-4 tables).
Another process (B) performs polling of the DB based on the timestamp reading the data which were recently inserted into those tables where process A writes to. The issue is that process B hangs for quite the whole duration of that long operation which is being performed by process A. As soon as process A completes writing to all those tables (last commit issued) process B reads all new data and starts operating fast as usual.
What I also noticed it that process B may even hang on the SELECT made from a table which is not being modified by the process A.
I suspect there is some lock happening somewhere but what I also noticed is that when this issue happens (process B is hanging) I am able to run the same query that hangs in process B from another host using SQLDeveloper and it runs extremely fast as usual. So I started thinking there might be some issue with how we use connections from OCCI. Since if there is a lock then why it only locks SELECTs from one connection/session but not from the others?
Separate question (that's how I tried to make the behavior better) - is this a proper way to reduce the amount of data commited per transacton if I do something like this in a long lasting procedure:
create procedure X ()
as
declare i number := 0;
begin
for rc in (select id from table) loop -- start long operation using the list of records
[process the single record] -- inserts into several (3-4) related tables
i := i + 1;
if mod (i, 50000) = 0 then -- commit after every 50000 records processed
commit;
end if
end loop;
end;
Thank you very much for your help,
MaxIt is bad implementation to COMMIT inside LOOP.
Doing so increases the chances that an ORA-01555 (Snapshot Too Old) error will be thrown.

Similar Messages

  • What's the possible reason to lock a login account?

    If a login account locked not by sp_locklogin. what 's the possible reason to lock a login account?
    for testing purpose, I try to connect ASE 15.4 with a specific account and put a wrong password intentionally more than 5 times with sybase central but the account not locked.

    Do you have ASE configured to lock logins after 5 failed attempts?
    This can be configured serverwide with
    sp_configure "maximum failed logins", 5
    -bret

  • What are the possible reasons why I cannot reactivate using my AppleID, even though I already change its password with the help of Apple personel

    What are the possible reasons why I cannot reactivate my Iphone5 using my AppleID, even though I already change its password with the help Apple personel

    If the password for your Apple ID works at id.apple.com > Manage Apple ID, then it's likely that the Apple ID the device wants you use is not the same as the Apple ID you are using.
    Exactly what screen are you at on your iPhone?  It sounds like it is in Activation Lock.

  • I had bought iPhone 4 from OLX. When i had deleted iCloud account and restored my iPhone it is still asking me about Apple I.D to activate my Phone.. Why is it so..?? Suggest me a possible reason for my Question so that i may continue using my iPhone...

    I had bought iPhone 4 from OLX. When i had deleted iCloud account and restored my iPhone it is still asking me about Apple I.D to activate my Phone.. Why is it so..?? Suggest me a possible reason for my Question so that i may continue using my iPhone...
    I dont have any contact detail of that person whom i had bought this phone..

    If you are trying to activate an iPad or iPhone and it is asking for a previous owners Apple ID and password, you have encountered the Activation Lock. This is a security feature that prevents thieves from setting up and using a stolen or lost iPad or iPhone. You have no alternative. You must contact the previous owner to get permission to use the device. If you cannot contact the previous owner return the device to where you bought it and get a refund. You will never be able to activate the device and no one can help you do it.

  • Iphone 5s, Can't easily send sms. already updated in ios 7.1, What could be the possible reason and solution?

    I got my iphone 5s last 2 months, and it's ios is 7.0.6, after a month i can't easily send SMS, i have several apps and games. I tried to update my ios but still the problem persist. What could be the possible reason and what are the solutions? Please help me. 

    Technoboy14 wrote:
    I got my iphone 5s last 2 months, and it's ios is 7.0.6, after a month i can't easily send SMS, i have several apps and games. I tried to update my ios but still the problem persist. What could be the possible reason and what are the solutions? Please help me. 
    What does "can't easily send SMS" mean? What problems are you having with SMS? Without details, no one could possibly give you a reason or solutions.
    Have you tried resetting your device by pressing and holding the Home button and power button until the silver apple appears?

  • Error 1430 occurred at Open/Create/Replace File in NI_Fuzzy_Logic_API.lvlib:FL Load Fuzzy System.vi- Untitled 3 Possible reason(s): LabVIEW: The path is empty or relative. You must use an absolute path. Not A Path how can i copy it in new vi plz help

    when i am copy the vi that is in find example>fuzzy>fuzzyEx with pi control the follwing error occuring 
    'error 1430 occured at open/create/replacefile in NI Fuzzy logic API.LVLIB FL LOAD FUZZY SYTEM.vi
    untitel 3 possible reason the pat is empty or relative you must se use an absolute patth <not apath>
    plz help me i only want that i can copy this vi in new vi but when i do so the above error occur and fuzzy logic cotroller is highlited 

    Hello Nofil,
    This is probably happening because you have made a copy of the VI without changing the name/ location on the disc. I have saved a copy of the VI for you, it is in LabVIEW 2010 SP1, please ask if you want this in a previous version.
    Regards
    Andrew George @ NI UK
    Attachments:
    Fuzzy Tanks with PI.vi ‏31 KB

  • How to find out the reason for blocking locks?

    PB Application try to create data in ASE 12.5. With this operation, there are sql, sp, trigger involved. Most of the it is okay. With lock of sleeping or sync sleeping lock. User wait for a short time to get the result.
    but some time, there are blocking lock.
    If spid for the app is 1. then looks like this app also generate another spid, say it is 2. and 2 is blocking by 1. spid 1 holding lock!
    then all user is frozen because of spid 1 holding lock!!!  How to figure it out the reason for blocking locks?

    Thanks, Mark. Yes, sp_lock, sp_who, ... are common tool I used.
    I found out one case like:
    I have a SP which call a View for data.
    When I run this SP, suppose the sipd is 1. then it will create another spid 2 because of access view and it gone very quick. This cause spid 1 block spid 2 within a short time.
    If the are many user run the app, the app will be  frozen and everyone is waiting. Finally it release, no dead lock, but the performance is not acceptable.
    That why I have this question.

  • MFL: The dependency is not configured in schema resource. Possible reason one or more import/include is not set   correctly.

    HI Friends,
    I have a created a MFL to transform XML to Non XML format. When am generating a XSD out of this MFL am getting this Error:
    The dependency is not configured in schema resource. Possible reason one or more import/include is not set
    correctly.
    Here is the snippet of the XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns="http://www.w3.org/2001/XMLSchema"
              targetNamespace=""
              xmlns:mfl="http://www.bea.com/mfl"
              elementFormDefault="qualified">
        <xsd:import namespace="http://www.bea.com/mfl"/>........
    Later Part i have searched for mfl.xsd in com.bea.wli.core.mflengine_1.x.x.x.jar in my.........../Oracle_OSB1/modules  and imorted this XSD into my eclipse workspace.
    Then i added the schemalocation attribute to the Import element. which looks something like below:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
              xmlns="http://www.w3.org/2001/XMLSchema"
              targetNamespace=""
              xmlns:mfl="http://www.bea.com/mfl"
              elementFormDefault="qualified">
        <xsd:import namespace="http://www.bea.com/mfl" schemaLocation="../../mfl.xsd" />......
    After doing these changes also am getting the same error... can anyone help me out of this????

    Hi Arun,
    Also in SB console we can refer xsds from other projects but again OEPE doesnt seem to support that we will have to make duplicate copies of the resources in each project.It is not like that if you are using OEPE then you can not refer resources from other projects. Just what you need to do is that give relative path of the resource which is there in the file system. It does not matter that to which project it belongs. Yes, now with OEPE, you have to do this manually.
    Regards,
    Anuj

  • Is it possible to enter the lock screen with itunes or something else because i've damaged my phone and the touch screen is damaged that i'm not able to unlock it to make a backup on itunes

    is it possible to enter the lock screen with itunes or something else because i've damaged my phone and the touch screen is damaged that i'm not able to unlock it to make a backup on itunes ?
    it would be very important to put the data from iphone 5 to my new 5s ..
    looking forward to get some help
    thx

    You cant unlock your phone unless you put in your password. It may be possible that the apple store could do something about it.

  • I cannot log into facebook. I get the following message: 404 Error - Not Found The resource you have requested could not be found on the server. There are many possible reasons for this. Either the file does not exist, there is an error in your request,

    I am not able to go to the facebook site. www.facebook.com is not working. I get the following error message. 404 Error - Not Found
    The resource you have requested could not be found on the server. There are many possible reasons for this. Either the file does not exist, there is an error in your request, or the file is not accessible in the requested directory. Please verify that:
    * You have used the proper case; requests ARE case-sensitive!
    * You have entered the URL correctly. (i.e. proper directory/filename)
    * You used the FULL URL. (i.e. proper file type: .html, .gif , .jpg, etc.)
    * You use a tilde (~) before user directories. (i.e. www.furcen.org/~jurann/ )
    * The user/file still exists on this server.
    I also get redirected to "Busca Google" when typing www.facebook.com in the address bar.
    == URL of affected sites ==
    http://facebook.com; buscagoogle.com

    I have the same problem and it does not have to do with firefox. Do you have any idea how to fix it through?

  • Microsoft Excel cannot access the file "-". There are several possible reasons. Windows Server 2008 R2 with Microsoft Office 2010

    I have a problem with starting the Excel Application under a particular user (service account).
    I try to schedule this C# script through an application X (not Windows Task Scheduler. And this
    application will always use a service account to run services on the server). If I run the C# script in
    command prompt under the same user, it runs. Under the application X, which uses the exact same
    user, to initiate the C# script, it fails to open the Excel application (not sufficient permission?).
    This script calls application.Workbooks.Open(<ExcelFileName>,0,false,Type.missing....). At this line
    of code, it gives the following error:
    Microsoft Excel cannot access the file "...". There are several possible reasons:
    -The file name or path does not exist.
    -The file is being used by another program.
    -The workbook you are trying to save has the same name as a currently open workbook.
    I tried all the methods that I found online as follow:
    Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop" (for 64 bit Windows) or "C:\Windows\System32\config\systemprofile\Desktop" (for 32 bit Windows).
    Changed the DCOM config for the Microsoft Excel application to include this user for Local/Remote Launch and Access.
    Enabled all macros in Excel application and set the Trust Center.
    Add the user to have full control on all folders that contain the Excel file.
    Under DCOM
    config, Microsoft Excel Application, if I modify the Identity tab to check on "This User" and enter the username/password to let Excel always run under that user. Then the application runs perfectly. However, other users can't run the excel application
    on their own with the following error: "Cannot use object linking and embedding". If I check "Use the launching user", then Excel can't be launched. No errors in the logs or events anywhere to check.
    Yet, still the same error. I think it's permission but I am not sure where and what to do for this to work.
    Now, normally, when I run this excel report, I can double-click on the file and it'd automatically run,
    save the new parameters into the current file and generate a new excel file (with date attached to the
    file name). That means there is a change (save) to the original file.
    Environment: Windows Server 2008 R2 and running Microsoft Excel 2010.
    I appreciate all your help!

    I am wondering if this has anything to do with having the user log into Excel.
    In point #5 above: Under DCOM config, Microsoft Excel Application, if I modify the Identity tab to check on "This User" and enter the username/password to let Excel always run under that user. Then the application runs perfectly. However, other
    users can't run the excel application on their own with the following error: "Cannot use object linking and embedding". If I check "Use the launching user", then Excel can't be launched. No errors in the logs or events anywhere to check.
    Because running with the launching user proposes an user to run the Excel application. However, I do not think there is any where that we can pass in the password for this user to Excel. However, this Excel has all the permissions to Excel application as
    well as the folders that have the Excel files.
    Please help!
    Thank you!

  • Another narcoleptic PowerBook - possible reasons?

    Hi all,
    My PowerBook G4 15" 1-1.5GHz has developed a case of going to sleep as soon as it's booted.
    I can wake it but after 1 second it returns to sleep. Within the 1 second awake intervals I have found no report of 'overtemp' in the Console log. I have also had it running without the keyboard and trackpad connected, and also without the PRAM battery connected. I'm not sure if that's recommended but it didn't solve the problem anyway. I have tried resetting the PMU (holding power button for 5 seconds) but I'm not sure it actually did anything. I should also point out that I tried replacing the PRAM battery, which also didn't change anything.
    The problem developed after I opened up my PB because it was getting very hot. I put it back together (after just having a look inside and not actually taking anything out) and the sleeping problem started, and also the trackpad stopped working. This made me think it was the trackpad temp sensor but I can't actually locate it on the 1-.15GHz model - any ideas?
    At one point I did get the trackpad working but the constant sleeping problem still occurred. Would I be right in saying that this means it is a software issue and that the hardware is OK? I tried to re-instal OS X 10.5.4 but my PB won't boot from the DVD. Trying from an iMac in Firewire Target mode also failed.
    I was thinking about buying a replacement palm rest with keyboard and trackpad but I've read that the problem still might occur.
    Does anyone know any other possible reasons or solutions for the problem?
    Regards,
    Ben

    Well Target Disk Mode boots only work in the following manner:
    If you set let's say a MacBook Pro in Target Mode, its optical drive can be used to boot the Powerbook, and install to the Powerbook a Powerbook compatible operating system.   That includes the retail 10.4.6, 10.5, 10.5.1, 10.5.4, and 10.5.6, or the original Powerbook compatible CD.
    But you can't try to set the Powerbook in target mode, and install the operating system from the MacBook Pro.
    The problem with doing this, is the Powerbook can't run the software from a MacBook Pro's installer discs, or 10.5 or later as installed on a MacBook Pro, or have GUID partitioning done to it.
    The machine with the Firewire logo is the one that is nothing more than a very expensive external optical or hard drive.  Once it is out of Target Disk Mode whatever drivers get installed on it have to be compatible with it.

  • Cant get into App store reason restriction or locked out

    Cant get into App store reason restriction or locked out

    When I try to update my apps it tells me my account is locked and I need to reset my Apple ID

  • Need possible reason for the error!!!

    The following error occured on a QA machine while testing....when clicked on a lable a dialog should come up which contains a table with data.
    I am not able to reproduce this error on developmenet machines....So i need the possible reason the occurance of this error..
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTableUI.registerKeyboardAction(BasicTableUI.java, Compiled Code)
    at javax.swing.plaf.basic.BasicTableUI.registerKey(BasicTableUI.java, Compiled Code)
    at javax.swing.plaf.basic.BasicTableUI.registerKey(BasicTableUI.java, Compiled Code)
    at javax.swing.plaf.basic.BasicTableUI.installKeyboardAction(BasicTableUI.java:616)
    at javax.swing.plaf.basic.BasicTableUI.installUI(BasicTableUI.java:497)
    at javax.swing.JComponent.setUI(JComponent.java, Compiled Code)
    at javax.swing.JTable.setUI(JTable.java:2081)
    at javax.swing.JTable.updateUI(JTable.java:2134)
    at ASMSFrame.UserDialog.setTable(UserDialog.java:264)
    thanks

    Line number 264 of UserDialog.java is throwing a NullPointerException. You are probably calling a method on an object that does not exist.

  • Please explain the possible reasons of manufacturing through Subcontractor.

    Dear experts,
         The question was asked to me in interview -
         Why we prefer Material manufacturing by Subcontracting Procedure?
         Even though the company is having own machinery set up and man power, then also what  
         Are the Reasons for manufacturing the components by Subcontracting?
         Please mention all the possible reasons on this question.
         Thanks in Advance !

    Hi Kiran,
    Some of the reasons for sub-contracting-
    1. Cost
    2. Capacity not available at our plant, due to overload or full capacity booking by other processes
    3. Subcontractor has requisite tools and / or better know-how of that process.
    4. The volumes does not justify carrying out the process in-house.
    Hope the above was helpful.
    Regards,
    Vivek

Maybe you are looking for

  • How do i use panorama on the 4th generation ipod?

    i saw it said that the ipod touch gets the panorama mode but does anyone know if does work with 4th generation ipod touch?

  • WebI Report not printing correctly

    Hi, I've a WebI report for whcih the page layout is set as Letter and orientation set as Portrait. when I export this report and try printing it, the print preview shows that single report page is coming up in 2 pages while printing. however when I s

  • Advanced Editing Tool

    I am using the thouchup text tool (I use Acrobat 9 Pro) to edit the color of words in a pdf. This problem occurs when I have saved the changes and closes down the pdf, and the reopening it. What happens is that document gets distorted, words suddenly

  • How to get standard oracle API or Interface package in oracle apps

    Hi guys, Need ur help........plz tell me how to find the standard oracle API or other package on server. Actually I need standard Interface package of Requisition Import program API plz give me exact path to finding standard API or interface pkg.....

  • Facebook upload - two tags for one face!?!?

    Hi everyone. I did a quick search before posting and couldn't find anything. When I upload an album to Facebook, certain faces are getting tagged twice: once to link them with their Facebook ID, the second is just a text tag (no link) with the same n