Oracle 23的用户管理

创建用户的语法格式

Create user <user_name>

Identified by<password>

Default tabespace<default tablespace>

Temporary tablespace<temporary tablespace>;

举例

Create user yan identified by test default tablespace test1_tablespace

Temporary tablespace temptest1_tablespace;

创建用户最好指定表空间(可以不指定)

如果不指定,用户会使用默认的系统空间,如果系统空间被用户占满可能会宕机,

建议指定表空间,学习时为了方便就可以指定。

查询创建的用户

 select username from dba_users;

给创建的用户授权

Grant 权限to 用户名

例:grant connnect to yan;

连接用户

Connect 用户名/口令

更改密码

Alter user 用户名identified by 新密码;

不希望某用户登录,而又不删除其用户,可以将用户锁定

Alter user 用户名account lock;

删除用户

Drop user 用户名 cascade;

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

文学使思想充满血与肉,他比科学和哲学更能给予思想以巨大的明确性和说明性。
原文地址:https://www.cnblogs.com/zpsblog/p/9320005.html