Solved

alter tablespace tablespace_name coalesce

Posted on 2007-03-21
3
8,067 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 250 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

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…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

705 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