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