SQL> grant alter user to alteruser; Grant succeeded. SQL> select * from DBA_SYS_PRIVS where grantee like 'ALTER%USER%'; GRANTEE PRIVILEGE ADMIN_ -------------------- ------------------------- ------ ALTERUSER UNLIMITED TABLESPACE NO ALTERUSER ALTER USER NO SQL> conn / as sysdba Connected. SQL> CREATE or REPLACE TRIGGER prohibit_alter_SYSTEM_SYS_pass BEFORE ALTER on ALTERUSER.schema BEGIN IF ora_sysevent='ALTER' and ora_dict_obj_type = 'USER' and (ora_dict_obj_name = 'SYSTEM' or ora_dict_obj_name = 'SYS') THEN RAISE_APPLICATION_ERROR(-20003, 'You are not allowed to alter SYSTEM/SYS user.'); END IF; END; / Trigger created.使用范例:
User altered.
本文转自maclean_007 51CTO博客,原文链接:
http://blog.51cto.com/maclean/1278217