Oracle Database 使用者管理

來源:互聯網
上載者:User

標籤:asc   lin   unlock   建立使用者   else   鎖定   AC   for   limited   

建立使用者SQL> create user tpcc identified by tpcc default tablespace tpcc temporary tablespace temp;User created.SQL> set line 200SQL> col username for a30SQL> col account_status for a20SQL> select username,account_status,created from dba_users where username = 'TPCC';USERNAME                       ACCOUNT_STATUS       CREATED------------------------------ -------------------- -------------------TPCC                           OPEN                 2018-06-22 07:39:09SQL> col default_tablespace for a30SQL> col temporary_tablespace for a30SQL> select username,default_tablespace,temporary_tablespace from dba_users where username='TPCC';USERNAME                       DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE------------------------------ ------------------------------ ------------------------------TPCC                           TPCC                           TEMP修改使用者的預設資料表空間SQL> alter user tpcc default tablespace soe;User altered.修改使用者的暫存資料表空間SQL> alter user tpcc temporary tablespace temp01;User altered.SQL> select username,default_tablespace,temporary_tablespace from dba_users where username='TPCC';USERNAME                       DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE------------------------------ ------------------------------ ------------------------------TPCC                           SOE                            TEMP01密碼到期SQL> alter user tpcc password expire;User altered.SQL> SQL> select username,account_status,created from dba_users where username = 'TPCC';USERNAME                       ACCOUNT_STATUS       CREATED------------------------------ -------------------- -------------------TPCC                           EXPIRED              2018-06-22 07:39:09鎖定使用者SQL> alter user tpcc account lock;User altered.SQL> select username,account_status,created from dba_users where username = 'TPCC';USERNAME                       ACCOUNT_STATUS       CREATED------------------------------ -------------------- -------------------TPCC                           EXPIRED & LOCKED     2018-06-22 07:39:09解鎖使用者SQL> alter user tpcc account unlock;User altered.SQL> select username,account_status,created from dba_users where username = 'TPCC';USERNAME                       ACCOUNT_STATUS       CREATED------------------------------ -------------------- -------------------TPCC                           EXPIRED              2018-06-22 07:39:09修改使用者密碼SQL> alter user tpcc identified by tpcc01;User altered.SQL> select username,account_status,created from dba_users where username = 'TPCC';USERNAME                       ACCOUNT_STATUS       CREATED------------------------------ -------------------- -------------------TPCC                           OPEN                 2018-06-22 07:39:09資料表空間配額SQL> alter user tpcc quota 500M on soe;User altered.SQL> select username,tablespace_name,case max_bytes when -1 then '-1'else to_char(max_bytes/1024/1024 || 'M') END AS "QUOTA"from dba_ts_quotasorder by username;USERNAME                       TABLESPACE_NAME                QUOTA------------------------------ ------------------------------ --------------------APPQOSSYS                      SYSAUX                         -1FLOWS_FILES                    SYSAUX                         -1OLAPSYS                        SYSAUX                         -1SYSMAN                         SYSAUX                         -1TPCC                           TPCC                           -1TPCC                           SOE                            500MSQL> alter user tpcc quota unlimited on soe;User altered.SQL> select username,tablespace_name,case max_bytes when -1 then '-1'else to_char(max_bytes/1024/1024 || 'M') END AS "QUOTA"from dba_ts_quotasorder by username;USERNAME                       TABLESPACE_NAME                QUOTA------------------------------ ------------------------------ --------------------APPQOSSYS                      SYSAUX                         -1FLOWS_FILES                    SYSAUX                         -1OLAPSYS                        SYSAUX                         -1SYSMAN                         SYSAUX                         -1TPCC                           TPCC                           -1TPCC                           SOE                            -1刪除使用者SQL> drop user tpcc cascade;User dropped.


Oracle Database 使用者管理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.