Cannot write to a locked table

Possible causes

The following error message is reported, when an attempt is made to write to an object to which another user already has write access.

Cannot open the requested object for write in the current transaction (TxnID1). Another user has write access in transaction TxnID2.

Action

Use the sp_iqlocks stored procedure to identify users who are blocking other users from writing to a table. This procedure displays information about locks currently held in the database, including the connection and user ID that holds the lock, the table on which the lock is held, the type of lock, and a name to identify the lock.

The error message also includes the transaction ID of the user who is attempting to write (TxnID1)and the transaction ID of the user who is currently writing (TxnID2). If you need more detailed information about the transaction that has locked the table, run the sp_iqtransaction stored procedure.

See also

Chapter 9, “System Procedures” in the Sybase IQ Reference Manual and “Managing write lock contention on a table”.