Re: How to change table's owner and tablespace?

From: Angelo Melendez <no email>
Date: 1995/11/03
Message-ID: <1995Nov3.134133.3433_at_nosc.mil>#1/1


In message <478lvt$dj4_at_isis.fiu.edu>, ejuan01_at_solix.fiu.edu (Eddie Hernandez) writes:

>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
>

I believe the table will be generated in the <touser>'s default tablespace. To ensure this happens, create the table's structure in the newuser's schema and set IGNORE=Y in the imp command line.

To avoid having to use exp/imp, you might try:

        
        create table newtab as
        select * from oldtab;

while connected as the newuser. Simply assure the newuser has select privileges on the old table. Then, just drop the old table. If you have multiple tables requiring this transfer, use SQL to generate SQL.

Hope this helps -- Angelo Melendez (melendez_at_nosc.mil) Received on Fri Nov 03 1995 - 00:00:00 CET

Original text of this message