oracle有两种用户,一种是系统用户 sys system 权限最高,另一种是普通用户

创建用户并授予session权限

create user TEST identified by 123456 default tablespace users;

grant create session to TEST;

修改密码

alter user TEST identified by 123;

删除用户

drop user TEST cascade;

视图dba_users查看所有用户信息

select * from dba_users

锁定和开启账号

alter user TEST account lock;

alter user TEST account unlock;

有时候oracle会自动被锁上

SELECT session_id FROM v$locked_object; 

SELECT sid, serial#, username, osuser FROM v$session where sid = 18;

ALTER SYSTEM KILL SESSION '18,44304';