Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving a table from one user to another
Message
De
13/03/2001 16:12:58
 
 
À
13/03/2001 11:05:10
Information générale
Forum:
Oracle
Catégorie:
Autre
Divers
Thread ID:
00484462
Message ID:
00484616
Vues:
15
>Hello,
>
>I made the classic mistake and created my tables and indexes under the 'SYSTEM' account. I Initially created synonyms and its all working okay but I realize I may be in trouble in the future and would like to move the tables to a new user account. Is this possible or I have to create everything from scratch.
>
>Thanks
Hello

If you are using 8i there are a new MOVE command , read below, otherwise use
CERATE TABLE AS SELECT * FROM (other table).

---------------------------------------------
Moving Tables

Oracle8i offers some great features with respect to table management, as well. For example, you can relocate a table to another tablespace or simply to resize the initial segment, without the use of EXPORT and IMPORT and without the create table as select statement with the storage clause for the table created explicitly defined. This action is performed with the
ALTER TABLE (table name) MOVE [tablespace tblspcname] statement.

If the tablespace named in the tablespace tblspcname clause is the same tablespace where the table already resides, or if the clause is omitted, Oracle8i simply recreates the table in a new segment in the same tablespace. If not, then Oracle moves the database object to the new tablespace specified. The operation of the alter table name move tablespace tblspcname statement requires enough space for two copies of the table to exist in Oracle8i until the operation completes and Oracle8i can drop the table. During the period of moving the table, users can still issue select statements to see data in the table, but they cannot make any changes to data in the table.

TIP: In addition to moving the table data, the alter table name move tablespace tblspcname command moves associated indexes and retains constraints and object privileges granted to users on the table, as well. Thus, the capabilities of this command far surpass similar functionality provided by the create table as select statement.
-----------------------------------------------
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform