Re: how can you protect read-only indexes?

  • From: Juan Carlos Reyes Pacheco <juancarlosreyesp@xxxxxxxxx>
  • To: carmen.rusu@xxxxxxxxxxxxxxx
  • Date: Thu, 3 Mar 2005 13:10:03 -0400

(append to previous email)
I think the problem carmen could be solved in this way
1) 
CREATE OR REPLACE TRIGGER sys.tgr_drop
 AFTER
  DROP
 ON DATABASE
DECLARE
 eERROR exception;
begin
if ora_dict_obj_name= 'IDX_1' then
 raise eerror;
end if;
END;
/


CREATE UNIQUE INDEX ctb.IDX_1 ON ctb.ajupatri
  (    ajp_DSM                  ASC  )
  TABLESPACE  TBL_READONLY_IDX
/
drop index ctb.IDX_1;  -- can't drop


yo can add code to verify the object tablespace and type (index and in
the tablespace readonly)
This definetively wil block the delete

2) The other point is how to restore, because the index is not
dropped, what is dropped is the registratoin of the index in the
dictionary.
I think the point goes that way too, how to recreate the reference
from the index?.
--
//www.freelists.org/webpage/oracle-l

Other related posts: