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: Defragmentation of SYSTEM TABLESPACE

Re: Defragmentation of SYSTEM TABLESPACE

From: Ian Cary <cary_at_gatwick.geco-prakla.slb.com>
Date: 1997/11/07
Message-ID: <34632143.50605946@gatwick.geco-prakla.slb.com>#1/1

> We do have some curstomers that only have (bad design) a single
> tablespace (SYSTEM). Is there any possibility to defragment it ?

I presume by de-fragmention you mean to remove rollback segments, temporary segments and data and indexes into their own respective tablespaces.If so I would do the following steps, (having backed up my original database first - just in case!)

  1. Create the 4 necessary tablespaces;
  2. issue the command; alter user <username> default tablespace <data_tbsp_name> temporary tablespace <temp_tbsp_name>;
  3. create new rollback segments in the rollback segment tablespace take offline and drop existing rollback segments (you may have to wait for current transactions to complete before doing this) change the rollback_segments entry in the init.ora
  4. exp userid=sys/password file=nodata.dmp full=y rows=n
  5. edit the nodata.dmp file to substitute TABLESPACE "SYSTEM" with TABLESPACE "<data_tbsp_name>"
  6. exp userid=sys/password file=alldata.dmp full=y rows=y
  7. drop all users from your existing database (including system)
  8. imp userid=sys/oa file=nodata.dmp indexes=n full=y
  9. imp userid=sys/oa file=alldata.dmp indexes=n full=y ignore=y
  10. imp userid=sys/oa file=alldata.dmp indexfile=cr_inds.sql full=y
  11. edit cr_inds.sql to substitute TABLESPACE "SYSTEM" with TABLESPACE "<index_tbsp_name>"
  12. run cr_inds.sql against the database

Hopefully you should now have all your original data separated out into the appropriate tablespaces.

Good Luck,

Ian Received on Fri Nov 07 1997 - 00:00:00 CST

Original text of this message

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