From e034f2819b0e15682ea6e562e7c53e65c96be902 Mon Sep 17 00:00:00 2001 From: Yacine31 Date: Wed, 24 Nov 2021 05:00:25 +0100 Subject: [PATCH] Update get_tablespaces_ddl.sql MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mise à jour code sortie SQL - présentaion --- get_tablespaces_ddl.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_tablespaces_ddl.sql b/get_tablespaces_ddl.sql index 0060df6..87238cd 100644 --- a/get_tablespaces_ddl.sql +++ b/get_tablespaces_ddl.sql @@ -17,7 +17,7 @@ select '-- -------------------------------------------' from dual; SELECT 'CREATE ' || DECODE (ts.bigfile, 'YES', 'BIGFILE ') --assuming smallfile is the default table space || 'TABLESPACE "' || ts.tablespace_name || '" DATAFILE ' || CHR(13) || CHR(10) - || LISTAGG(decode(p.value, NULL, '''' || df.file_name || '''') || ' SIZE ' + || LISTAGG(decode(p.value, NULL, ' ''' || df.file_name || '''') || ' SIZE ' || ' 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 @@ -51,7 +51,7 @@ GROUP BY ts.tablespace_name, ORDER BY ts.tablespace_name; SELECT 'CREATE TEMPORARY TABLESPACE "' || ts.tablespace_name || '" TEMPFILE ' || CHR (13) || CHR (10) - || LISTAGG ('' || df.file_name || '''' || ' SIZE ' + || LISTAGG (' ''' || df.file_name || '''' || ' SIZE ' || nvl(e.used_bytes,10*1024*1024) -- si taille nulle, on retourne 10M || DECODE ( df.autoextensible,