oracle 表空间相关知识

--查看表空间及其路径
select t1.name,t2.name  from v$tablespace t1,v$datafile t2 where t1.ts# = t2.ts#;

--创建临时表空间
create temporary tablespace colectica_temp
tempfile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\colectica_temp.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;

--创建数据表空间
create tablespace colectica_data
logging
datafile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\colectica_data.dbf'
size 32m
autoextend on
next 32m maxsize 2048m
extent management local;

--创建用户并指定表空间
create user colectica identified by colectica
default tablespace colectica_data
temporary tablespace colectica_temp;

--给用户授予权限
grant connect,resource to colectica;

--表空间不够用 添加表空间
alter tablespace colectica_data add datafile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\colectica_data01.dbf' size 4056m;
--修改临时表空间
 alter database tempfile 'D:\APP\ADMINISTRATOR\ORADATA\ORCL\COLECTICA_TEMP.dbf' resize 10240m;

猜你喜欢

转载自z10one.iteye.com/blog/2272061