diff --git a/get_tablespaces_ddl.sql b/get_tablespaces_ddl.sql index ad297bc..6389795 100644 --- a/get_tablespaces_ddl.sql +++ b/get_tablespaces_ddl.sql @@ -19,7 +19,7 @@ SELECT 'CREATE ' || 'TABLESPACE "' || ts.tablespace_name || '" DATAFILE ' || CHR(13) || CHR(10) || LISTAGG(decode(p.value, NULL, ' ''' || df.file_name || '''') || ' SIZE ' -- || df.bytes -- on ne prends pas la taille du datafile, mais la taille ocupée used_bytes - || nvl(e.used_bytes,10*1024*1024) -- si taille nulle, on retourne 10M + || decode(floor(e.used_bytes/1024/1024),0,10,floor(e.used_bytes/1024/1024)) || 'M ' -- si taille nulle, on retourne 10M || DECODE ( df.autoextensible, 'YES', ' AUTOEXTEND ON NEXT ' || df.increment_by*ts.block_size || ' MAXSIZE ' @@ -51,7 +51,7 @@ select '------- Tempfiles : ' from dual; SELECT 'CREATE TEMPORARY TABLESPACE "' || ts.tablespace_name || '" TEMPFILE ' || CHR (13) || CHR (10) || LISTAGG(decode(p.value, NULL, ' ''' || df.file_name || '''') || ' SIZE ' - || nvl(floor(e.used_bytes/1024/1024),10) || 'M ' -- si taille nulle, on retourne 10M + || decode(floor(e.used_bytes/1024/1024),0,10,floor(e.used_bytes/1024/1024)) || 'M ' -- si taille nulle, on retourne 10M || DECODE ( df.autoextensible, 'YES', ' AUTOEXTEND ON NEXT ' || df.increment_by*ts.block_size || ' MAXSIZE '