新建用户

create user username identified by password default tablespace users temp tablespace temp;

修改用户

赋予用户权限

grant connect,resource to username;

锁定用户

alter user soctt account lock; 

用户解锁

alter user scott account unlock; 

修改用户密码

alter user username identified by newpassword;

删除用户

删除用户及其相关联的数据

drop user username cascade; 

用户相关查询语句

查询当前用户默认、临时表空间

select username,default_tablespace,temporary_tablespace from user_users;

查询当前用户权限

select * from session_privs;

Related Posts