-- 1:创建临时表空间
create temporary tablespace tabelspace_temp
tempfile '...\tabelspace_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
-- 2:创建数据表空间
create tablespace tabelspace_data
logging
datafile '...\tabelspace_data.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
commit;
-- 创建用户并指定表空间
create user username identified by password
default tablespace tabelspace_data
temporary tablespace tabelspace_temp;
commit;
-- 分配权限
grant connect,resource,dba to username;
commit;
-- 修改用户表空间
alter user username default tablespace tablespace_name