select 'drop '||object_type||decode(object_type,'TABLE','
&&owner..'||object_name||' cascade constraints;','
&&owner..'||object_name||';')
from dba_objects
where object_type not in ('INDEX','TRIGGER','DATABASE LINK','PACKAGE BODY')
and owner = upper('&&owner')
order by decode ( object_type , 'SYNONYM', 1, 'VIEW', 2, 'TABLE', 3, 4 )
ASC
/
-----Original Message-----
Sent: Thursday, May 10, 2001 4:02 PM
To: Multiple recipients of list ORACLE-L
Hi,
As you know, drop user ... cascade drops all the
schema's object and the user, anybody knows a handy
way to drop only the objects but keep the user?
Also, when I export a schema from db1 and try to
import into db2. Since the schema does NOT exist on
db2, I got error "user not exist", so I have to create
that user first before importing. Is there any way to
import both the missing user and that user's objects?
Thank you.
Janet
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Janet Linsy
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Khedr, Waleed
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).