-
查当前位置
-
select group_id,id,path,auto_extend,max_size from v$datafile;
查大小
-
SELECT
-
a.tablespace_name "表空间名称" ,
-
(total - free) / (1024 * 1024 ) "使用(M)" ,
-
free / (1024 * 1024) "剩余(M)" ,
-
total / (1024 * 1024) "大小(M)" ,
-
round((total - free) / total, 4) * 100 "使用率 %"
-
FROM
-
(
-
SELECT
-
tablespace_name, SUM(bytes) free
-
FROM
-
dba_free_space
-
GROUP BY
-
tablespace_name
-
)a,
-
(
-
SELECT
-
tablespace_name, SUM(bytes) total
-
FROM
-
dba_data_files
-
GROUP BY
-
tablespace_name
-
) b
-
WHERE
-
a.tablespace_name = b.tablespace_name and a.tablespace_name='TEMP';
-
-
-
或者 ls -lh /home/dmdba/dmdbms/data/dmserver/TEMP*
调大
alter tablespace temp resize datafile '/home/dmdba/dmdbms/data/dmserver/TEMP.DBF' to 128;
调小
-
SP_TRUNC_TS_FILE (ts_id ,file_id, to_size);
-
SP_TRUNC_TS_FILE (3 ,0, 64);