一、创建临时空间
create temporary tablespace user_temp
tempfile ‘E:\APP\SCOTT\ORADATA\ORCL\user_temp.dbf’
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
二、创建数据表空间
create tablespace user_data
logging
datafile ‘E:\APP\SCOTT\ORADATA\ORCL\user_data.dbf’
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
三、创建用户并指定表空间
create user c##nansw identified by nansw1015
default tablespace user_data
temporary tablespace user_temp;
刚开始用户名为nansw,提示错误ORA-65096:公用用户名或角色名无效
网上查资料,说是取名前缀必须为c##,所以用户名也变成了c##nansw
四、授权给c##nansw,ps:根据需要设置权限
GRANT CREATE ANY VIEW,DROP ANY VIEW,CONNECT,RESOURCE,CREATE SESSION,DBA TO c##nansw;