CREATE USER "OPS$AAAAXDVP" IDENTIFIED EXTERNALLY DEFAULT TABLESPACE AXTAB TEMPORARY TABLESPACE AXTMP PROFILE DEFAULT ACCOUNT UNLOCK; GRANT RESOURCE TO "OPS$BBBAXDVP"; GRANT CONNECT TO "OPS$BBBAXDVP"; ALTER USER "OPS$AVONAPAXDVP" DEFAULT ROLE ALL; BEGIN SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( PRIVILEGE => SYS.DBMS_RULE_ADM.ALTER_ANY_RULE_SET, GRANTEE => 'OPS$BBBAXDVP', GRANT_OPTION => TRUE); END; / GRANT EXECUTE ANY LIBRARY TO OPS$AVONAPAXDVP;
如果照此权限直接执行,会报如下错误:
CREATE USER "OPS$AAAAXDVP" IDENTIFIED EXTERNALLY DEFAULT TABLESPACE AXTAB TEMPORARY TABLESPACE AXTMP PROFILE DEFAULT ACCOUNT UNLOCK; GRANT RESOURCE TO "OPS$BBBAXDVP"; GRANT CONNECT TO "OPS$BBBAXDVP"; ALTER USER "OPS$AVONAPAXDVP" DEFAULT ROLE ALL; BEGIN SYS.DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE( PRIVILEGE => SYS.DBMS_RULE_ADM.ALTER_ANY_RULE_SET, GRANTEE => 'OPS$BBBAXDVP', GRANT_OPTION => TRUE); END; / GRANT EXECUTE ANY LIBRARY TO OPS$AVONAPAXDVP;