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

From: Vikram Goel <vgoel>
Date: 1995/11/02
Message-ID: <1995Nov2.134930.9498_at_schbbs.mot.com>#1/1


Eddie,

Refer to my reply to Hagen Finley ( titled 'IS THERE A SQL COMMAND TO CHANGE TABLE' doc# 'news:1995Nov2.015750.20768_at_schbbs.mot.com). The same technique will work for you, any differences are noted.

  1. As table owner grant all on the table to newuser.
  2. As newuser issue the following command: CREATE TABLE <table_name> <give table tablespace and storage parameters) as select * from olduser.<table_name>; Note: for the exact syntax check the SQL language manual .

If you want to use export/import, you can do so, however befor importing create the table in the specified tablespace, then import using fromuser/touser, and the parm 'CREATE= N'.

Hope it helps.

Vikram Goel

Sr. DBA

MOTOROLA - Byonton Beach, FL

Email: vgoel_at_emi.net

ejuan01_at_solix.fiu.edu (Eddie Hernandez) wrote:
>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
>***************************************************************************
Received on Thu Nov 02 1995 - 00:00:00 CET

Original text of this message