Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: how can you protect read-only indexes?

Re: how can you protect read-only indexes?

From: Juan Carlos Reyes Pacheco <juancarlosreyesp_at_gmail.com>
Date: Thu, 3 Mar 2005 13:10:03 -0400
Message-ID: <cd4305c105030309105d3bebd2@mail.gmail.com>


(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?.

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 03 2005 - 12:26:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US