denrepo

OracleStorage

Datafiles with size and autoextend limits

Every datafile, its current size, whether it can grow, and how far. Files with AUTOEXTEND NO in a busy tablespace are the ones that page you at night.

Not yet verified. How scripts are tested

ora-datafiles.sql
1CLEAR COLUMNS2SET LINESIZE 180 PAGESIZE 200 TRIMOUT ON TAB OFF3COLUMN tablespace_name HEADING "TABLESPACE" FORMAT A204COLUMN file_name       HEADING "FILE"       FORMAT A705COLUMN size_gb         HEADING "SIZE GB"    FORMAT 99,990.996COLUMN autoextensible  HEADING "AUTO"       FORMAT A47COLUMN max_gb          HEADING "MAX GB"     FORMAT 99,990.998COLUMN status          FORMAT A99 10SELECT tablespace_name, file_name,11       ROUND(bytes / POWER(1024, 3), 2) AS size_gb,12       autoextensible,13       ROUND(maxbytes / POWER(1024, 3), 2) AS max_gb,14       status15FROM dba_data_files16ORDER BY tablespace_name, file_name;

Save it as ora-datafiles.sql and run it with SQL> @ora-datafiles.

Open in denrepoRelated tool: Tablespace runway and datafiles

Helps with

Part of these runbooks

More Oracle scripts: Storage