Re: Dropping Objects

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Fri, 27 Apr 2001 05:34:45 GMT
Message-ID: <3AE905C4.5ABD8ECC_at_telusplanet.net>


Think of the 'CASCADE' option as including all 'child' objects in the drop request - and applying the request in the correct sequence. As Ranga points out, correlated but not subordinate objects, such as procedures (relative to tables), are simply invalidated. (Triggers are subordinate to tables - they can not logically exist without the table.)

/Hans

Ranga Chakravarthi wrote:

> Hi,
> 1. The command you are looking for is : 'DROP USER <username> CASCADE'
> This will drop all the objects owned by that user.
> 2. It will drop all the indexes, constraints and triggers associated with
> that table.
> The only things that will be invalidated are any packages, functions or
> procedures refrencing the
> dropped table.
>
> "Brandon Duncan" <bduncan_at_pietechnet.com> wrote in message
> news:94pu66$fuh$1_at_bob.news.rcn.net...
> > Hi,
> > I actually have two questions.
> > One : Is there a command which drops all objects associated with a
> > Database/User?
> >
> > Two : Does the command "DROP TABLE X CASCASE CONSTRAINTS" drop all
> > objects associated with the table X (Indexes, Constraints, triggers, ect)
 or
> > just the constraints? If it doesn't drop everything, what happens to the
> > orphaned objects? If it doesn't drop everything associated with table X,
> > how do you drop all objects associated with table X?
> >
> > Thanks,
> >
> > Brandon
> >
> >
> >
Received on Fri Apr 27 2001 - 07:34:45 CEST

Original text of this message