建立表空间和用户的步骤:
1.创建表空间
create tablespace reesdataspace datafile
'D:/app/LIYONGPING383/product/11.2.0/oracle_tablespaces/reesdata_tbspace.dbf' size 1500M
autoextend on next 5M maxsize 3000M;
2.创建用户:
create user reesdata identified by "paic1234";
3.设置用户的默认表空间
alter user reesdata default tablespace reesdataspace;
4.授权:
grant create session to reesdata;
grant create table to reesdata;
grant create tablespace to reesdata;
grant create view to reesdata;
grant CREATE PUBLIC SYNONYM to reesdata;
grant DROP PUBLIC SYNONYM to reesdata;
附:
创建好表空间和用户后,执行sql出现没有权限的问题,需要给当前用户授权
打开sqlplus
SQL>conn as sysdba;
已连接。
SQL>grant [某权限] to [用户名];
如:grant create table to reesdata;