Acquire with NOWAIT error and TRUNCATE command

Why is it that, sometimes when i try to TRUNCATE a table. I would get
ORA-00054: resource busy and acquire with NOWAIT specified error. And i would be able to DELETE the same table using DELETE FROM table_name;
Message was edited by:
C. Boutet

Because some other session has a lock on that table, you can delete it because you are in fact deleting your read consistent view of the table. See this test case:
In session 1:
YAS@10G>create table t as select * from dual;
Table created.
YAS@10G>insert into t values(2);
1 row created.In session 2:
YAS@10G>truncate table t;
truncate table t
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified
YAS@10G>delete from t;
1 row deleted.
YAS@10G>commit;
Commit complete.
YAS@10G>select * from t;
no rows selectedI was not able to truncate it because session 1 inserted a row and it is holding a lock on the table. I could delete from the table because the rows I want to delete are not locked.
TRUNCATE is DDL and it needs an exclusive lock on the table. Session 1 is holding a shared lock on the table which does not permit the other session to get an exclusive lock.

Similar Messages

  • ORA-00054: resource busy and acquire with NOWAIT specified

    We are frequently getting ORA-00054: resource busy and acquire with NOWAIT specified error in production database for a application user group. Production database is oracle 10g R 10.2.0.5.0 on sun solaris. The app user group is telling that the code is not changed from many years. They wants this to be resolved on h.priority. The tables which are getting this error has clob fields. I rebuilded indexes in QA environment & they ran it again they are getting the same error.
    I asked to see select for update nowait clause's carefully. They said everything is fine. Please let me know any solution if any one is getting this kind of error. Thanks.

    Has anything changed compared to previously when these errors didn't happen?
    Not necessarily application code but
    - Database version
    - patches
    - indexes
    - data volumes
    - number of clients
    etc, etc
    What led you to rebuild the indexes?
    As for suggested solutions, they completely depend on the specifics of your situation.
    Do you know that the SELECT FOR UPDATE is raising the ORA-00054?
    Something else has the relevant resource locked in a non-shareable way - you need to find out what.
    It sounds like the most likely candidate is another session that has issued a SELECT FOR UPDATE and locked some of the same row(s).
    It's good that you can reproduce on QA rather than just production.
    Maybe you can manually issue the failing SELECT FOR UPDATE statement but with WAIT rather than NOWAIT and see if that helps you figure out blockers, etc.
    Further analysis required at your end.

  • How to find process causing "ORA-00054: resource busy and acquire with NOWAIT specified"

    Hello there,
    ENV: Oracle 10gR2 64bit on ASM, RHEL 64bit
    Application team has reported "ORA-00054: resource busy and acquire with NOWAIT specified" during the batch process in production env. This is happening for last couple of days. When this batch process is restarted in the morning, this error does not appear.
    I understand that this error is raised when one process tries to eecute some DDL on a table while another process is performing DML (or hasn't issued COMMIT/ROLLBACK after the DDL).
    Since this error is occurring at night (around 3:00am) during the batch process, is there a way to find out on table/object is contention happening OR which process is causing this error? The batch process cannot be modified to add debug messages because it is in Production.
    Please advise.
    Best regards

    user130038 wrote:
    Hello there,
    ENV: Oracle 10gR2 64bit on ASM, RHEL 64bit
    Application team has reported "ORA-00054: resource busy and acquire with NOWAIT specified" during the batch process in production env. This is happening for last couple of days. When this batch process is restarted in the morning, this error does not appear.
    I understand that this error is raised when one process tries to eecute some DDL on a table while another process is performing DML (or hasn't issued COMMIT/ROLLBACK after the DDL).
    Since this error is occurring at night (around 3:00am) during the batch process, is there a way to find out on table/object is contention happening OR which process is causing this error? The batch process cannot be modified to add debug messages because it is in Production.
    Please advise.
    Best regards
    >The batch process cannot be modified to add debug messages because it is in Production.
    I suspect more than one job is running concurrently against the DB; otherwise not error would occur.
    Of course the batch process CAN be modified, but some PHB has decided to eliminate that option.
    The Oracle database is at the mercy of the application code.
    If the application code is poorly instrumented, then live with what exists or improved the code to facilitate isolating the bug.
    You could delay the start of one of the jobs & then hope the error no longer occurs.

  • Resource busy and acquire with NOWAIT exception

    Dears frnds,
    I have faced this exception many times.But unable find out the Root cause of this exception.If anyone suggest why this exception arise,it will help to avoid this
    Exception
    java.sql.SQLException: ORA-00054: resource busy and acquire with NOWAIT specified ORA-06512: a

    It's somewhat hard to offer suggestions without understanding what the procedure is doing.
    Normally, an INSERT or an UPDATE will block indefinitely waiting to lock the row(s) in question. The error you are getting generally requires that you are doing an explicit SELECT ... FOR UPDATE NOWAIT or DDL. Doing DDL in an OLTP application is a bad idea, so you'd want to figure out what problem you're trying to solve and find a way to solve the problem without DDL. If you are doing an explicit SELECT ... FOR UPDATE NOWAIT, you'll need to understand why NOWAIT is being specified and figure out whether you should be handling the error. If someone added a SELECT ... FOR UPDATE NOWAIT because they don't want users to block waiting for access to a row, it may be perfectly reasonable to return this exception.
    Justin

  • Hey all just trying to set up my ipad synced up with itunes but now if i try to download any apps i put my password in then comes up with unknown error and wont download any help would be great

    hey all just trying to set up my ipad synced up with itunes but now if i try to download any apps i put my password in then comes up with unknown error and wont download any help would be great

    Reset your iPad and see if that helps.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Hello ! I'm using iphone 5 running ios 7.1.1 I have problem with Appstore error and also Safari don't work too. What can I do to fix this problem ?

    Hello ! I'm using iphone 5 running ios 7.1.1 and I have problem with appstore error and also Safari doesn't work. what can do I fix this problem ? I need help now my iphone can't do nothing

    Need more details. What is your appstore error exactly? and what happens when you try to use Safari?

  • HT1711 I puchased 3 songs and was charged and never downloading their currently sitting there with download error and when i tap to retry it still wont download waht can i do as i have been charged?

    I puchased 3 songs and was charged and never downloading their currently sitting there with download error and when i tap to retry it still wont download waht can i do as i have been charged?

    Have you tried signing out of itunes and then signing back in

  • Running Premiere PrO cs6. After upgrading to Yosemite 10.10.2 Adobe Premiere wont run, come up with system error and shuts down. Any one else had this issue?

    Running Premiere PrO cs6. After upgrading to Yosemite 10.10.2 Adobe Premiere wont run, come up with system error and shuts down. Any one else had this issue?

    can try this Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later)

  • OMacbook calendar gets the message "the server responded with an error" and is now not syncing. Any idea?

    I haven't done anything to my Macbook (I don't think) but out of the blue when adding entries to my calendar,  I now get the message "the server responded with an error". Consequently it will not sync with the Cloud. I have an iMac which DOES sync with both iPad and the iPhone.
    Anyone any idea?
    ALan

    Sorry, no help there. Ical does not stay open long enough to do anything with. All it does is crash and apologise and say it will notify Apple.
    Guess I will just delete it altogether and use google calendar.

  • Everytime I get thru to the point of extending the current wireless system I end up with an error and asks to retry. I have tried everything. Light keeps flashing amber. Any ideas out there

    Installing Airport extreme to extend existing wireless system. I have airport Utility current. after getting to the point of extending the system it tells me there was an error and please retry. I am using my IPad and I phone with the utility and both don't work. I have internet via hard wire thru the AEBS and it does see the  wireless signal but the big I shows up and the light still flashes amber. ( I am using an HP lap top and linksys router is main wireless station). Working on this most of the day, any help?

    Please describe the changes you made in detail.. it is terribly hard to fix network issues remotely with vague general comments.
    Was the TC, main router, bridged, connected via ethernet or joined to the wireless network???
    What is the main router now..?? What is the wireless?
    Do you have a direct connection to the TC by ethernet.. ?? If not you need one for setup.. plug ethernet to a laptop is easiest or remove the TC from the network and just plug it into the computer.. press and hold the reset for 10sec to get access.
    Lion is hopeless network wise.. and you need to download the proper airport utility 5.6 before you attempt this.. so connect up by ethernet to the main router.. whatever that is and download the stuff you need before you begin.
    http://support.apple.com/kb/DL1482

  • Console errors "Verification failed with 1 errors" and when Deleting Overrides

    Hi Guys,
    When trying to delete an override for a unix server I was prompted with this error:
    Note:  The following information was gathered when the operation was attempted.  The information may appear cryptic but provides context for the error.  The application will continue to run.
    : Verification failed with 3 errors:
    Error 1:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA refers to an invalid sub element Filter.
    Error 2:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=ef78d342-5a82-d629-224d-2e476003f6e1,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=ef78d342-5a82-d629-224d-2e476003f6e1,LanguageID=ENA refers to an invalid sub element Filter.
    Error 3:
    Found error in 1|XXXXX.XX.Unix.Management.Pack|1.0.0.0|DisplayString,ElementReference=06522f67-c195-2dfa-c310-a0134b961fc4,LanguageID=ENA|| with message:
    Element Info with Identity DisplayString,ElementReference=06522f67-c195-2dfa-c310-a0134b961fc4,LanguageID=ENA refers to an invalid sub element Filter.
    : Element Info with Identity DisplayString,ElementReference=a27e1d14-8ad4-56fb-da46-0c0994054e92,LanguageID=ENA refers to an invalid sub element Filter.
    I then exported the MP and manually deleted the Override but when I try to import it I get the same error.
    I have also checked a couple of other unsealed MP and some are also affected.
    I have gone through the MP XML can find no matches for any of the references. Is there a way (powershell or SQL query) where i can identify what these references are or how I should proceed to troubleshoot this issue?
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Hi Yan,
    That was my understanding about the error also but there are no entries for:
    ef78d342-5a82-d629-224d-2e476003f6e1
    a27e1d14-8ad4-56fb-da46-0c0994054e92
    06522f67-c195-2dfa-c310-a0134b961fc4
    in the management pack at all.
    What also is curious is that the errors refer to "LanguageID=ENA"
    but the only language code present inside the management pack is ENU. 
    The fact that there is no ENA language pack and that there are no references matched leads me to believe
    that this issue is not due to this MP its references in another.
    </LanguagePack>
    <LanguagePack ID="ENU" IsDefault="false">
    <DisplayStrings>
    There are also about 14 reference management packs this MP uses and those MP would also have a handful each which makes it difficult to troubleshoot. 
    Unfortunately deleting the MP isn't an option as there is a significant amount of configuration saved in it.
    Any ideas on how I could identify theses references?
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • It will not let me install Itunes 1.6.1 on my Windows 7 OS and keeps coming with an error and rolls back, what can i do?

    Everytime i tried to update my i tunes to 1.6.1 it wouldn't let me and came up with this error.
    I'd hit OK then it would roll back and start again and end with this error
    Anything i can do?

    These ones are typically caused by underlying problems on the PC that also often cause Windows Updates to fail to install. If we can fix the Windows Update trouble, we can usually get the iTunes trouble cleaned up en passant.
    Go into your Windows update and try to check for new updates. If updates install, stock up on the ones you're behind on, restarting the PC if requested to do so. After the restart, try installing iTunes again. Does it go through this time for you?
    If windows updates fail to install, go into your Update History and doubleclick the failures. What alphanumeric codes appear for you? Are they also 80070002, or some other number? (If they're another number, what number are you getting?)

  • Drawing a box with now fill and an outline

    I know this is simple, but I it's driving me crazy. Using the rectangle tool how do you draw a box with: an outline and no fill, and an outline with a different color fill. thanks

    public class Flags3 extends JFrame {
        public Flags3() {
            setContentPane( new JPanel() {
                public void paintComponent(Graphics g) {
                    int w = getWidth();
                    int h = getHeight();
                    int x = 0;
                    int y = 0;
                    System.out.println("Width:"+getWidth()+" Height: "+getHeight());
                    for (int i=0; i<100; i++) {
                        Color newGrey = Color.getHSBColor(150, 0, i/100.0f);
                        g.setColor(newGrey);
                        g.fillRect(0, (h/100)*i, w, (h/100));
            Dimension size = new Dimension(800, 600);
            getContentPane().setPreferredSize(size);
            getContentPane().setMinimumSize(size);
            getContentPane().setMaximumSize(size);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            pack();
            setVisible(true);
        public static void main(String[] args) {
            new Flags3();
    }I wrote this mainly to make sure I wasn't giving you bad info, but I also improved your paint method a little bit. It's a JFrame instead of a JApplet, so you'll have to make some changes, but it gives the full range of black to white (although it doesn't include full brightness white, the B value only goes to .99).

  • Sqlldr direct got ORA-00054: resource busy and acquire with NOWAIT specifie

    I have multi-threaded application to kick off multiple sqlldr sessions that will try to insert 200K rows of data into same table from each session. I am using direct path with parallel enabled. The target table has no index, not even a PK, but I got this ORA-00054 error.
    Sample control file template:
    OPTIONS (SKIP=1, DIRECT=TRUE, PARALLEL=TRUE, SILENT=ALL, MULTITHREADING=TRUE, SKIP_INDEX_MAINTENANCE=TRUE, SKIP_UNUSABLE_INDEXES=TRUE)
    UNRECOVERABLE
    LOAD DATA
    INFILE '&DATA_FILE_NAME'
    BADFILE '&BAD_FILE_NAME'
    DISCARDFILE '&DISCARD_FILE_NAME'
    INTO TABLE TARGET_TABLE
    APPEND
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
    ( SESSION_ID CONSTANT &SESSION_ID,
    FIELD00,
    FIELD01,
    FIELD02,
    FIELD03,
    FIELD04,
    FIELD05,
    FIELD06
    The definition of TARGET_TABLE:
    CREATE TABLE TARGET_TABLE
    SESSION_ID NUMBER(12),
    FIELD00 VARCHAR2(4000 BYTE),
    FIELD01 VARCHAR2(4000 BYTE),
    FIELD02 VARCHAR2(4000 BYTE),
    FIELD03 VARCHAR2(4000 BYTE),
    FIELD04 VARCHAR2(4000 BYTE),
    FIELD05 VARCHAR2(4000 BYTE),
    FIELD06 VARCHAR2(4000 BYTE),
    FIELD07 VARCHAR2(4000 BYTE),
    FIELD08 VARCHAR2(4000 BYTE),
    FIELD09 VARCHAR2(4000 BYTE),
    FIELD10 VARCHAR2(4000 BYTE),
    FIELD11 VARCHAR2(4000 BYTE)
    I want to WAIT if there's any race. How can I make it WAIT? Most of the time, WAIT should be the default, but somehow, it acts differently here.
    Any help will be highly appreciated.

    Looking at the same manual, you can see here that you need exclusive access to the table:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_modes.htm#sthref1449
    And here, you can see that if other DML is happening on a table, Oracle says you need to do conventional path load:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_modes.htm#sthref1432
    In the case of parallelization, yes, you must set parallel=true. This allows SQL*Loader to manage the parallel inserts. If you were to try to do multiple, concurrent direct path loads yourself by running multiple instances of SQL*Loader, you'd run into the same TM enqueue problem.
    The question as to why the TM enqueue is taken in exclusive mode, has to do with how direct path load works. Oracle loads data into previously unformatted, completely empty data blocks from above the HWM. When the load is complete, the HWM is adjusted, and the data is available. Well, Oracle can't allow for multiple concurrent direct loads, all allocating space from above the HWM, and all messing w/ the HWM. This would cause a bit of a problem. And really, you don't want non-direct load DML going on either. So, Oracle disallows it, by taking the TM enqueue in exclusive mode. (Normal DML, non-direct load, takes the TM enqueue in a sharable mode, allowing for other concurrent DML.)
    Hope that's clear,
    -Mark
    Message was edited by:
    Mark J. Bobak

  • Browser on 8310 SmartPhone Edge comes up with Critical Error and cannot be used, help please?

    Hi, my name is Sater and I'm the lone I.T. guy for a small medical device company (about 40 ppl) based in Fremont, CA.  So...
    All of a sudden my vp of marketing comes in and says that he can't use the Browser function on his BB (8310 SmartPhone Edge) anymore.  Naturally I'm intrigued, but this is a very strange error that pops up.  It doesn't matter how many settings I go in and change, there's no budging it.  Here is what it's telling me...
    "Unable to connect to the selected Mobile Data Service, please try again later.  If the problem persists please contact your administrator."
    So I decide after about an hour of messing with settings and getting nowhere to call AT&T support.  They said when that error comes up with "please contact your administrator", it's because it can't connect to the BES server anymore and that we would have to consult that with whomever runs that server.  To give you a little background, we went through an outsourced Exchange provider called TheMessageCenter.com. They were alright, but my VP of R&D was pretty bent by some of the lack of customer service skills they presented to him when he was in an email crisis.  Needless to say one of the very first missions I ever had at this place was to find a new email solution and integrate the migration.
    So basically AT&T said they couldn't do anything and that I would have to contact our outsourced providor (TheMessageCenter.com, since we ran both Exchange and BES through them before we switched) back to get the settings cleared off the BES server hosting his phone Pin and info.  I called them up, (mind you we had been away from TheMessageCenter.com for a good couple weeks now) and they claimed they had no other active processes running for our company anywhere on their BES servers or frankly, ANYWHERE lol.  So naturally he's looking at me to fix this, and I am seriously stumped!  Should I do some kind of Factory reset?  If so, how can I load all his contacts/settings back the way he had it?  Any help on this matter, (especially if treated as urgent... I know you hate to hear that, but I said it for all you I.T. guys haha) would be GREATLY appreciated!!  Thanks
    Respectfully,
    Sater K.
    Systems Administrator
    SpineView Inc.
    Fremont, CA 94539

    Hi,
    The browser icon uses the BES service, unless you have signed up for the BIS ONLY servcie, wherein you get access to the internet through RIM's servers.
    Since your servcie is a BES servcie the access to the internet is through the BES.
    The MDS is a service running on the BES to authenticate you. (and thus the error)
    So, No BES = No  Internet access using the Browser icon!
    So, I need a little clarificatuioin. 
    Did you move from one BES to another? Or did the user simply switch carriers?
    It sounds as if you moved from one third company BES to another third company BES... Is that right?
    If so then contact your New BES and ensure that they allow ppl to use the MDS servcie for internet access (Most companies charge extra for that feature! - Because they can!).
    If your hosting the BES (Now), and it was Themessagingcentre.com before, then you need to Reactivate the Handset for the  new BES. I have a feeling that he is now getting the emails through the BIS service and the handset wasnt wiped and so it is stil trying to access the old BES....
    So can you please give details such as:
    BES - where was it hosted:
    BES - where is it now hosted:
    NEW BES: Is the MDS service enabled and can people currently use it to browse?
    Have you tested with other BB handsets to ensure you/user  are clicking the same icons on both handsets (most ppl do different things to access in their own way, so simply asking them if it works doesnt help!)
    The alternative is to use the expensive WAP browser. It will work but will rack up huge charges.
    Let us know how it goes...
    Checked out my Blackberry FAQ's and Links to Needed Articles here
    http://darkeen.homelinux.com/index.php/Blackberryfaq

Maybe you are looking for

  • Photo files, and iPhoto (or comparable system)

    I have this new mac - for a few weeks, and I want to access photos that are separated in file folders within a 250 gig external hard drive. What I really wanted to do - was to watch the photos from these folders in a slideshow sort of way (like the f

  • Please Advice the following

    Dear friends, Can anyone show me a Tutorail or so. where it explain how to create rotating banners, I mean like When we go to a website, they have a banner. And then like in 1 second some text comes, then something else comes, and repeats same thing.

  • Hash function in directory server

    Dear all, We have a very large database so when we setup our LDAP server, we add a number(between 0 and 256) ou to LDAP schema. The number is calculated from the user email address with a hash function. However we have such a problem when we want to

  • Jdbcodbc connection error

    When I am trying to access the database using JDBC ODBC driver from webdynpro I am getting connection error.  The following code I am using to get the connection for the database public java.sql.Connection getConnection( ) //@@begin getConnection() C

  • Suppressing Popup screens while controlling Communication Channel externaly

    Hello PI Gurus I have figured out how to control communication channel externally for stopping and starting the channels. I am trying to write a simple abap code to do this. Since I have several channels, I am putting in a loop. It is doing the job w