Drop offline tablespaces

posted Nov 1, 2010, 10:52 AM by Sachchida Ojha
spo /tmp/drop_off.sql
set feed off
prompt spo /tmp/drop_off.log
prompt set echo on timing on time on
select 'drop tablespace '||tablespace_name||' including contents and datafiles;'
from dba_tablespaces
where status = 'OFFLINE'
/
set feed on
spo off
@@/tmp/drop_off.sql
set echo off timing off time off

Comments