Re: Dropping All Tables
From: <bill_at_chaos.cs.umn.edu>
Date: 8 Sep 92 21:50:21 GMT
Message-ID: <bill.715989021_at_chaos.cs.umn.edu>
Date: 8 Sep 92 21:50:21 GMT
Message-ID: <bill.715989021_at_chaos.cs.umn.edu>
>In <Bu11us.Fx0_at_well.sf.ca.us> mharper_at_well.sf.ca.us (Michael J. Harper) writes:
>What is the easiest way to remove all tables, views, synonyms, etc. owned
>by a particular user?
we grant ourself access and login as the user,
set paus off;
set pages 999;
set head off;
spo spool_file_name.sql
select 'drop table ', table_name, ';'
from cat
where table_type = 'TABLE';
select 'drop view ', table_name, ';'
from cat
where table_type = 'VIEW';
select 'drop synonym '', table_name, ';'
from cat
where table_type = 'SYNONYM';
spo off;
then use your favorite edit method to clean up the spool file prior to running it, or just run it and ignore the error messages.
_at_spool_file_name
bill pociengel
-- bill_at_chaos.cs.umn.eduReceived on Tue Sep 08 1992 - 23:50:21 CEST