表空间维护


//创建临时表空间

create temporary tablespace ${temptablespacename}
tempfile 'D:\oracle\product\10.2.0\oradata\orcl\TEMP01.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;

//创建数据表空间
create tablespace ${tablespacename}
logging
datafile 'D:\oracle\product\10.2.0\oradata\orcl\WPS01.dbf'
size 2000m
autoextend on
next 500m
maxsize 2048m --可以不指定
extent management local;

//创建用户并指定表空间
create user ${username} identified by ${password}
default tablespace ${tablespacename}
temporary tablespace ${temptablespacename};

//给用户授予权限

grant connect,resource to ${username};

alter tablespace ${tablespacename}
add datafile 'D:\oracle\product\10.2.0\oradata\orcl\WPS02.dbf' size 2000m  autoextend on next 1000m,
'D:\oracle\product\10.2.0\oradata\orcl\WPS03.dbf' size 2000m autoextend on next 1000m;

你可能感兴趣的:(oracle)