创建、修改、删除ORACLE表空间

//创建表空间
  create tablespace MyFirstSpace datafile '/opt/oracle/app/oracle/product/9.2.0/dbs/MyFirstSpace.ora' size 512M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED default storage (initial 128K next 2M pctincrease 0); 
  
  SQL>create tablespace fred 
   datafile 'd:\oracle\oradata\orcl\fred01.dbf' 
   size 100K reuse;(reuse用于处理已经存在 datafiles)
  
  
  删除表空间命令:
  SQL>drop tablespace INDX including contents;
  drop tablespace BLOBS including contents;
  drop tablespace BLOBS include contents and datafiles;(删除内容及datafiles)
  
  改变表空间大小命令:
SQL> ALTER database DATAFILE 'INDX.dbf' resize 500M;

 
  ALTER TABLESPACE spacename ADD DATAFILE 'c:\orant\database\usr02.dbf' 
   DEFAULT STORAGE (INITIAL 4M NEXT 2 M ); 

posted @ 2017-01-19 17:38  王鸿云  阅读(740)  评论(0编辑  收藏  举报