Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Datafile

Posted on 2011-02-15
6
254 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 76

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 76

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

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 76

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

856 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