?
Solved

alter tablespace tablespace_name coalesce

Posted on 2007-03-21
3
Medium Priority
?
8,098 Views
Last Modified: 2013-12-21
Hi,
       Can i use safely  "ALTER TABLESPACE  tablespace_name COALESCE" to free up unused space in any tablespace ( like ununsed extents). Is there any way to find if a tablespace needs to be COALESCED to free up space before we go ahead adding space to tablespace using "ADD DATAFILE" clause? Is there any disadvantange or any other complication using this "COALESCE" command or is it safe enough?

Thanks,
Harris.
0
Comment
Question by:harris2107
[X]
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
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
johnsone earned 1000 total points
ID: 18766556
Coalescing a tablespace will take groups of contiguous free blocks and put them back together into one free segment.  It does not free any space from objects.

You cannot free space for a table that is above the high water mark.  One of the easiest ways to get back space for a table is to use:

ALTER TABLE <tab> MOVE TABLESPACE <ts>;

This will rebuild the table into the specified tablespace (you can use the same one).
0
 

Author Comment

by:harris2107
ID: 18767067
Yes, i understood that. The Coalesce command takes groups of contigous free blocks (which are left unused in the used segments) and puts them back into a usable piece of segment, (something like defragmentation). My question is, will this COALESCE command any other things than just grouping blocks? We can use this safely with out any problem on all the tablespaces right?
0
 
LVL 35

Expert Comment

by:johnsone
ID: 18770689
That is all it does.  If you are using locally managed tablespaces and uniform block size, there is no reason to ever coalesce.  You will not fix any fragmentation as the blocks will be split up back into the same chunks they are in now.

There is no harm using it on any tablespaces.  I am not entirely sure if it is valid on temporary tablespaces, but the worst thing that will happen is you will get an error when you run the command.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

770 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