Script Drop all temp datafiles

The script will create the drop temporary table space including it's data files. You might need the script in many situations such as cloning a database, moving some temp table spaces etc ...

set pagesize 0
set linesize 600
select 'alter database tempfile '''||name||''' drop including datafiles;' as cmd from v$tempfile;