Solved

Datafile

Posted on 2011-02-15
6
255 Views
Last Modified: 2012-06-27
I have move all tables from one tablespace to a newly created tablespace. I have also move and rebuilt all indexes from this tablespace to the new tablespace. When I query the anount of space each object is taking up there is a total of 800M. But the tablespace is taking up 17000M. What is responsible for taking up this extra space?
0
Comment
Question by:msimons4
  • 4
  • 2
6 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 34899024
What size did you give to the new datafile when you created it?  If you turned on autoextend, what is the NEXT value you specified?
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 500 total points
ID: 34899037
Please post the query you are using to determine the spaced used by the objects.
0
 

Author Comment

by:msimons4
ID: 34899079
I gave it 2048M when I created it with 50M auto extend.

Space used by objects:

SELECT distinct owner, segment_name, segment_type, a.bytes/1048576
FROM dba_extents a, dba_data_files b
WHERE a.file_id = b.file_id
AND b.file_name = '/u02/oradata/CORELITE/datafile/FLIP01.DBF'
order by 3;

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 500 total points
ID: 34899198
>>I have move all tables from one tablespace to a newly created tablespace

I'm pretty sure the MOVE commands keeps all allocated space for the original table but compresses them into a single extent.

So if the table have 100G allocated to it in 50 extents when you moved it, it now allocated 1-100G extent.

Did you specify new storage parameters when you moved it?

There is an example here:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tables006.htm#i1106606

0
 

Author Comment

by:msimons4
ID: 34900512
If rows were deleted how do you get the space back after moving it?
0
 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 500 total points
ID: 34902543
The move was to get it out of the tablespace and reset the High Water Mark so you could resize the original datafile.

It looks like you need to specify new storage parameters to reset the initial extent on a MOVE.

That said, you can try the new 10g shrink/resize from the link above.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question