Can I change the default lock time of an Oracle object?

> ALTER PACKAGE blah COMPILE; (wait about 10 minutes) > ORA-04021: timeout occurred while waiting to lock object 

I understand why I get a timeout error (packet in use).

Does anyone know if there is a way to change the default wait interval to 10 minutes? Can this be configured at the database / session / agent level?

thanks

+6
oracle locking
source share
1 answer

parameter DDL_LOCK_TIMEOUT , since 11gR1:

DDL_LOCK_TIMEOUT indicates the time limit for how long DDL statements will wait in the DML lock queue. A default value of zero indicates the status of NOWAIT . A maximum value of 1,000,000 seconds will cause the DDL statement to expect to be able to obtain a DML lock.

I'm not sure if you can change the default timeout in previous releases.

+6
source share

All Articles