Triggers 授權

taogchan發表於2011-04-13
CREATE OR REPLACE TRIGGER SYS.audit_TRI_NO_DROP
BEFORE DROP
ON DATABASE
BEGIN
 
  IF ora_dict_obj_type IN ('TABLE')
   
     AND ((USER NOT IN ('SYS','SYSTEM')) AND USER IN ('EAI','MKT','SCM_ADMIN','OMS','SCM','QUEST','SCM_ADMIN','TMS','WMS'))
   
     AND 1 = 1 THEN
    raise_application_error(num => -20001,
                            msg => '不允許對表' || ora_dict_obj_name ||
                                   '進行刪除!');
  END IF;
END;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22392018/viewspace-692378/,如需轉載,請註明出處,否則將追究法律責任。

相關文章