*表名和用户名都要大写
-
某表所属表空间
SELECT tablespace_name FROM DBA_TABLES WHERE table_name = 'NET_UNIFOR' and owner='NET' --DT_DAT
-
某表占表空间大小
select segment_name,bytes from dba_segments where segment_name = 'NET_UNIFOR' and owner = 'NET'; --4678746112 --4.3574255G
-
某表空间物理文件名称、大小
SELECT tablespace_name, file_id, file_name, round(bytes / (1024 * 1024), 0) "total_space(M)" FROM dba_data_files where tablespace_name ='DT_DAT';
-
查询oracle系统用户的默认表空间和临时表空间
select DEFAULT_TABLESPACE ,TEMPORARY_TABLESPACE from dba_users where username='NET'