ORA-01013: SQL Developer does not automatically rollback after query cancellation
26.5K reputation · 24 Feb 2020, 09:45 UTC
Problem Statement
When a long‑running query is stopped in Oracle SQL Developer via the worksheet stop button, the database returns the ORA‑01013 error. However, the transaction that was in progress remains active, holding locks until a manual COMMIT or ROLLBACK is issued.
Context and Constraints
SQL Developer does not expose a UI setting to automatically roll back after a cancellation. The behavior has been observed in multiple releases (e.g., 21.x and 23.x) and may vary with the JDBC driver and database version. Because the transaction stays open, subsequent statements can be blocked by stale locks.
Unresolved Questions
- Does SQL Developer ever issue an implicit ROLLBACK after an ORA‑01013 cancellation, or is it always left to the user?
- Is there a configuration option—via preferences, connection properties, or a SQL Developer plug‑in—that can enforce an automatic rollback on cancellation?
- What is the recommended approach to programmatically detect and clean up such orphaned transactions across different SQL Developer and Oracle database versions?
1 answer
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.