Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to reorg a schema?
Brian,
Have you considered writing a SQL to create a SQL to truncate all the tables in the schema ?
This way everything including procedures, functions etc. will remain in the
users's schema along with
privileges and roles etc. that you have already mentioned.
It goes something like this:
set heading off feedback off pagesize 2000
spool truncate.sql
select 'truncate table '||table_name||';'
from user_tables;
spool off
Suresh Bhat
Oracleguru
www.oracleguru.net
Brian Yan <by999_at_hotmail.com> wrote in article
<80a14p$fpk$1_at_nnrp1.deja.com>...
> Hi there,
>
> I want to reorg a schema. I know I can use export/import utility to do
> this. My question is: Do I really have to drop the schema (user) cascade
> before I import? Because dropping an user will wipe out all the
> privilege and roles granted, I really don't want to do that.
>
> Any suggestion is very much appreciated!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Received on Tue Nov 09 1999 - 16:03:42 CST