Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Drop schema and all related objects
> -----Original Message-----
> From: james ellis [mailto:jellis24_gso_at_yahoo.com]
>
> connect as sys or system.
> drop user "username" cascade;
> The user and all objects will be removed.
>
> --- Mujeeb Chowdhry <mujeeb.chowdhry_at_nara.gov> wrote:
> >
> > How can I drop schema (user and all it's objects). I
> > have one main user in the application and wants to
> > drop user and all related objects. Can anyone help
> > me in this regard.
In My Humble Opinion, connecting as sys or system should be reserved for tasks that cannot be accomplished through another user.
Instead, you could connect as any user that has DBA role (or the appropriate privileges) and then issue the drop statement.
Also, it can often prove useful later to first do an export of the user and all the objects owned by that user, BEFORE doing the drop user cascade.