/解锁/
alter user scott account unlock;
/创建用户zhangsan/
create user zhangsan identified by password2;
/修改密码/
alter user zhangsan identified by password2;
/授予用户使用表空间/
grant unlimited tablespace to janet;
/授予创建表的权限/
grant create any table to janet;
/授予删除表的权限/
grant drop any table to janet;
/插入表的权限/
grant insert any table to janet;
/修改表的权限/
grant update any table to janet;
/查看当前用户所有权限/
select * from user_sys_privs;
/查看所有用户对表的权限/
select * from user_tab_privs;
/查看用户可操作的数据表/
select * from tab ;
/*权限的传递
即当前用户A将权限授予B,B可以将操作的权限再授予C,命令如下
关键字 with admin option*/
grant alter any table to zhangsan with admin option;
grant alter any table to zhangsan with grant option;
/删除用户/
drop user janet;
/创建角色/
create role myrole;
/将创建session的权限授予myrole/
grant create session to myrole;
/授予zhangsan用户myrole的角色/
grant myrole to zhangsan;
/删除角色/
drop role myrole;