- Connect:只能登录,不能创建实体和数据库
- Resource:创建实体,不能创建数据库
- Dba:最高权限,都可以
- 练习:create user user01 identified by pass01;
grant connect to user01;(授权以后才可以登录,不可创建表)
conn user01/pass01;
conn sys/cl123456 as sysdba
grant resource to user01;(可以建立表,不能建立数据库,不能创建新用户)
create table test(id number,name varchar2(20));
grant dba to user01;
创建自己定义的角色:
练习:
create user user02 identified by pass02;
create role manager;--(创建角色)
grant create table,create view to manager;--(赋予角色权限)
grant manager to user02;--(角色赋予用户)
回收权限:
revoke manager from user02;
删除角色:
drop role manager;