Oracle 12c adds a potentiall very useful feature to the dbms_redefinition package, in the procedure finish_redef_table: dml_lock_timeout
It specifies a time limit in seconds for how long a DML statment waits in a DML lock queue, before the procedure terminates gracefully.
By default, this parameter is set to 0 which means no waiting at all; the procedure will simply error out if it cannot get a lock on the table.
The maximumm value is 1000000 and will cause any DML statements to wait in perpetuity to aquire a DML lock.
Here is an example of its usage, where I have set the limit to 5 minutes (300 seconds):
BEGIN DBMS_REDEFINITION.FINISH_REDEF_TABLE(uname=>'SCOTT', orig_table=>'EMP', int_table=>'EMP_INTERIM', dml_lock_timeout=>300); END; /
No comments:
Post a Comment