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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: ??? drop users' objects without dropping user

RE: ??? drop users' objects without dropping user

From: Khedr, Waleed <Waleed.Khedr_at_FMR.COM>
Date: Thu, 10 May 2001 16:47:19 -0700
Message-ID: <F001.0030004D.20010510123516@fatcity.com>

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: janetlinsy_at_yahoo.com
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: ListGuru_at_fatcity.com (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: Waleed.Khedr_at_FMR.COM
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: ListGuru_at_fatcity.com (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). Received on Thu May 10 2001 - 18:47:19 CDT

Original text of this message

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