Locked table by an insert

Hi,
some times an insert locks all the concerned table this transaction is always from web.
Any idea?
regards.

Here are some questions:
How can the table be locked, preventing DML by other users?
1) Is your application or users issuing SELECT FOR UPDATE commands
2) Is your application or users issuing LOCK TABLE IN EXCLUSIVE MODE
3) Is referential integrity being checked on foreign keys that do not have an index? If so, shared locks can be issued against the table limiting DML execution until the RI checks are complete.
Are you sure there is a table lock?
1) What are users waiting on when this problem occurs? Check v$session_wait for this. Also join v$session and v$lock on SID to see who has the lock(s) blocking the table.

Similar Messages

  • Lock tables when load data

    Are there any way to lock tables when i insert data with SQL*Loader? or oracle do it for me automatically??
    how can i do this?
    Thanks a lot for your help

    Are there any problem if in the middle of my load (and commits) an user update o query data ?The only problem that I see is that you may run short of undo space (rollback segment space) if your undo space is limited and the user is running a long SELECT query for example: but this problem would only trigger ORA-1555 for the SELECT query or (less likely since you have several COMMIT) ORA-16XX because load transaction would not find enough undo space.
    Data is not visible to other sessions, unless, the session which is loading data, commits it. That's the way Oracle handle the read committed isolation level for transaction.
    See http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96524/c21cnsis.htm#2689
    Or what happens if when i want to insert data someone has busy the table?You will get blocked if you try to insert data that has the same primary key as a row being inserted by a concurrent transaction.

  • Few lock table questions ...

    I have an app with Java + Oracle. I have a few tables which can be modified ( select, insert, up, del) by more than one user.
    For ex
    //---------- get info from database
    SELECT a FROM A;
    // later
    SELECT b FROM B;
    // --------- end
    Q1). how can I make sure that after I select from A, no one modifies table B, until I select from B ?
    Q2). If I have 3 tables and I have to insert some values, in all of them, how should I do this ? ( lock tables, put the insert * 3 into an transaction, release locks)
    Q3). I know that jdbc-odbc isn't very good, but still, can I use it ?

    Q1). how can I make sure that after I select from A,
    no one modifies table B, until I select from B ?No one modifies table B in any way at all? While the user goes for a coffee break? Why would you want that?
    Q2). If I have 3 tables and I have to insert some
    values, in all of them, how should I do this ? ( lock
    tables, put the insert * 3 into an transaction,
    release locks)Just insert the records. You can put the three inserts in a transaction, if you need that, but there's no point in preventing other users from accessing the tables while you do that.
    Database applications that use Oracle or other databases designed for large numbers of users rarely lock tables. If your design leads you into a place where you have to lock tables then you probably need to go back and fix your design so that it supports multiple users in a normal way.
    Q3). I know that jdbc-odbc isn't very good, but
    still, can I use it ?Sure. But Oracle comes with its own JDBC drivers so you don't need to.

  • Timeout when inserting row in a locked table

    How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
    Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
    Any idea ???

    You could set an alarm() in a signal. Then on return (for whatever reason) you clear the alarm, inspect the return code of the sql execute call and determine what happened (i.e. did the transaction completed or did the alarm get you).
    Hope it helps.
    -Lou
    [email protected]
    How can I set the timeout before an INSERT statement fails with error ORA-02049 (timeout: distributed transaction waiting for lock) when the entire table has been lock with LOCK TABLE .
    Documentation says to modify DISTRIBUTED_LOCK_TIMEOUT parameter, but it is obsolete in Oracle 8i.
    Any idea ???

  • How to lock a table when i insert a row

    hi, friends,
    how to lock a table when i insert a row, then unlock the table

    If you want to lock the whole table so that no-one else can do DML then you go LOCK TABLE <table> IN EXCLUSIVE MODE. This lock remains in force until you commit or rollback.
    There are less powerful locking modes available, but you can look those up in the OTN online documentation.
    APC

  • Insert & Update while Locking tables

    Update & Insert
    Is it possible for me to insert a record and update 2 fields in another record, whil locking the database tables for the process to take place?
    If so, how?
    Thanks
    Pete

    I don't know which database server you are using. But in MySQL, you can do something like this:
    <?php
    function get_next_number( $field = 'id' )
         $id = 0;
         //Lock the table for write
         mysql_query('LOCK TABLES name_of_table WRITE');
         $sql = 'SELECT '.$field.' FROM name_of_table ORDER BY '.$field.' DESC LIMIT 1';
         $query = mysql_query($sql);
         if ( mysql_num_rows($query) > 0 )
              $row = mysql_fetch_row($query);
              //Get the $field value
              $id = $row[0];
         //Unlock tables
         mysql_query('UNLOCK TABLES');
         return ++$id;
    ?>
    I didn't test this function, but the idea is that
    Check if you are connected to MySQL server
    Regards,
    Rafael

  • MySQL lock table size Exception

    Hi,
    Our users get random error pages from vibe/tomcat (Error 500).
    If the user tries it again, it works without an error.
    here are some errors from catalina.out:
    Code:
    2013-07-31 06:23:12,225 WARN [http-8080-8] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:23:12,225 ERROR [http-8080-8] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:23:12,242 WARN [http-8080-8] [org.kablink.teaming.web.portlet.handler.LogContextInfoInterceptor] - Action request URL [http://vibe.*******.ch/ssf/a/do?p_name=ss_forum&p_action=1&entryType=4028828f3f0ed66d013f0f3ff208013d&binderId=2333&action=add_folder_entry&vibeonprem_url=1] for user [kablink,ro]
    2013-07-31 06:23:12,245 WARN [http-8080-8] [org.kablink.teaming.spring.web.portlet.DispatcherPortlet] - Handler execution resulted in exception - forwarding to resolved error view
    org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: org.kablink.teaming.domain.FolderEntry; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.kablink.teaming.domain.FolderEntry
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:654)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    2013-07-31 06:23:36,474 ERROR [Sitescape_QuartzSchedulerThread] [org.quartz.core.ErrorLogger] - An error occured while scanning for the next trigger to fire.
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: The total number of locks exceeds the lock table size [See nested exception: java.sql.SQLException: The total number of locks exceeds the lock table size]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2794)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$36.execute(JobStoreSupport.java:2737)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3768)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2733)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
    Caused by: java.sql.SQLException: The total number of locks exceeds the lock table size
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
    at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1169)
    2013-07-31 06:27:12,463 WARN [Sitescape_Worker-8] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:27:12,463 ERROR [Sitescape_Worker-8] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:27:12,463 ERROR [Sitescape_Worker-8] [org.jbpm.graph.def.GraphElement] - action threw exception: Hibernate operation: could not execute update query; uncategorized SQLException for SQL [update SS_ChangeLogs set owningBinderKey=?, owningBinderId=? where (entityId in (? , ?)) and entityType=?]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute update query; uncategorized SQLException for SQL [update SS_ChangeLogs set owningBinderKey=?, owningBinderId=? where (entityId in (? , ?)) and entityType=?]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    2013-07-31 06:27:22,393 INFO [CT-kablink] [org.kablink.teaming.lucene.LuceneProvider] - (kablink) Committed, firstOpTimeSinceLastCommit=1375251142310, numberOfOpsSinceLastCommit=12. It took 82.62174 milliseconds
    2013-07-31 06:28:22,686 INFO [Sitescape_Worker-9] [org.kablink.teaming.jobs.CleanupJobListener] - Removing job send-email.sendMail-1375252102500
    2013-07-31 06:29:51,309 INFO [Sitescape_Worker-10] [org.kablink.teaming.jobs.CleanupJobListener] - Removing job send-email.sendMail-1375252191099
    2013-07-31 06:32:08,820 WARN [http-8080-2] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:08,820 ERROR [http-8080-2] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:10,775 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:10,775 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:12,305 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:12,305 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:14,605 WARN [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:14,606 ERROR [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:16,056 WARN [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:16,056 ERROR [http-8080-3] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:24,166 WARN [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1206, SQLState: HY000
    2013-07-31 06:32:24,166 ERROR [http-8080-1] [org.hibernate.util.JDBCExceptionReporter] - The total number of locks exceeds the lock table size
    2013-07-31 06:32:24,167 WARN [http-8080-1] [org.kablink.teaming.spring.web.portlet.DispatcherPortlet] - Handler execution resulted in exception - forwarding to resolved error view
    org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: could not insert: [org.kablink.teaming.domain.AuditTrail]; uncategorized SQLException for SQL [insert into SS_AuditTrail (zoneId, startDate, startBy, endBy, endDate, entityType, entityId, owningBinderId, owningBinderKey, description, transactionType, fileId, applicationId, deletedFolderEntryFamily, type, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'A', ?)]; SQL state [HY000]; error code [1206]; The total number of locks exceeds the lock table size; nested exception is java.sql.SQLException: The total number of locks exceeds the lock table size
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:805)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:791)
    at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)
    It always logs the Mysql error code 1206:
    MySQL :: MySQL 5.4 Reference Manual :: 13.6.12.1 InnoDB Error Codes
    1206 (ER_LOCK_TABLE_FULL)
    The total number of locks exceeds the lock table size. To avoid this error, increase the value of innodb_buffer_pool_size.
    The value of innodb_buffer_pool_size is set to 8388608 (8MB) on my server.
    In the documentation (MySQL :: MySQL 5.4 Reference Manual :: 13.6.3 InnoDB Startup Options and System Variables) it says that the default is 128MB.
    Can i set the value to 134217728 (128MB) or will this cause other problems? Will this setting solve my problem?
    Thanks for your help.

    I already found an entry from Kablink:
    https://kablink.org/ssf/a/c/p_name/s...beonprem_url/1
    But i think this can't be a permanent solution...
    Our MySQL Server version is 5.0.95 running on sles11

  • Lock tables during partition exchange

    Hi,
    I want to do the following thing:
    there are 9 partitioned tables (set A) and 9 non partitioned (set B).
    There is a continuous dataflow into set A.And there is also a dependency between the nine flows within each transaction into set A (there is no dependency between different transactions.).
    What I want is to exchange the nine partitions of set A with set B. This because I want to have a performance boost instead of copying the data from A into B.
    I need to lock the tables of set A to make sure there is NO insertion of data into one of the tables of set A to avoid loss of dependency and thus loss of data.
    I tried several things: lock tables, run autonomous transaction in which the exchange takes place, commit and unlock. But no success.
    Who can help me to solve my problem: to lock all nine tables of set A and make sure the dependency remains consistent and no data gets lost?
    Thanks.
    jurgen

    Why you are bothering about LOCKing the table,
    you can goahead and do the exchange the table,
    since, its ongoing activity, exchanged partition will be there till you merge, drop it.
    if you found some more rows after exchange, then you can insert same into that table, or make another table.
    Thanks

  • Locking tables

    I am declaring and using the following cursor:
         CURSOR curCompany IS
              SELECT c.Company_ID, c.No_Employees
                   FROM Company c
                   WHERE (SELECT COUNT(*) FROM Student s
                        WHERE s.Company_ID = c.Company_ID) > 0;I would like to include a FOR UPDATE OF Student.col to it so rows could be locked while they are being updated, but can't.
    1) What is the best way of locking the table? I've been reading up on LOCK TABLE and am willing to use it but would like to hear what you guys have to say on this.
    2) Is there an operator/function like EXISTS that would replace the sub-query in the WHERE clause?

    I will tell you real world scenario:
    <br><br>
    Let suppose I have a table from I am getting series for my transaction depending on some parameter.<br>
    <br>
    Here at the time of pre insert in my form I use as follows:
    <br><br>
    Select series from table_name FOR UPDATE;
    <br><br>
    Offcourse I add in condition also.
    <br><br>
    At the time of post insert I release the lock as follows:
    <br><br>
    Update table_name SET series+1 with condition.
    <br><br>
    Why I am doing this because I want to make sure same number is not used by two transaction.
    <br><br>
    Raj<br><br>
    <b>www.oraclebrains.com<a>
    <br><font color="#FF0000" size="1">POWERED by the people, to the people and for the people WHERE ORACLE IS PASSION.</font></b>

  • Lock Table and permit only SELECT-Statement

    Hi all,
    can I lock a Table and permit only SELECT-statements on a Table?
    Regards
    Leonid

    Hi Kamal,
    I would like to configure it in such a way that if I implement the SELECT statement, another user can't insert
    a data into the table.
    If it is possible, I even the LOCK would like in such a way to configure the fact that the entry of the user arrives into the buffer and if the table is unlocked, all lines from the Buffer again into the table.
    I make it in such a way:
    SQL Script script_test.sql:
    set echo off
    set verify off
    set pagesize 0
    set termout off
    set heading off
    set feedback off
    lock table mytable in share row exclusive mode;
    spool c:\Temp\script_info.lst
    select id||'|'||dae||'|'||name||'|'||name1||'|'||hiredate
    ||'|'||street||'|'||nr||'|'||plznum||'|'||city
    ||'|'||email||'|'||telephon||'|'||cddfeas||'|'||number
    ||'|'||why||'|'||fgldwer||'|'||wahl||'|'||adress
    ||'|'||las
    from mytable
    where las is null
    spool off
    spool c:\Temp\select_from_all_tables.lst
    select *
    from all_tables
    order by owner
    spool off
    spool c:\Temp\select1_from_all_tables.lst
    select *
    from all_tables
    order by owner
    spool off
    update mytable
    set las = 'x';
    commit;
    set feedback on
    set heading on
    set termout on
    set pagesize 24
    set verify on
    set echo on
    Afterwards I start another session:
    insert into briefwahl
    values(38,'11.06.2003 09:37','Test','Test','01.01.1990',
    'Test','12','90000','Test',
    '[email protected]','12345657','test','123',
    'test','test','test','test',
    null);
    Then I go into the first session and start script. And I go immediately into the second session and do commit; And although I have the table closed, the new entries are spent also with spool into the .lst-File. Why, I do not understand. And in the table all lines become updated.
    Regadrs
    Leonid
    P.S. Sorry for my English. I have write with translator.

  • Lock table for update in adf

    dear all ,
    am using Jdeveloper 11.1.1.3 with oracle database 10g,
    now what i need to do is when inserting a new row in one of my entities i need to lock the entire database table until the commit happen...
    i'll explain to u why I need to do this,,, let say that the table x contains the following columns
    x_pk number, ( which is the primary key )
    x_serial number,
    x_type varchar2 );
    now am getting x_pk from a sequence on a database so its not a problem,
    but for x_serial it needs to be serialized per x_type , now in oracle forms developer i used to do the following in per-insert trigger on the block level-->
    lock table for update then selecting the max serial per the type then use it for setting the :x_serial that is in the same block...
    now in ADF , i should do this in the do_dml when the operation==DML_INSERT but am not sure what to write and if it will be working same as it was in the form developer
    thanks ,
    Lama

    Delta,
    I wrote a [url http://stegemanoracle.wordpress.com/2006/03/15/using-updatable-views-with-adf/]blog post some time ago for an earlier version of JDeveloper that implemented some custom locking behaviour for EOs - perhaps you can adapt the technique there to your needs?
    John

  • JDBC Lock Table

    I am developing two java programs that are accessing an Oracle database using JDBC. The two programs are to access to same table simultaneously.
    Is there a way I can use an sql LOCK TABLE command to lock a table while one program is writing to the table, and have the other program check for this Lock, and only proceed with updates on that table if the table is not locked? Would I need to have seperate database login IDs to accomplish this?
    For example:
    Program 1
    stmt.executeUpdate("LOCK TABLE A");
    //insert some records
    con.commit();
    Program 2
    While ( TABLE A IS LOCKED)
    //wait
    Update table A

    In future JDBC questions should be posted into the JDBC forum.
    Whatever you are doing don't. Just use transactions. Figure out what kinds of transaction serialization your setup supports too.

  • Help needed with locking tables+Mysql

    Hello!
    I have a table "A" which is of kind "auto_increament" (field "A1")
    When I do an insert in A I need to know the next "auto_increament" index because I have to encrypt that index into another field in A lets say this field is called A2.
    I understand that I have to do like like I do below (the semantic syntax) but I dont know the java syntax for locking tables and getting the next "auto_increament" index. The "lock type" of the ttable should be so now one else can write to the table.
    --------semantic syntax---------------
    1) LOCK A
    2) Get "next" index from A
    3) Make an insert
    4) UNLOCK A
    Very greatful for help!
    Regards/D_S

    http://www.mysql.com/search/?q=jdbc+autoincrement&base=http%3A%2F%2Fdev.mysql.com&lang=en&doc=0&m=a

  • Lock table: How to notify others

    Hi,
    I 've created a Stored Procedure that inserts into a table.
    The first and last statement of by BEGIN...END part of the stored procedure locks the table successfully.
    BEGIN
          LOCK TABLE MY_TABLE IN EXCLUSIVE MODE NOWAIT;
            COMMIT;
         LOCK TABLE MY_TABLE IN SHARE MODE NOWAIT;
    EXCEPTION
         WHEN OTHERS THEN
               dbms_output.PUT_LINE(SQLERRM);
              ROLLBACK;
    END;
    /The purpose is to lock the table so that if another user accidentally tries to execute the script s/he won't be able to modify the data in the table.
    However, if the procedure is already running when another user tries to execute it, the 2nd user simply sees the procedure to terminate very quickly (it normally takes around 15-20 minutes based on the data). No message that the table is locked or that the procedure is in progress from another user.
    How can I notify the 2nd user that the procedure is already in progress from another user or that the table is locked? What should I put in the EXCEPTION part maybe to do that?
    Thank you in advance.
    Regards,
    John.

    PRAGMA EXCEPTION_INIT(already_lock, -54);is 54 value meant for in-buit exception table
    le locked, if so, even without having a custom
    exception, oracle by itself would have thrown it in
    the second session, right???, please do correct me if
    iam wrong,
    -54, and yes it is.
    >
    what will be the impact if i have a WAIT instead of
    f NOWAIT, will my second session just be on hold
    waiting for lock to be released???Second session will wait... but WAIT doesn't exist, just write lock table t3 IN EXCLUSIVE MODE ;I advise you to read this for LOCK command : http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_914a.htm#2064408
    and this for exceptions : http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#784
    Nicolas.

  • Issue: Lock table is out of available object entries

    Hi all,
    We have a method to add records into BDB, and after there are more than 10000 records, if we continue add records into BDB, such as add 400 records into BDB, then do other update/add operation to BDB, it will be failed.
    The error message is Lock table is out of available object entries.
    How to resolve it?
    Thanks.
    Jane.

    Frist the BDB stat as bellow:
    1786 Last allocated locker ID
    0x7fffffff Current maximum unused locker ID
    9 Number of lock modes
    2000 Maximum number of locks possible
    2000 Maximum number of lockers possible
    2000 Maximum number of lock objects possible
    52 Number of current locks
    1959 Maximum number of locks at any one time
    126 Number of current lockers
    136 Maximum number of lockers at any one time
    26 Number of current lock objects
    1930 Maximum number of lock objects at any one time
    21M Total number of locks requested (21397151)
    21M Total number of locks released (21397099)
    0 Total number of lock requests failing because DB_LOCK_NOWAIT was set
    0 Total number of locks not immediately available due to conflicts
    0 Number of deadlocks
    0 Lock timeout value
    0 Number of locks that have timed out
    0 Transaction timeout value
    0 Number of transactions that have timed out
    736KB The size of the lock region
    0 The number of region locks that required waiting (0%)
    Then I run the method to insert 29 records into BDB, the BDB isn't locked yet, and the stat:
    1794 Last allocated locker ID
    0x7fffffff Current maximum unused locker ID
    9 Number of lock modes
    2000 Maximum number of locks possible
    2000 Maximum number of lockers possible
    2000 Maximum number of lock objects possible
    52 Number of current locks
    1959 Maximum number of locks at any one time
    134 Number of current lockers
    136 Maximum number of lockers at any one time
    26 Number of current lock objects
    1930 Maximum number of lock objects at any one time
    22M Total number of locks requested (22734514)
    22M Total number of locks released (22734462)
    0 Total number of lock requests failing because DB_LOCK_NOWAIT was set
    0 Total number of locks not immediately available due to conflicts
    0 Number of deadlocks
    0 Lock timeout value
    0 Number of locks that have timed out
    0 Transaction timeout value
    0 Number of transactions that have timed out
    736KB The size of the lock region
    0 The number of region locks that required waiting (0%)
    Then I run the method again to insert records, the issue "Lock table is out of available locks" occur, and the BDB stat:
    1795 Last allocated locker ID
    0x7fffffff Current maximum unused locker ID
    9 Number of lock modes
    2000 Maximum number of locks possible
    2000 Maximum number of lockers possible
    2000 Maximum number of lock objects possible
    52 Number of current locks
    2000 Maximum number of locks at any one time
    135 Number of current lockers
    137 Maximum number of lockers at any one time
    27 Number of current lock objects
    1975 Maximum number of lock objects at any one time
    26M Total number of locks requested (26504607)
    26M Total number of locks released (26504553)
    0 Total number of lock requests failing because DB_LOCK_NOWAIT was set
    0 Total number of locks not immediately available due to conflicts
    0 Number of deadlocks
    0 Lock timeout value
    0 Number of locks that have timed out
    0 Transaction timeout value
    0 Number of transactions that have timed out
    736KB The size of the lock region
    0 The number of region locks that required waiting (0%)
    Why this issue occur and how to resolve this issue.
    Thanks very much.
    Jane

Maybe you are looking for