Oracle的用户管理

1、创建用户:

(1)、创建用户的语法格式:create user <user_name> identified by <password> default tablespace <default tablespace> temporary tablespace <temporary tablespace>;

例:create user sl identified by test default tablespace test1_tablespace temporary tablespace temptest1_tablespace;

(2)、查看创建的用户:select username from dba_users;

注:dba_users这张表中存放了所有用户的用户名和密码。

2、给用户授权:

(1)、grant 权限 to 用户名

例:grant connect to sl;(给sl这个用户授予连接这个权限)

(3)、连接用户:connect 用户名/口令

(4)、更改初始用户密码:alter user 用户名 identified by 新密码

(5)、锁定用户(不希望某用户登录,而又不删除其用户,即将其锁定):alter user 用户名 account lock;

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

(7)、一系列操作过程:

<1>、创建用户并查看所创建的用户



<2>、给用户用户授予登录的权利,并对修改用户密码并检查是否修改成功


<3>、锁定用户与删除用户



猜你喜欢

转载自blog.csdn.net/s___lei/article/details/78475030