1、创建用户
create user KD identified by 123456;2、授予连接数据库的权限
grant connect to KD;3、将Scott用户的emp表授权给KD可以查询
grant select on scott.emp to KD;grant create table to KD;4、回收权限
revoke select on scott.emp from KD;5、表的增删改权限授权
grant select,inset,delete,update on scott.emp to KD;revoke select,inset,delete,update on scott.emp from KD;6、删除用户
SQL 错误: ORA-01940: 无法删除当前连接的用户
退出已经连接得KD用户后再执行
drop user KD;会提示:错误: ORA-01922: 必须指定 CASCADE 以删除 'KD'
drop user KD cascade;7、查看当前用户所拥有的权限
select * from session_privs;8、查看当前用户所拥有的角色
select * from user_role_privs;9、查看角色所有的权限
select * from dba_sys_privs;select * from dba_sys_privs where grantee='CONNECT';--create sessionselect * from dba_sys_privs where grantee='RESOURCE';select * from dba_sys_privs where grantee='DBA';--有最高权限 所有的权限都有创建一个开发人员并授权:
create user CURRY identified by 123456;create connet,resource to CURRY;10、用户解锁
alter user HR account unlock;11、修改用户密码
alter user HR identified by 123456;以上所述是小编给大家介绍的纯Oracle的用户、角色以及权限相关操作,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!