oracle操作之–表空间
创建表空间:
create tablespace spacename//表空间名字 datafile ‘filename.dbf’//数据文件名字 size 10M;
创建完成后查询:
select tablespace_name from dba_tablespaces where tablespace_name=’SPACENAME’;
查询表空间的状态:
select status from dba_tablespaces where tablespace_name=’SPACENAME’;
修改表空间的状态:
alter tablespace SPACENAME read only/read write
添加数据文件:
alter tablespace SPACENAME add datafile ‘test2_datafile.dbf’ size 10M;
删除数据文件:
alter tablespace SPACENAME drop datafile ‘test2_datafile.dbf’;
删除表空间:
drop tablespace SPACENAME including contents;//including contents目的是一并删除表空间里面的数据文件