Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 9th, 2004, 04:39 PM
Registered User
 
Join Date: Sep 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tablespace fragmentation

Hi Guys,


I've got a client who wants me to rebuild all tables in a specific tablespace. Now I know that 2 tables were a problem in this tablespace because the PCT_INCREASE was set to 25, making the extents 180mb at one point. I have already altered the tables to change the next extent size. I am not sure on how I should proceed in defragmenting the tablespace. Any ideas?
The end result should be to fix all entents to be a uniform size and have all free space in the tablespace be contiguous.

Should I do (as an example):

(The tablespace name is : MY_DATA)

- Defragment the Table:
ALTER TABLE MERCHANT.HIST_STYLE STORAGE (NEXT 4M PCTINCREASE 0)
ALTER TABLE MERCHANT.HIST_STYLE MOVE TABLESPACE MY_DATA NOLOGGING

Then:
- Defragment the Tablespace:
(1)export using owner mode, compress = Y.
(2)drop the tablespace.
(3)create the tablespace.
(4)import

or should I :

- Defragment the Table:
ALTER TABLE MERCHANT.HIST_STYLE STORAGE (NEXT 4M PCTINCREASE 0)
ALTER TABLE MERCHANT.HIST_STYLE MOVE TABLESPACE MY_DATA NOLOGGING

Then:
ALTER TABLESPACE MY_DATA COALESCE;



Or are these options not correct?






Similar Threads
Thread Thread Starter Forum Replies Last Post
tablespace and user related issues Amitava Deewan Oracle 1 March 19th, 2005 06:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.