創建表空間:
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;
同時刪除內容和數據庫文件。