Re: Change objects ownership ? Can I do it ?

From: Sridhar Subramaniam <avion_at_ozemail.com.au>
Date: 1995/11/07
Message-ID: <30A030B5.1AA4_at_ozemail.com.au>#1/1


Phillip D. Jackson wrote:
>
> Try creating your table as T_tablename in TEMPORARY tablespace. Then
> drop the original tables and recreate them as the new user in an
> appropriate tablespace.
>
> CONNECT original_user/password
>
> CREATE TABLE T_name
> TABLESPACE TEMPORARY AS
> SELECT * FROM THE original_table;
>
> GRANT SELECT ON T_name to newuser;
>
> DROP TABLE original_table;
>
> CONNECT newuser/password;
>
> CREATE TABLE orginal_table
> TABLESPACE tablespace_name AS
> SELECT * FROM original_user.T_name;
>
> You might want to do an ANALYZE ... COMPUTE STATISTICS on the T_name
> table and then add a STORAGE(INITIAL ??? NEXT ??? PCTINCREASE 0) between
> the TABLESPACE tablespace_name AS and SELECT ...
>
> CREATE TABLE ...
> TABLESPACE ...
> STORAGE ... AS
> SELECT ...
Hi Phillip,

This way all table constraints, but the null/not null constraints, in the original table will be lost. You will 've to recreate them.

-- 
Cheers

Sridhar Subramaniam
Avion Consulting Services
Sydney - Australia
Email : ssubrama_at_nibucorp.ccdn.otc.com.au / avion_at_ozemail.com.au

Disclaimer : All opinions are truly and just mine.
Received on Tue Nov 07 1995 - 00:00:00 CET

Original text of this message