conn sys as sysdba;
create role testrole;
grant create session, create table, unlimited tablespace to testrole;
create user test identified by test;
grant testrole to test;
conn test/test;
oracle 中常用的角色:
connect resource
conn sys as sysdba;
create user test identified by test;
grant connect, resource to test;
查看系统中有哪些角色:
select * from dba_roles;
查看角色具有的权限:
select * from dba_sys_privs d where d.grantee=‘RESOURCE‘;
select * from dba_sys_privs d where d.grantee=‘CONNECT‘;
查看角色具有的系统权限:
select * from role_sys_privs d where d.role = ‘TESTROLE‘;
查看角色具有的对象权限:
select * from dba_tab_privs d where rownum < 5;
查看用户具有的对象权限:
select * from dba_tab_privs d where d.grantee = ‘test‘;
原文地址:https://www.cnblogs.com/BaiLaowu/p/9275868.html
时间: 2024-10-14 11:18:49