orcle数据表空间操作sql
1.查询表空间路径:
select t1.name,t2.name from v$tablespace t1,v$datafile t2 where t1.ts#=t2.ts#
2.删除表空间和空间里的表:
drop tablespace LTSYSDATA01 including contents and datafiles;
1、表空间的路径、名称查询:
select tablespace_name, file_id, file_name,
round(bytes/(1024*1024),0) total_space
from dba_data_files
order by tablespace_name
2、--表空间的创建
CREATE TABLESPACE EFMIS
LOGGING
DATAFILE 'E:\oracle\product\10.2.0\oradata\bmys\EFMIS.dbf' SIZE 30G
REUSE AUTOEXTEND
ON NEXT 1024M EXTENT MANAGEMENT LOCAL SEGMENT
SPACE MANAGEMENT AUTO;
查看表空间大小:
select tablespace_name,sum(bytes)/1024/1024 free_space
from dba_free_space
group by tablespace_name;