表空間監控(二)datafile size detail
表空間監控(二)datafile size detail
導言:監控表空間使用率、資料檔案使用率指令碼。
#######################################################################################
Oracle Environment=>11.2.0.4.0 rac on two nodes
OS Environment=>AIX 6.1 (64bit)
#######################################################################################
SQL> @DFsizeDetail.sql
TSpace File File File File File Auto Ext by File
Name Name Status Size Free Free Extend ? Max Size
Mb Mb % ? Mb Mb
-------------------- -------------------------------------------------- --------- ------ ------ ---- ------ ------ --------
BMCF_CHC2 +DATA/bmdb/datafile/bhaf_cdc2_02.dbf AVAILABLE 3200 312 1 YES .01 32767.98
+DATA/bmdb/datafile/bhaf_cdc2_01.dbf AVAILABLE 32710 1213 0 YES .01 32767.98
bm_DATA_TBS +DATA/bmdb/datafile/bm_data_tbs_11.dbf AVAILABLE 3840 15 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_12.dbf AVAILABLE 3840 19 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_10.dbf AVAILABLE 3904 18 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_03.dbf AVAILABLE 32704 33 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_04.dbf AVAILABLE 32704 18 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_05.dbf AVAILABLE 32704 37 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_06.dbf AVAILABLE 32704 35 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_07.dbf AVAILABLE 32704 72 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_08.dbf AVAILABLE 32704 3421 1 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_09.dbf AVAILABLE 32704 3505 1 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_01.dbf AVAILABLE 32767 33 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_02.dbf AVAILABLE 32768 7 0 YES 50 32767.98
...
### NOTE ###
TSpace Name : Tablespace name
File Status : File status
File Size Mb : Current file size in Mb
File Free Mb : Current free space is file in Mb
File Free % : Current free space in %
Auto Extend ? : Is this file configured to auto extend ?
Ext by ? Mb : How much will this file extend every time it needs to ?
File Max Size Mb : How big this file can grow ?
#############################################################################
###DFsizeDetail.sql scripts contents are as follows ###
set linesize 150
set pagesize 50
clear break
col TSname format a20
col TSname heading 'TSpace|Name|'
col FName format a50
col FName heading 'File|Name|'
col FStatus format a9
col FStatus heading 'File|Status|'
col FSizeMb format 99999
col FSizeMb heading 'File|Size|Mb'
col FileFreeMb format 99999
col FileFreeMb heading 'File|Free|Mb'
col FileFreePrct format 999
col FileFreePrct heading 'File|Free|%'
col AutoExt format a6
col AutoExt heading 'Auto|Extend|?'
col ExtbyMb format a6
col ExtbyMb heading 'Ext by|?|Mb'
col FMaxSizeMb format a8
col FMaxSizeMb heading 'File|Max Size|Mb'
break on TSname skip 1
SELECT
ddf.tablespace_name as "TSname",
ddf.file_name as "FName",
ddf.status as "FStatus",
ROUND(ddf.bytes/1024/1024,2) as "FSizeMb",
ROUND(SUM(dfs.bytes)/1024/1024,2) as "FileFreeMb",
ROUND(SUM(dfs.bytes)/SUM(ddf.bytes)*100,0) as "FileFreePrct",
ddf.autoextensible as "AutoExt",
CASE
WHEN ddf.increment_by = 0 THEN '-' ELSE TO_CHAR(ROUND((ddf.increment_by * dt.block_size)/1024/1024,2))
END as "ExtbyMb",
CASE
WHEN ddf.maxbytes = 0 THEN '-' ELSE TO_CHAR(ROUND(ddf.maxbytes/1024/1024,2))
END as "FMaxSizeMb"
FROM
sys.dba_data_files ddf,
sys.dba_tablespaces dt,
sys.dba_free_space dfs
WHERE ddf.tablespace_name = dt.tablespace_name
AND ddf.file_id = dfs.file_id(+)
GROUP BY
ddf.tablespace_name,
ddf.file_name,
ddf.status,
ddf.bytes,
ddf.autoextensible,
ddf.increment_by,
dt.block_size,
ddf.maxbytes
ORDER BY
ddf.tablespace_name,7
;
########################################################################################
版權所有,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!【QQ交流群:53993419】
QQ:14040928
本文連結: http://blog.itpub.net/26442936/viewspace-1471615/
########################################################################################
導言:監控表空間使用率、資料檔案使用率指令碼。
#######################################################################################
Oracle Environment=>11.2.0.4.0 rac on two nodes
OS Environment=>AIX 6.1 (64bit)
#######################################################################################
SQL> @DFsizeDetail.sql
TSpace File File File File File Auto Ext by File
Name Name Status Size Free Free Extend ? Max Size
Mb Mb % ? Mb Mb
-------------------- -------------------------------------------------- --------- ------ ------ ---- ------ ------ --------
BMCF_CHC2 +DATA/bmdb/datafile/bhaf_cdc2_02.dbf AVAILABLE 3200 312 1 YES .01 32767.98
+DATA/bmdb/datafile/bhaf_cdc2_01.dbf AVAILABLE 32710 1213 0 YES .01 32767.98
bm_DATA_TBS +DATA/bmdb/datafile/bm_data_tbs_11.dbf AVAILABLE 3840 15 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_12.dbf AVAILABLE 3840 19 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_10.dbf AVAILABLE 3904 18 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_03.dbf AVAILABLE 32704 33 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_04.dbf AVAILABLE 32704 18 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_05.dbf AVAILABLE 32704 37 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_06.dbf AVAILABLE 32704 35 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_07.dbf AVAILABLE 32704 72 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_08.dbf AVAILABLE 32704 3421 1 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_09.dbf AVAILABLE 32704 3505 1 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_01.dbf AVAILABLE 32767 33 0 YES .01 32767.98
+DATA/bmdb/datafile/bm_data_tbs_02.dbf AVAILABLE 32768 7 0 YES 50 32767.98
...
### NOTE ###
TSpace Name : Tablespace name
File Status : File status
File Size Mb : Current file size in Mb
File Free Mb : Current free space is file in Mb
File Free % : Current free space in %
Auto Extend ? : Is this file configured to auto extend ?
Ext by ? Mb : How much will this file extend every time it needs to ?
File Max Size Mb : How big this file can grow ?
#############################################################################
###DFsizeDetail.sql scripts contents are as follows ###
set linesize 150
set pagesize 50
clear break
col TSname format a20
col TSname heading 'TSpace|Name|'
col FName format a50
col FName heading 'File|Name|'
col FStatus format a9
col FStatus heading 'File|Status|'
col FSizeMb format 99999
col FSizeMb heading 'File|Size|Mb'
col FileFreeMb format 99999
col FileFreeMb heading 'File|Free|Mb'
col FileFreePrct format 999
col FileFreePrct heading 'File|Free|%'
col AutoExt format a6
col AutoExt heading 'Auto|Extend|?'
col ExtbyMb format a6
col ExtbyMb heading 'Ext by|?|Mb'
col FMaxSizeMb format a8
col FMaxSizeMb heading 'File|Max Size|Mb'
break on TSname skip 1
SELECT
ddf.tablespace_name as "TSname",
ddf.file_name as "FName",
ddf.status as "FStatus",
ROUND(ddf.bytes/1024/1024,2) as "FSizeMb",
ROUND(SUM(dfs.bytes)/1024/1024,2) as "FileFreeMb",
ROUND(SUM(dfs.bytes)/SUM(ddf.bytes)*100,0) as "FileFreePrct",
ddf.autoextensible as "AutoExt",
CASE
WHEN ddf.increment_by = 0 THEN '-' ELSE TO_CHAR(ROUND((ddf.increment_by * dt.block_size)/1024/1024,2))
END as "ExtbyMb",
CASE
WHEN ddf.maxbytes = 0 THEN '-' ELSE TO_CHAR(ROUND(ddf.maxbytes/1024/1024,2))
END as "FMaxSizeMb"
FROM
sys.dba_data_files ddf,
sys.dba_tablespaces dt,
sys.dba_free_space dfs
WHERE ddf.tablespace_name = dt.tablespace_name
AND ddf.file_id = dfs.file_id(+)
GROUP BY
ddf.tablespace_name,
ddf.file_name,
ddf.status,
ddf.bytes,
ddf.autoextensible,
ddf.increment_by,
dt.block_size,
ddf.maxbytes
ORDER BY
ddf.tablespace_name,7
;
########################################################################################
版權所有,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!【QQ交流群:53993419】
QQ:14040928
本文連結: http://blog.itpub.net/26442936/viewspace-1471615/
########################################################################################
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-1471615/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 表空間監控(三)tablespace detailAI
- oracle表空間增加監控Oracle
- 監控oracle表空間指令碼Oracle指令碼
- oracle監控表空間,JOB,rman備份Oracle
- 監控和管理Oracle UNDO表空間的使用Oracle
- 多臺ORACLE資料庫表空間監控方案Oracle資料庫
- [原創] 利用Oracle metric(threshold)監控表空間Oracle
- WINDOWS 環境下 監控ORACLE臨時表空間WindowsOracle
- 利用Oracle threshold(度量閥值)監控表空間Oracle
- 監控硬碟空間指令碼硬碟指令碼
- 【Oracle】oracle tablespace&datafile -- oracle表空間 分享[轉]Oracle
- 表空間uniform size和 autoallocate的區別ORM
- oracle空間使用監控指令碼Oracle指令碼
- linux 下監控磁碟空間Linux
- AIX分頁(交換)空間的監控AI
- DATAFILE SHRINK 釋放系統空間
- Linux發郵件磁碟空間監控Linux
- 自動監控Oracle 表空間資訊併傳送郵件指令碼Oracle指令碼
- 關於排序、sort_area_size、臨時表空間(轉)排序
- How to Choose Size of Datafile on Raw Devicedev
- DB CONTROL中表空間監控的SQLSQL
- 監控空間並自動刪除超出空間的最老的檔案
- Script:List SORT ACTIVITY監控臨時空間的使用
- sybase空間監控和死鎖檢測語句
- 還原表空間系列命令之二
- 單個指令碼監控主機上所有例項的表空間利用率指令碼
- Sybase空間監控指令碼 btmbfe_sybase_space_use.sh指令碼
- oracle 效能監控 <--轉至 陽光傾城 的空間Oracle
- 分析表空間空閒率並收縮表空間
- system表空間不足的問題分析(二)
- 表空間的狀態(二) - read/write
- 雲空間影片監控的可擴充套件性:適應不斷增長的監控需求套件
- MySQL InnoDB 共享表空間和獨立表空間MySql
- 管理表空間(表空間的屬性)轉貼
- 表空間管理之bigfile表空間設定
- 遷移SYSTEM表空間為本地管理表空間
- MySQL InnoDB 共享表空間和獨立表空間MySql
- Oracle表空間Oracle