Re: DB defragmentation

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/11/13
Message-ID: <56ce6v$ifn_at_newton.pacific.net.sg>#1/1


"J.Golovaty" <golovaty_at_crs.ch> wrote:
>Instralling Designer 2000 I peacefully reached the end of step 13
>'Pre-checks before installations' where was written:' if SYSTEM
>tablespace is fragmented you'd rectify it by perfprming full DB export
>and re-import...'
>So I exported it. But what to do now? How to merge the fragments
>togeather Manual doesn't say. I couldn't find the info in other manuals
>I have either(evid. I don't have the whole complect).
>Please help
>JG

Hi there,

One of the ways to remove fragments in the database, is to drop all the objects for that user.

For example, if you want to remove fragments for user <scott> Follow the steps below.

  1. Export all the objects for a SCOTT with compress=y parameter.
  2. Drop all the objects owned by SCOTT
  3. Import the file as SCOTT. taken from step1

The above steps should remove all the fragments in the database objects.

After import, you can query USER_SEGMENTS table which will give you the number of extents occupied by each object. Issue the following query.

SELECT SEGMENT_NAME, EXTENTS
FROM USER_SEGMENTS
ORDER BY EXTENTS If you issue the query before and after export, you should see a drop in number of extents occupied by objects.

Hope the above info is useful.

Regards

N.Prabhakar
Socgen Crosby Securities
Singapore Received on Wed Nov 13 1996 - 00:00:00 CET

Original text of this message