Generating script for Tablespace from current database

Generating script for Tablespace from current database

set trimspool on
set pages 0
spool gentbsp.sql
SELECT 'create tablespace'
||' '||tablespace_name
||' '||'logging'
||' '||'datafile'
||' '||file_name
||' '||'size'||' '||bytes
||' '||'EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO'
FROM Dba_Data_Files
spool off;

Comments

Popular posts from this blog

ORA-04062: timestamp of procedure has been changed

ORA-00939: too many arguments -when case arguments exceed 255

ORA-31655: no data or metadata objects selected for job