Oracle Datafiles Information Report

This script displays detailed information about Oracle datafiles. It shows file ID, file name, current size, maximum size, autoextend settings, increment size, and status by querying the DBA_DATA_FILES view, helping DBAs monitor storage configuration and growth.

oraclesqlstorage-tablespacesv1.0.0
0 stars0 downloads15 views0 comments
By OracleDba • Created

Code

(21 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/datafiles.sql
-- Author       : Tim Hall
-- Description  : Displays information about datafiles.
-- Requirements : Access to the V$ views.
-- Call Syntax  : @datafiles
-- Last Modified: 17-AUG-2005
-- -----------------------------------------------------------------------------------

SET LINESIZE 200
COLUMN file_name FORMAT A70

SELECT file_id,
       file_name,
       ROUND(bytes/1024/1024/1024) AS size_gb,
       ROUND(maxbytes/1024/1024/1024) AS max_size_gb,
       autoextensible,
       increment_by,
       status
FROM   dba_data_files
ORDER BY file_name;

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!