本帖最后由 lylklb 于 2014-2-9 12:27 编辑
1) v$sort_segments中的segment_file(SEG_FNO)为何没能与v$tempfile中的file_id对应,而且SEG_FNO居然会是0 ??
2) v$sort_segments中的RELATIVE_FNO有何实用意义,其可以与哪个数据字典视图的相关列值关联?
>select TABLESPACE_NAME, current_users cur_users, SEGMENT_FILE SEG_FNO, RELATIVE_FNO REL_FNO, USED_BLOCKS U_BLKS, FREE_BLOCKS F_BLKS,
TOTAL_BLOCKS T_BLKS, TOTAL_EXTENTS T_EXTS, USED_EXTENTS U_EXTS, FREE_EXTENTS F_EXTS, EXTENT_SIZE EXT_SZ from v$sort_segment;
TABLESPACE_NAME CUR_USERS SEG_FNO REL_FNO U_BLKS F_BLKS T_BLKS T_EXTS U_EXTS F_EXTS EXT_SZ
-------------------- ------------- ----------- ------------- ----------- -------------- ------------ ----------- ----------- ---------- ---------
TEMP 9 0 0 2944 12579584 12582528 98301 23 98278 128
>select TABLESPACE_NAME, file_id, name file_name, BYTES_USED/1024/1024 U_MB, BYTES_FREE/1024/1024 F_MB, tf.bytes/1024/1024 T_MB,
(BYTES_FREE/tf.bytes)*100 f_pct, tf.status from v$temp_space_header tsh, v$tempfile tf where tf.file#=file_id;
TABLESPACE_NAME FILE_ID FILE_NAME U_MB F_MB T_MB F_PCT STATUS
------------------------- ---------- --------------------------------------------- ------- -------- ------- ------- ---------
TEMP 1 /oradata/u01/temp01.dbf 32768 0 32768 0 ONLINE
TEMP 2 /oradata/u01/temp02.dbf 32768 0 32768 0 ONLINE
TEMP 3 /oradata/u01/temp03.dbf 32768 0 32768 0 ONLINE
|
|