Skip to main content
SQLOZ
Chapter 18 DBA & Production Safety

Chapter 18: OzLockTree - Lock Resolver

Info: This chapter explains the use of the OzLockTree tool that visualizes dependencies during lock crises, root-blocker detection, and the difference between KILL QUERY and KILL CONNECTION. OzLockTree is a server administration tool and is unavailable for SQLite.

In this chapter:

18.1 Live Lock Tree View

OzLockTree presents the available lock dependencies in a table with blocker highlighting and relationship summaries.

  • Root Blocker: The main process causing the lock is highlighted in red.
  • Waiting Queries: Processes waiting for another query are listed with their relationship summary.

Tip: Use the relationship summary on each row to see which query is waiting for which.

18.2 Kill Query vs Kill Connection

When a process is selected, two termination options are offered.

  • Kill Query (safe): Cancels only the query holding the lock while keeping the user’s session open.
  • Kill Connection (dangerous): Fully closes the user’s database session at the server level.

Warning: Try Kill Query first. Only if that is not enough should you use Kill Connection.

18.3 Long-Running Open Transaction Tracking

One of the most insidious lock causes is an application that starts BEGIN and forgets the connection without calling COMMIT. OzLockTree marks open transactions waiting uncommitted for longer than 5 minutes (300 seconds) in red when the server supplies the required lock and process facts. If those facts cannot be read or are invalid, the tool reports that no blocker was confirmed. Termination still goes through the normal destructive/admin confirmation path.