Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 9th, 2004, 04:39 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
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?

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:53 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.