Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: First time Table reorganize procedure

Re: First time Table reorganize procedure

From: Eugene Firyago <efiryago_at_bisys.com>
Date: Fri, 4 Jun 1999 16:40:28 -0400
Message-ID: <7j9djg$ahl$1@autumn.news.rcn.net>


The good idea woud be testing your process. This could be done as the following assuming that the table that needs to be reorganized is quite large:

  1. create tablespace test_tablespace datafile ...
  2. create user test identified by password default tablespace test_tablespace; grant connect,resource to test; revoke unlimited tablespace from test; ---> VERY IMPORTANT STEP! alter user test quota unlimited on test_tablespace; ---> VERY IMPORTANT STEP!
  3. imp system/password file=table.dmp fromuser=user touser=test rows=N ...
  4. Using SQL*Plus COPY command load rows from source user.table_at_prod_database to test.table_at_test_database (the condition prod_database != test_database would be better).

If your source table is not large you can just import the table with rows in full eliminating step 4.

And now you are redy to test your process!

Good luck,
Eugene.

 on small amount of data but with the same data structure in some another tablespace. production

Kevin A Lewis <KevinALewis_at_Hotmail.com> wrote in message news:0eS53.154$pl3.2651_at_newreader.ukcore.bt.net...
> I need to check my procedure for reorganizing a single table.
>
> 1 :- Export the table
>
> exp user/password tables=(XXX) file=table.dmp compress=y indexes=y;
>
> 2 :- Drop the table
>
> Drop table XXX cascade constraints
>
> 3 :- Import the table data
>
> imp user/password file=table.dmp indexes=n indexfile=index.dmp
>
> 4 :- Import the index data (subsequent to the table create)
>
> sqlplus user/password_at_dbase
> @index.dmp;
> exit
>
> Never having done this before I want to be extra sure this works, allows
for
> all possible situations and for inter object dependencies.
>
> Regards
> --
> Kevin A Lewis (BOCM PAULS LTD - Animal Feed Manufacturer - Ipswich
England)
> <KevinALewis_at_HotMail.com>
>
> The views expressed herein by the author of this document
> are not necessarily those of BOCM PAULS Ltd.
>
>
Received on Fri Jun 04 1999 - 15:40:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US