表空间维护

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 17:26   1185   0
//创建临时表空间

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;
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP