NOWAIT error?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: NOWAIT error?

  1. #1
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Unhappy



    I have a cronjob that exports data from the DB and then truncates the tables. This job has worked fine for the past 6 months, but now I am getting the following errors. The export works good, and then BOOM. What exactly is a "nowait" and how can I fix it?
    thanks,
    Magnus


    truncate table ACTIONS;
    truncate table APP_TICKER;
    truncate table CUST_DATA;
    truncate table INVESTMENT_PLANNER;
    truncate table ACTIONS
    *
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified


    truncate table CUST_DATA
    *
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified

    shamrock% oerr ORA 00054
    00054, 00000, "resource busy and acquire with NOWAIT specified"
    // *Cause: Resource interested is busy
    // *Action: Retry if necessary



  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    That means that someone has snuck in and started modifying data in your table. Whenever somebody has any type of write lock, you can't truncate.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Oct 2000
    Location
    Cambridge, MA (Boston)
    Posts
    144
    The way to fix it is to check for users with a lock on these tables and kill the sessions. This may or may not be appropriate for your environment, however!

    D.

  4. #4
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Red face so ...


    So the tables are being written to as my cronjob attempts to truncate the tables?

  5. #5
    Join Date
    Oct 2000
    Location
    Cambridge, MA (Boston)
    Posts
    144
    yes, jeff has correctly determined the source of your trouble; there is a write lock of some sort on the table. It could be DDL but more than likely is DML (e.g. update, insert, delete, or select for update).
    D.

  6. #6
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Angry ok, but how?


    what query do I need to run to see what session has locks on those tables?

    do I just query the v$session table?

  7. #7
    Join Date
    May 2000
    Location
    Portsmouth, NH, USA
    Posts
    378

    Talking ah hah!


    TOAD helped me out and I found the Locked sessions.
    How can I research why it was locked tho?

    - Magnus

  8. #8
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I think you have to query v$lock, v$locked_object

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width