Clearing Long-Running Transactions

You can clear a long-running transaction in one of two ways:

  1. Using the Transact-SQL kill command.

  2. Restarting Adaptive Server.

If the long-running transaction is due to a runaway query, and the process with the open transaction has been identified, use the kill command to stop the process. This clears the transaction and allows the log to be truncated. If the kill command cannot stop the process, restart Adaptive Server to resolve the problem.

Restarting Adaptive Server causes the database to go through normal recovery, so any outstanding transactions are either committed or rolled back.

If this type of problem occurs frequently, Sybase Technical Support may be able to identify which process is involved.