Oracle Datafile I/O Report

This script displays I/O statistics for each Oracle datafile. It joins V$FILESTAT and V$DATAFILE to show blocks read, blocks written, and total I/O activity per file, helping DBAs identify high I/O files and analyze storage performance.

oraclesqlmonitoring-alertsv1.0.0
0 stars0 downloads15 views0 comments
By OracleDba • Created

Code

(20 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/file_io.sql
-- Author       : Tim Hall
-- Description  : Displays the amount of IO for each datafile.
-- Requirements : Access to the v$ views.
-- Call Syntax  : @file_io
-- Last Modified: 15-JUL-2000
-- -----------------------------------------------------------------------------------
SET PAGESIZE 1000

SELECT Substr(d.name,1,50) "File Name",
       f.phyblkrd "Blocks Read",
       f.phyblkwrt "Blocks Writen",
       f.phyblkrd + f.phyblkwrt "Total I/O"
FROM   v$filestat f,
       v$datafile d
WHERE  d.file# = f.file#
ORDER BY f.phyblkrd + f.phyblkwrt DESC;

SET PAGESIZE 18

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!