创建用户
SQL> create user soe identified by soe default tablespace soe temporary tablespace temp;
User created.
查询用户的默认表空间
SQL> set line 200
SQL> col username for a30
SQL> col account_status for a20
SQL> select username,account_status,created from dba_users where username = 'SOE';
USERNAME ACCOUNT_STATUS CREATED
------------------------------ -------------------- ---------
SOE OPEN 08-MAY-19
查询用户的默认临时表空间
SQL> col default_tablespace for a30
SQL> col temporary_tablespace for a30
SQL> select username,default_tablespace,temporary_tablespace from dba_users where username='SOE';
USERNAME DEFAULT_TABLESPACE TEMPORARY_TABLESPACE
------------------------------ ------------------------------ ------------------------------
SOE SOE TEMP
修改用户的默认表空间
SQL> alter user soe default tablespace soe01;
User altered.
修改用户的临时表空间
SQL> alter user soe temporary tablespace temp01;
User altered.
用户密码过期
SQL> alter user soe password expire;
User altered.
SQL> select username,account_status,created from dba_users where username = 'SOE';
USERNAME ACCOUNT_STATUS CREATED
------------------------------ -------------------- ---------
SOE EXPIRED 08-MAY-19
锁定用户
SQL> alter user soe account lock;
User altered.
SQL> select username,account_status,created from dba_users where username = 'SOE';
USERNAME ACCOUNT_STATUS CREATED
------------------------------ -------------------- ---------
SOE EXPIRED & LOCKED 08-MAY-19
解锁用户
SQL> alter user soe account unlock;
User altered.
SQL> select username,account_status,created from dba_users where username = 'SOE';
USERNAME ACCOUNT_STATUS CREATED
------------------------------ -------------------- ---------
SOE EXPIRED 08-MAY-19
修改用户密码
SQL> alter user soe identified by soe;
User altered.
SQL> select username,account_status,created from dba_users where username = 'SOE';
USERNAME ACCOUNT_STATUS CREATED
------------------------------ -------------------- ---------
SOE OPEN 08-MAY-19
删除用户
SQL> drop user soe cascade;
User dropped.
网页名称:【OracleDatabase】数据库用户管理
网站URL:
http://cxhlcq.com/article/posoeh.html