Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how to clear a schema without dropping the user?

Re: how to clear a schema without dropping the user?

From: Brian Peasland <oracle_dba_at_peasland.com>
Date: Tue, 22 Oct 2002 17:48:50 GMT
Message-ID: <3DB58F82.B71A9471@peasland.com>


The best way is to query *_objects and dynamically create a script. For instance, the following script will create a drop script and run that script for you:

spool drop_objects.sql
select 'DROP '||object_type||' '||object_name||';' from user_objects;
spool off
@drop_objects

HTH,
Brian

Kenny Yu wrote:
>
> I need to give a schema owner the effect of 'drop user sch_owning_user
> cascade' without him having dba priviledge. That is, I want to keep the
> user's acocunt/password, tablespace etc, but need to clead all tables,
> packages, sequences, etc. Short of getting a list of objects from obj view,
> is there a simple way?
>
> Kenny
Received on Tue Oct 22 2002 - 12:48:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US