ORACLE resource角色

    技术2022-05-19  31

     

    1 resource 角色

     

     

     

        在oracle数据库中,不同角色的权限是不一样的,下面我们看一到resorce角色都有什么样的权限。从role_sys_privs或dba_sys_privs表中可以查看resource 角色中都有哪些权限。

      

     1.1 ROLE_SYS_PRIVS

    ROLE_SYS_PRIVS describes system privileges granted to roles. Information is provided only about roles to which the user has access.

    ColumnDatatypeNULLDescriptionROLEVARCHAR2(30)NOT NULLName of the rolePRIVILEGEVARCHAR2(40)NOT NULLSystem privilege granted to the roleADMIN_OPTIONVARCHAR2(3) Signifies the grant was with the ADMIN option

     

     

    SQL> select privilege from role_sys_privs where role='RESOURCE';

    PRIVILEGE----------------------------------------CREATE SEQUENCECREATE TRIGGERCREATE CLUSTERCREATE PROCEDURECREATE TYPECREATE OPERATORCREATE TABLECREATE INDEXTYPE

    8 rows selected.

     

    通过查询命令可以看到,resource角色有8个权限。

     

      1.2 DBA_SYS_PRIVS

    DBA_SYS_PRIVS describes system privileges granted to users and roles. This view does not display the USERNAME column.

    Related View

    USER_SYS_PRIVS describes system privileges granted to the current user. This view does not display the GRANTEE column, but instead displays the USERNAME column.

    ColumnDatatypeNULLDescriptionGRANTEEVARCHAR2(30)NOT NULLGrantee name, user, or role receiving the grantUSERNAMEVARCHAR2(30) Name of the current userPRIVILEGEVARCHAR2(40)NOT NULLSystem privilegeADMIN_OPTIONVARCHAR2(3) Grant was with the ADMIN option

     

     

     

    SQL> select grantee,privilege from dba_sys_privs where grantee='RESOURCE';

    GRANTEE          PRIVILEGE------------------------------ ----------------------------------------RESOURCE         CREATE TRIGGERRESOURCE         CREATE SEQUENCERESOURCE         CREATE TYPERESOURCE         CREATE PROCEDURERESOURCE         CREATE CLUSTERRESOURCE         CREATE OPERATORRESOURCE         CREATE INDEXTYPERESOURCE         CREATE TABLE

    8 rows selected.


    最新回复(0)