【OracleDatabase】数据库用户管理-创新互联
创建用户
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.
成都创新互联主营临沭网站建设的网络公司,主营网站建设方案,
成都App定制开发,临沭h5成都小程序开发搭建,临沭网站营销推广欢迎临沭等地区企业咨询
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享名称:【OracleDatabase】数据库用户管理-创新互联
文章链接:
http://dzwzjz.com/article/cdoedd.html