Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: ??? drop users' objects without dropping user
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
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).
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