歸檔日誌大小統計
我們可能經常需要評估每天或每小時產生的歸檔日誌量,那麼怎樣計算出大小呢?
So How can we calculate archivelog size each day/hour?
主要還是查詢檢視V$ARCHIVED_LOG,分享一下這幾個SQL:
1,Archivelog size each day:
SQL> select trunc(COMPLETION_TIME) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc (COMPLETION_TIME) order by 1;
2,Archivelog size each hour:
SQL> alter session set nls_date_format = 'YYYY-MM-DD HH24';
Session altered.
SQL> select trunc(COMPLETION_TIME,'HH24') TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc (COMPLETION_TIME,'HH24') order by 1;
3, another example,
SQL> SELECT to_char(completion_time,'YYYYMMDD') run_date, Round(Sum(blocks * block_size + block_size) / 1024 / 1024 / 1024) redo_blocks
FROM v$archived_log GROUP BY To_char(completion_time,'YYYYMMDD') ORDER BY 2;
這裡註釋:
V$ARCHIVED_LOG contains BLOCKS ( Size of the archived log (in blocks) ) and BLOCK_SIZE ( which is the same as the logical block size of the online log from which the archived log was copied )
So How can we calculate archivelog size each day/hour?
主要還是查詢檢視V$ARCHIVED_LOG,分享一下這幾個SQL:
1,Archivelog size each day:
SQL> select trunc(COMPLETION_TIME) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc (COMPLETION_TIME) order by 1;
2,Archivelog size each hour:
SQL> alter session set nls_date_format = 'YYYY-MM-DD HH24';
Session altered.
SQL> select trunc(COMPLETION_TIME,'HH24') TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc (COMPLETION_TIME,'HH24') order by 1;
3, another example,
SQL> SELECT to_char(completion_time,'YYYYMMDD') run_date, Round(Sum(blocks * block_size + block_size) / 1024 / 1024 / 1024) redo_blocks
FROM v$archived_log GROUP BY To_char(completion_time,'YYYYMMDD') ORDER BY 2;
這裡註釋:
V$ARCHIVED_LOG contains BLOCKS ( Size of the archived log (in blocks) ) and BLOCK_SIZE ( which is the same as the logical block size of the online log from which the archived log was copied )
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/628922/viewspace-1181672/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 統計某個時間段的歸檔日誌大小
- 改變歸檔日誌檔案大小
- 歸檔大小日誌計算
- 歸檔日誌大小 與使用rman 備份後的歸檔日誌產生的備份集大小的關係
- 歸檔日誌
- 【Oracle】歸檔日誌管理-設定歸檔日誌路徑以及歸檔日誌冗餘Oracle
- oracle歸檔日誌Oracle
- Oracle 歸檔日誌Oracle
- 歸檔日誌挖掘
- PostgreSQL 歸檔日誌SQL
- oracle 11g 更改歸檔模式、目錄、日誌大小Oracle模式
- 日誌檔案的大小
- 【ARCHIVELOG】怎樣統計歸檔日誌更準確Hive
- 控制檔案/歸檔日誌
- 歸檔日誌多歸檔路徑 duplex
- oracle歸檔模式下imp匯入資料,產生的歸檔日誌大小記錄Oracle模式
- 歸檔oracle alert日誌Oracle
- 14. 日誌歸檔
- PostgreSQL歸檔日誌配置SQL
- rman清理歸檔日誌
- archive log 歸檔日誌Hive
- 備份歸檔日誌
- 歸檔日誌 現象
- Oracle歸檔日誌清理Oracle
- 當ORACLE歸檔日誌滿後如何正確刪除歸檔日誌Oracle
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- 誤刪歸檔日誌除導致備份歸檔日誌失敗
- 改變日誌檔案大小
- 聯機重做日誌、歸檔日誌、備用重做日誌
- Oracle產生redo日誌量大小統計Oracle
- 備份歸檔日誌檔案
- 日誌檔案和歸檔管理
- 刪除歸檔日誌檔案
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- RMAN delete archivelog命令刪除歸檔日誌及歸檔日誌拷貝deleteHive
- 批量註冊歸檔日誌
- Oracle RMAN 清除歸檔日誌Oracle