1.创建用户
- create user test identified by test;
create user test identified by test;
2.赋权限
- grant create session to test; //赋可以登录的权限
- grant unlimited tablespace to test; //赋无限制使用表空间的权限
- grant create table to test;
- grant dba to scott;//
grant create session to test; //赋可以登录的权限
grant unlimited tablespace to test; //赋无限制使用表空间的权限
grant create table to test;
grant dba to scott;//
3.收回权限
- revoke create session to test;
- revoke unlimited tablespace from test;
- revoke create table from test;
- revoke dba from scott;
revoke create session to test;
revoke unlimited tablespace from test;
revoke create table from test;
revoke dba from scott;
4.查看当前用户的权限
- select * from user_role_privs;
select * from user_role_privs;
5.解锁用户
- alter user scott account unlock;