July 05, 2015

DDL_LOCK_TIMEOUT — new 11g DDL wait parameter

Hello lads,

need to do DDL but bunch of process accessing that objects, below parameter very much use full for such case

DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue. The default value of zero indicates a status of NOWAIT. The maximum value of 1,000,000 seconds will result in the DDL statement waiting forever to acquire a DML lock.

 here is the example, recreate seq which accessing by lot's of processes

SQL> ALTER SESSION SET ddl_lock_timeout=5;

Session altered.

Elapsed: 00:00:00.00
SQL> DROP SEQUENCE "USER"."SEQUENCE_NAME";

Sequence dropped.

Elapsed: 00:00:00.17
SQL> CREATE SEQUENCE  "USER"."SEQUENCE_NAME"  MINVALUE 1 MAXVALUE 999999999;

Sequence created.

Elapsed: 00:00:00.07

Enjoy sharing.. :)

No comments:

Post a Comment