查看表空间
select t.* from dba_data_files t;
创建表空间
create tablespace ODS
logging
datafile 'E:\Develop\app\Administrator\oradata\orcl\ODS.DBF'
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
删除表空间&数据
DROP TABLESPACE ODS INCLUDING CONTENTS AND DATAFILES;
更改表空间
select table_name 表名 ,tablespace_name 所使用表空间 from user_tables where tablespace_name = '待更改表空间';
select 'alter table '|| table_name ||' move tablespace 新表空间名称;' from dba_tables t where t.owner='用户名';
查看用户表空间放置的位置
select name from v$datafile;
select status,fuzzy,tablespace_name,name from v$datafile_header;