| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Drop all objects
"Luc Gyselinck" <Luc.Gyselinck_at_nospampandora.be> schrieb im Newsbeitrag news:e40hb.66824$Tm5.3450907_at_phobos.telenet-ops.be...
> My experience, which goes back to Oracle 6, has leared me that the use of
> this statement can take a LOOONG time.
>
> I always use the following approach:
>
> select 'drop '||object_type||' '||object_name||';'
> from user_objects
> where object_type NOT IN ('PACKAGE BODY','TRIGGER','INDEX')
> /
> (may need some refinements)
>
> spool it to a file and run that file
>
> and finally, when most (if not all) of the objects are dropped, use the DROP
> USER statement.
>
> (indexes, triggers are automagicaly dropped when the table is dropped,
> package bodies when the package specification is dropped)
Have tried both. Actually I first drop all the tables, which drops indexes and triggers too, then packages and then all the rest. However it takes as long as dropping the user. Only normally I don't want to drop the user (because of the grants and passwords) so right now the only way is to drop the objects one by one. Hello oracle, I'd like a drop schema/truncate schema/delete from schema command!!
Lots of Greetings!
Volker
Received on Thu Oct 09 2003 - 07:25:54 CDT
![]() |
![]() |