Update get_tablespaces_ddl.sql

This commit is contained in:
Yacine31
2021-11-26 04:59:48 +01:00
parent 962c06d9e2
commit a426432370

View File

@@ -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 '