Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Drop user cascade question!
Resolving every dependency before dropping the each
object.
If you need anymore information please let me know.
David Miller
> OK, here is the deal:
>
> We have a medium size DB with two user ID's, when we want to
reload a
> saved copy we drop both users and import.
>
> Dropping the users has always been done like this:
> DROP USER XX CASCADE;
>
> This process takes upwards of TWO HOURS!
>
> I have come up with this
> blah...
> blah...
> select distinct 'DROP TABLE '||o.OBJECT_NAME||';'
> from user_objects o
> where o.object_type = 'TABLE';
> blah...
> blah...
>
> I do this for each 'TYPE' of (SEQUENCE, PROCEDURE, VIEW,
FUNCTION,
> etc...)
> I run it as the user I want to remove and it removes ALL
objects that
> are owned by that user.
>
> After this I login as the system manager and:
> DROP USER XX;
>
> This whole procedure takes under 5 minutes.
>
> So, what the hell is the cascade doing and am I missing
something by
> dropping each object type manually?
>
> Thanks!
> Wayne
>
>
>
>
--
This answer is courtesy of QuestionExchange.com
http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6944&cus_id=USENET&qtn_id=6266
Received on Wed Nov 03 1999 - 12:54:16 CST
![]() |
![]() |