From 4a47aa1862c9b5acb792c021def4b028ff85c421 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Mon, 24 Nov 2025 18:11:27 +0100 Subject: [PATCH] ajout de la colonne : nombre de datafile --- sql/20a_tbs_details.sql | 9 ++++----- sql/20b_tablespaces.sql | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sql/20a_tbs_details.sql b/sql/20a_tbs_details.sql index 1a1753d..33692d9 100644 --- a/sql/20a_tbs_details.sql +++ b/sql/20a_tbs_details.sql @@ -1,9 +1,4 @@ prompt

Détail des tablespaces :

--- COL TABLESPACE_NAME FORMAT A20 HEAD "Nom Tablespace" --- COL PCT_OCCUPATION_THEORIQUE FORMAT 990.00 HEAD "% Occup" --- COL TAILLE_MIB FORMAT 99999990.00 HEAD "Taille MB" --- COL TAILLE_MAX_MIB FORMAT 99999990.00 HEAD "Taille max MB" --- COL TAILLE_OCCUPEE_MIB FORMAT 99999990.00 HEAD "Espace occupé MiB" COL TABLESPACE_NAME FORMAT A20 HEAD "Tablespace" COL alloc FORMAT 99999999.00 HEAD "Allocated MB" @@ -11,10 +6,12 @@ COL used FORMAT 99999999.00 HEAD "Used MB" COL free FORMAT 99999999.00 HEAD "Free MB" COL max FORMAT 99999999.00 HEAD "MaxSize MB" COL Pct_Used FORMAT 999.00 HEAD "% Used" +COL nb_of_file FORMAT 999 HEAD "Nbr Of Files" select /* db-html-report */ a.tablespace_name, t.bigfile, + a.nb_of_file, a.bytes_alloc/1024/1024 alloc, (a.bytes_alloc - nvl(b.bytes_free, 0))/1024/1024 used, (nvl(b.bytes_free, 0))/1024/1024 free, @@ -24,6 +21,7 @@ from ( select f.tablespace_name, + count(*) as nb_of_file, sum(f.bytes) bytes_alloc, sum(decode(f.autoextensible, 'YES', f.maxbytes, 'NO', f.bytes)) maxbytes from @@ -48,6 +46,7 @@ union all select h.tablespace_name, dt.bigfile, + count(*) as nb_of_file, (sum(h.bytes_free + h.bytes_used))/1024/1024 alloc, (sum(nvl(p.bytes_used, 0)))/1024/1024 used, (sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)))/1024/1024 free, diff --git a/sql/20b_tablespaces.sql b/sql/20b_tablespaces.sql index fb2527f..a7728fd 100644 --- a/sql/20b_tablespaces.sql +++ b/sql/20b_tablespaces.sql @@ -7,6 +7,7 @@ COL used_mb FORMAT 99999999.00 HEAD "Used MB" COL free_mb FORMAT 99999999.00 HEAD "Free MB" COL max_mb FORMAT 99999999.00 HEAD "MaxSize MB" COL Pct_Used FORMAT 999.00 HEAD "% Used" +COL nbr_of_files FORMAT 999 HEAD "Nbr Of Files" COL BIGFILE FORMAT A8 HEAD "Bigfile" select /* db-html-report */ @@ -14,6 +15,7 @@ select /* db-html-report */ c.NAME, a.tablespace_name, t.bigfile, + a.nbr_of_files, a.bytes_alloc/1024/1024 alloc_mb, (a.bytes_alloc - nvl(b.bytes_free, 0))/1024/1024 used_mb, (nvl(b.bytes_free, 0))/1024/1024 free_mb, @@ -24,6 +26,7 @@ from select f.con_id, f.tablespace_name, + count(*) as nbr_of_files, sum(f.bytes) bytes_alloc, sum(decode(f.autoextensible, 'YES', f.maxbytes, 'NO', f.bytes)) maxbytes from