set echo off
prompt this script is used to generate SQL file for deleting all tables in a tablespace.
prompt specify tablespace name 1:
prompt Add purge clause, y for yes, n for no 2:
prompt enter output sql file name 3:
set heading off
set verify off
set feedback off
set verify on
set heading on
set echo on
set feedback on
select 'drop table ' || owner || '.' || table_name || decode(upper('&prg'),'Y',' purge','') || ';' DropState
where tablespace_name = upper('&tsname');
Published by Osama Mustafa
Osama considered as one of the leaders in Cloud technology, DevOps and database in the Middle-East. I have more than ten years of experience within the industry. moreover, certfied 4x AWS , 4x Azure and 6x OCI, have also obtained database certifications for multiple providers.
In addition to having experience with Oracle database and Oracle products, such as middle-ware, OID, OAM and OIM, I have gained substantial knowledge with different databases.
Currently, I am architecting and implementing Cloud and DevOps. On top of that, I'm providing solutions for companies that allow them to implement the solutions and to follow the best practices.
View all posts by Osama Mustafa
One thought on “drop all tables in a tablespace”