Oracle创建表空间以及用户,并授权

时间:2022-06-26 07:14:03
//创建临时表空间
create temporary tablespace testtemp 
tempfile 'D:/app/Administrator/oradata/testdata/testtemp.dbf' 
size 32m 
autoextend on 
next 32m maxsize 2048m 
extent management local;
//创建数据表空间 
create tablespace testdata 
logging 
datafile 'D:/app/Administrator/oradata/testdata/testdata.dbf' 
size 32m 
autoextend on 
next 32m maxsize 2048m 
extent management local;
//创建用户并指定表空间 
create user testuser identified by testuser2013
default tablespace testdata 
temporary tablespace testtemp;
//给用户授予权限
grant connect,resource,dba to testuser;