Re: How to change table's owner and tablespace?
Date: 1995/11/03
Message-ID: <NEWTNews.815391673.26572.bwytqnr_at_al.bst.bls.com>#1/1
In Article<478lvt$dj4_at_isis.fiu.edu>, <ejuan01_at_solix.fiu.edu> write:
> Path: atglab.bls.com!cssun.mathcs.emory.edu!swrinde!sdd.hp.com!vixen.cso.uiuc.edu!news.ecn.bgu.edu!newspump.wustl.edu!mitzi.rsmas.miami.edu!news.aoml.erl.gov!newshost.fiu.edu!solix!ejuan01
> From: ejuan01_at_solix.fiu.edu (Eddie Hernandez)
> Newsgroups: comp.databases.oracle
> Subject: How to change table's owner and tablespace?
> Date: 1 Nov 1995 20:40:29 GMT
> Organization: Florida International University
> Lines: 16
> Message-ID: <478lvt$dj4_at_isis.fiu.edu>
> NNTP-Posting-Host: solix.fiu.edu
> X-Newsreader: TIN [version 1.2 PL2]
>
> I would like to change a table's owner and tablespace. I have been given
> the following way to change the owner but have no idea how to input it into
> another tablespace. Any ideas?
>
> exp system/password full=n grants=n owner=developer
>
> imp system/password full=n fromuser=developer touser=newuser
>
>
> Thanks,
>
> ****************************************************************************
> Eddie Hernandez North Broward Hospital District
> Programmer/Oracle DBA 1608 SE 3rd Avenue
> hernb0_at_nbhd.org Ft. Lauderdale, FL 33316
> ***************************************************************************
Eddie,
Try this:
as the current_owner:
grant select on table_name to new_owner;
as the new_owner:
create table table_name tablespace TS_NAME as select * from current_owner.table_name;
as the current_owner:
drop table table_name;
make sure to re-issue any necessary grants to other users.
Jim Joslin, Oracle DBA/Oracle Product Support BellSouth Telecommunications, Inc. Received on Fri Nov 03 1995 - 00:00:00 CET