During SQL execution, the following errors sometimes prevent the desired operation:
The transaction exceeds lock timeout specified by user
$ altierr -w "lock timeout"
0x11075 ( 69749) smERR_ABORT_smcExceedLockTimeWait The transaction exceeds lock timeout specified by user.
# *Cause: The transaction failed to lock the object.
# *Action: Please abort the transaction.
ALTIBASE HDB version 4 or later
During SQL execution, there are times when the following error occurs and the desired operation cannot be performed.
As shown in the above error code, it is an error that the object-table, view, stored procedure, etc. cannot be locked.
All sessions accessing the table hold the LOCK on the table and access it. In other words, if someone is executing DML such as SELECT/INSERT/UPDATE on the table or DDL such as ALTER TABLE, if DROP TABLE is executed, the previous operation will wait to commit/rollback.
In this case, make sure there are no users and wait for the previous operation to commit, or the session can be forced to be disconnected. The session can be forcibly terminated by using the alter database statement as shown in the example below.
* Check the lock information
* To forcefully close the session
1. Find the SESSION ID
2. Close the session
Terminating a session with the alter database command does not affect other parts of the session.
However, if the service system incorrectly identifies the session id and terminates the session, it may be a problem.
As a reference for operation, if the system is in service, even if the connected session is disconnected, if another application connects to access the table, a lock may be added, so it is necessary to consider this part as well.
If possible, it is advisable to disable the application while operating.