Oracle Database User Management

Source: Internet
Author: User

Create User 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 Modifying the user's default tablespace sql> alter user tpcc default tablespace soe; user altered. Modifying a user's temporal tablespace 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                          &nbSP;   TEMP01 Password Expiration 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 Lock User 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 Unlocking User 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 Modify User Password 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 Table Space Quotas 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 Delete User sql> drop user tpcc cascade; user dropped.


Oracle Database User Management

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.