Oracle查询临时表空间使用情况:
SELECT D.TABLESPACE_NAME,SPACE "SUM_SPACE(M)",BLOCKS SUM_BLOCKS,
USED_SPACE "USED_SPACE(M)",ROUND(NVL(USED_SPACE,0)/SPACE*100,2) "USED_RATE(%)",
NVL(FREE_SPACE,0) "FREE_SPACE(M)"
FROM
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES)/(1024*1024),2) SPACE,SUM(BLOCKS) BLOCKS
FROM DBA_TEMP_FILES
GROUP BY TABLESPACE_NAME) D,
(SELECT TABLESPACE_NAME,ROUND(SUM(BYTES_USED)/(1024*1024),2) USED_SPACE,
ROUND(SUM(BYTES_FREE)/(1024*1024),2) FREE_SPACE
FROM V$TEMP_SPACE_HEADER
GROUP BY TABLESPACE_NAME) F
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+);
相关阅读:
Oracle迁移数据表空间
关于AIX上裸设备表空间管理
Oracle创建用户表空间和用户
Oracle传输表空间功能测试(含详细过程)
在AIX环境为Oracle表空间增加裸设备(逻辑卷)
经查询得知:temp表空间使用率99%
进入操作系统(AIX)
#lsvg
rootvg
xyyvg
查看vg使用情况
#lsvg -l xyyvg
lv_xyy151_12g raw 48 48 12 open/syncd N/A
lv_xyy152_12g raw 48 48 12 open/syncd N/A
lv_xyy153_12g raw 48 48 12 open/syncd N/A
lv_xyy154_12g raw 48 48 12 open/syncd N/A
lv_xyy155_12g raw 48 48 12 open/syncd N/A
lv_xyy156_12g raw 48 48 12 open/syncd N/A
lv_xyy157_12g raw 48 48 12 open/syncd N/A
lv_xyy158_12g raw 48 48 12 open/syncd N/A
lv_xyy159_12g raw 48 48 12 open/syncd N/A
lv_xyy160_12g raw 48 48 12 open/syncd N/A
lv_xyy161_12g raw 48 48 12 closed/syncd N/A (此lv以下没有使用)
lv_xyy162_12g raw 48 48 12 closed/syncd N/A
lv_xyy163_12g raw 48 48 12 closed/syncd N/A
lv_xyy164_12g raw 48 48 12 closed/syncd N/A
lv_xyy165_12g raw 48 48 12 closed/syncd N/A
lv_xyy166_12g raw 48 48 12 closed/syncd N/A
lv_xyy167_12g raw 48 48 12 closed/syncd N/A
lv_xyy168_12g raw 48 48 12 closed/syncd N/A
lv_xyy169_12g raw 48 48 12 closed/syncd N/A
lv_xyy170_12g raw 48 48 12 closed/syncd N/A
lv_xyy171_12g raw 48 48 12 closed/syncd N/A
lv_xyy172_12g raw 48 48 12 closed/syncd N/A
lv_xyy173_12g raw 48 48 12 closed/syncd N/A
lv_xyy174_12g raw 48 48 12 closed/syncd N/A
lv_xyy175_12g raw 48 48 12 closed/syncd N/A
lv_xyy176_12g raw 48 48 12 closed/syncd N/A
lv_xyy177_12g raw 48 48 12 closed/syncd N/A
lv_xyy178_12g raw 48 48 12 closed/syncd N/A
lv_xyy179_12g raw 48 48 12 closed/syncd N/A