Update get_tablespaces_ddl.sql

This commit is contained in:
Yacine31
2021-11-25 03:56:27 +01:00
parent ac2b06ef8e
commit c727ca0918

View File

@@ -12,6 +12,8 @@ set head off pages 0 feedback off lines 200
select '------- HOSTNAME : '||host_name||', DB_NAME : '||name||', VERSION : '||version from v$database,v$instance;
select '------- Datafiles : ' 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)
@@ -47,6 +49,8 @@ GROUP BY ts.tablespace_name,
ts.block_size
ORDER BY ts.tablespace_name;
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(e.used_bytes,10*1024*1024) -- si taille nulle, on retourne 10M