1.登录
用sys 登录 DBA权限
2.创建表空间
create tablespace AJZLPC datafile 'E:\app\Administrator\oradata\orcl\AJZLPC'
size 1M autoextend on next 50M maxsize unlimited;
备注:datafile为存储表空间位置,autoextend 为设置容量为自动增长,50M是自增大小
3.创建用户
create user temp1
identified by "temp1"
default tablespace AJZLPC
profile DEFAULT
ACCOUNT UNLOCK;
备注:identified by后为用户登录密码,default tablespace 为默认表空间;profile 设置为系统默认,ACCOUNT UNLOCK 用于解锁用户
4.授权
grant dba to temp1;
grant unlimited tablespace to temp1;
备注:给用户赋予DBA权限,表空间可无限增长权限