понедельник, 7 декабря 2009 г.

Index online redefinition repair

--
-- 1) alter index owner.index_name rebuild online;
-- 2)kill session
-- 3) ...
--

-- Check Locks On online_index:
select *
from v$session
where sid in
(select session_id from dba_dml_locks where name = 'EVENTCOMMIT')


-- Cleanup index:
declare
  retval boolean;
  object_id binary_integer;
  wait_for_lock binary_integer;
begin
  object_id := 71593;
  wait_for_lock := 0;
  
  retval := dbms_repair.online_index_clean (object_id, wait_for_lock);
  commit;
  
  dbms_output.put_line(retval);
end;

1 комментарий:

Unknown комментирует...

I have heard about similar way to repair the fix sql sever mdf file issues.