Oracle 12c 创建表空间和用户并为用户授权

时间:2021-07-17 19:44:56

创建临时表空间

create temporary tablespace test_temp
tempfile 'D:\app\orcl\oradata\temproryTestUserSpace\test_temp1.dbf'
size 10m autoextend
on next 10m maxsize 50m extent management local;

创建数据表空间
create tablespace test_data logging
datafile 'D:\app\orcl\oradata\temproryTestUserSpace\test_data1.dbf'
size 10m autoextend on next 10m maxsize 50m  extent management local;

创建用户设置用户密码
create user C##XSCJ identified by XSCJ default
tablespace test_data
temporary tablespace test_temp;

为用户授权
grant connect,resource,dba to C##XSCJ;