创建表空间:
create [undo|TEMPORARY]tablespace venn datafile '/opt/oracle/db01/app/oracle/oradata/OSSORCL/venn01.dbf' size 10M autoextend on next 100M maxsize 500M [unlimited] --最大32G logging online permanent; --一直在线
注:
1 、undo : 创建undo表空间
2、 temporary : 创建临时表空间
添加数据文件:
alter tablespace venn add datafile '/opt/oracle/db01/app/oracle/oradata/OSSORCL/venn02.dbf' size 10M autoextend on next 100M maxsize 500M ;
同时添加多个文件:
alter tablespace venn add datafile '/opt/oracle/db01/app/oracle/oradata/OSSORCL/venn02.dbf' size 10M autoextend on next 100M maxsize 500M, '/opt/oracle/db01/app/oracle/oradata/OSSORCL/venn02.dbf' size 10M autoextend on next 100M maxsize 500M ;
删除表空间:
drop tablespace venn including contents and datafiles;
同时删除内容和数据库文件。