加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle 23的用户管理

发布时间:2020-12-12 13:30:15 所属栏目:百科 来源:网络整理
导读:创建用户的语法格式 Create user user_name Identified bypassword Default tabespacedefault tablespace Temporary tablespacetemporary tablespace; 举例 Create user yan identified by test default tablespace test1_tablespace Temporary tablespace t

创建用户的语法格式

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则将用户连同其创建的东西全部删除

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读