Oracle Tablespace Datafiles Viewer
Displays datafile details for a specified tablespace, including size, max size, autoextend settings, increment size, and status. Useful for storage monitoring and tablespace capacity management.
oraclesqlstorage-tablespacesv1.0.0
0 stars0 downloads2 views0 comments
By OracleDba • Created
Code
(22 lines)12345678910111213141516171819202122
-- -----------------------------------------------------------------------------------
-- File Name : https://oracle-base.com/dba/monitoring/ts_datafiles.sql
-- Author : Tim Hall
-- Description : Displays information about datafiles for the specified tablespace.
-- Requirements : Access to the V$ views.
-- Call Syntax : @ts_datafiles (tablespace-name)
-- 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
WHERE tablespace_name = UPPER('&1')
ORDER BY file_id;