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: question of user and tablespace

Re: question of user and tablespace

From: Bernhard Seeling <seeling_at_kzvth.ef.uunet.de>
Date: Mon, 26 Jul 1999 12:47:50 +0200
Message-ID: <7nhegg$9q9$1@newsread.do.de.uu.net>


generate a spool file

select 'rename '||table_name||' to '||table_name||'_old;'  from user_tables where tablespace_name ='user2' ;

select 'create table '||table_name||' tablespace user1 as select * from '||table_name||'_old;'
 from user_tables where tablespace_name ='user2' ;

select 'drop table '||table_name||'_old;'  from user_tables where tablespace_name ='user2' ;

and execute this script !

MfG Bernhard

leirace_at_my-deja.com schrieb in Nachricht <7nh0sm$ub0$1_at_nnrp1.deja.com>...
>Hi all,
> I have a user in oracle, "myuser",
> default tablespace is "user1", but many table use tablespace "user2"
>I want put all the table data into tablespace "user1".
> So , I export user "myuser", and recreate user "myuser" set default
>tablespace "user1", then import "myuser.dmp", but these table always
>in tablespace "user2".
> Please tell me how put all data into tablespace "user1" from "user2"?
> leirace
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Mon Jul 26 1999 - 05:47:50 CDT

Original text of this message

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