disable table locks
this is a small plsql script which disables locking for all tables in a schema to optimize performance
--script to disable begin--
DECLARE
CURSOR GET_TABLES IS
SELECT TABLE_NAME FROM user_tables;
BEGIN
FOR v_table IN GET_TABLES LOOP
EXECUTE IMMEDIATE ('ALTER TABLE ' || v_table.table_name || ' DISABLE TABLE LOCK');
END LOOP;
END;
/
exit
--script to disable end--
--script to enable begin--
DECLARE
CURSOR GET_TABLES IS
SELECT TABLE_NAME FROM user_tables;
BEGIN
FOR v_table IN GET_TABLES LOOP
EXECUTE IMMEDIATE ('ALTER TABLE ' || v_table.table_name || ' ENABLE TABLE LOCK');
END LOOP;
END;
/
exit
--script to enable end--
DECLARE
CURSOR GET_TABLES IS
SELECT TABLE_NAME FROM user_tables;
BEGIN
FOR v_table IN GET_TABLES LOOP
EXECUTE IMMEDIATE ('ALTER TABLE ' || v_table.table_name || ' DISABLE TABLE LOCK');
END LOOP;
END;
/
exit
--script to disable end--
--script to enable begin--
DECLARE
CURSOR GET_TABLES IS
SELECT TABLE_NAME FROM user_tables;
BEGIN
FOR v_table IN GET_TABLES LOOP
EXECUTE IMMEDIATE ('ALTER TABLE ' || v_table.table_name || ' ENABLE TABLE LOCK');
END LOOP;
END;
/
exit
--script to enable end--
Created by
zwluxx
Last modified 2006-11-01 03:26 PM
Last modified 2006-11-01 03:26 PM