OracleORA-00054
ORA-00054: Resource Busy and Acquire with NOWAIT Specified
ORA-00054 is raised when a DDL statement or a SELECT FOR UPDATE NOWAIT cannot acquire the lock immediately because another session holds it. DDL operations in Oracle require exclusive locks.
Example Query
ALTER TABLE orders ADD COLUMN notes VARCHAR2(500); -- Fails if another session has an open transaction on orders
Common Causes
- 1Running DDL (ALTER, DROP, TRUNCATE) while active DML transactions hold locks
- 2Long-running transactions not committed or rolled back
- 3Using SELECT FOR UPDATE NOWAIT when a row is already locked
How to Fix It
Find and end blocking sessions: SELECT sid, serial#, status FROM v$session WHERE blocking_session IS NOT NULL. Commit or roll back open transactions before running DDL. Schedule DDL changes during low-traffic maintenance windows.
Need a reliable database?
Try Supabase — free PostgreSQL with a generous free tier. No credit card required.
Got a query causing this error?
Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.
Analyze My Query →