oracle创建表空间、添加数据库文件


创建表空间:

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;

同时删除内容和数据库文件。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM