很基本,卻常常忘記那幾個數據字典,眼過千遍,不如手過一遍。
我創建了一個kim用戶: create user kim identified by kim.(未指定表空間)
創建一表空間:create tablespace kim_tbs datafile '/u01/oradata/db_name/kim_dbs.dbf' size 200M autoextend on next 10M maxsize 500M;
查看kim用戶,使用哪個表空間:使用dba_users這個數據字典,
select username,default_tablespace from dba_users where username=‘KIM’;
默認是分配的USERS表空間,現在更改爲KIM_TBS表空間:
alter user kim default tablespace kim_tbs;
OK.