If you use WAIT N then the error code is ORA-30006, not ORA-54 as with NOWAIT....