понедельник, 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;

Work with NFS on Linux

--
-- Work with NFS on Linux
--

-- On NFS Server:
chkconfig --list
chkconfig --level 345 nfs on
service nfs start

vi /etc/exports
/u05/oracle/backups replica(rw)

service nfs reload


-- On NFS Client:
mount -t nfs aqua:/u05/oracle/backups /mnt/aqua_backups
umount /mnt/aqua_backups

vi /etc/fstab
aqua:/u05/oracle/backups /mnt/aqua_backups      nfs     soft,bg         1 2

mount /mnt/aqua_backups