史上最全最基础的Oracle数据库教程(入门三)用户管理

3.1Oracle的用户管理

创建用户的语法格式:

create user 用户名

identified by 密码

default tablespace <default tablespace>

temprorary tablespace <temproray tablespace>;

示例:

create user shili identified by test

default tablespace test1_tablespace

temporary tablespace temptest1_tablespace;

查看创建的用户

select username from dba_users;

给创建的用户授权

grant connect to shili;

3.2管理用户

连接用户

connect 用户名/口令

更改密码

alter user 用户名 identified by 新密码;

锁定用户

alter user 用户名 account lock;

删除用户

drop user 用户名 cascade;  //加上cascade则将用户连同其创建的东西全部删除。

史上最全最基础的Oracle数据库教程(入门三)用户管理

史上最全最基础的Oracle数据库教程(入门三)用户管理