In this blog post, you’ll learn more about the Sybase Error User ‘%1’ has the row in ‘%2’ locked and the reason for receiving this error
Sybase SQL Error Message
User ‘%1’ has the row in ‘%2’ locked
Reason for this Error
The operation failed because another connection holds a lock on the same object you are attempting to modify. With INSERT, UPDATE, DELETE, SELECT, or MERGE statements this error is typically caused by attempting to read or write a row that is locked by another user, while the database option ‘blocking’ is set to Off. With data definition statements, including CREATE, DROP, GRANT, REVOKE, REFRESH, or ALTER, this error can be generated when the connection executing the DDL statement is unable to obtain an exclusive lock on the object to be modified (table, view, materialized view, or index) so that the operation can proceed. During some operations (for example, refreshing a materialized view), a connection can temporarily set blocking to Off to complete the operation. The temporary setting only applies to the connection and is reset after the operation completes if the initial setting was On. However, a SQLCODE -210 SQLSTATE 42W18 error can be generated during the time that blocking is set to Off.