Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: deleating a database
In article <981809237.156454_at_news2.bigplanet.com>,
"albrrat" <albrrat_at_hotmail.com> wrote:
> I created a small database with very little to nothing in it. How can
I
> deleate or clear the entire database in one shot without constraint
errors.
> I would like to spoool the DDL and DML to a new file to show the
professor
> the steps taken but cannot do it, if some data is already there. I
have all
> the data on file and would be realy easy to run if nothing existed.
Is there
> a way to do this?
>
Clearing out all existing data isn't quite the same thing as deleteing
a database but to clear out the data here is what you do:
You can use sql to generate the sql necessary to do the above: select 'truncate table '||owner||'.'||table_name||';' from sys.dba_tables where owner = 'APPLOWNER';
Another method would be to run a full export with rows=n so no data is exported, delete the database, rebuild it, and import the object definitions out of the export file.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/Received on Mon Feb 12 2001 - 08:46:47 CST