--创建临时表空间table_temp ,位置在 D:\works\Oracle_Database\_TSDAT01_DB\usertable_temp.dbf
create temporary tablespace usertable_temp
tempfile 'D:\works\Oracle_Database\_TSDAT01_DB\usertable_temp.dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
--创建表空间 usertable
create tablespace usertable
logging
datafile 'D:\works\Oracle_Database\_TSDAT01_DB\usertable .dbf'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
--创建用户并指定表空间,前面的user 和password 分别代表用户名和密码
create user username identified by password
default tablespace TSDAT01
temporary tablespace TSDAT01_temp;
--给用户权限
grant connect,resource,dba to user;
来源:https://www.cnblogs.com/of-course/p/7989532.html