Extents

ggovotsis

New Member
Dear All,

After we finished a long and painful dump on a 95GB DB, we have created a new DB with multiple areas as well multiple extents.

On one spesific area we have allocated 17 extents (16 Fixed 2096960 size + 1). The reason for that was because we had a massive table belonging to this area.

After long conversations with managment they decided not to use this table any more.

So the question is: Is there any way to delete the extents 5 -17 that are currently occupying unusable space? and if yes how.

Many Thanks,

George Govotsis
 
Yes It is possible but we need to be sure that this extent/area contains data of only that table which we are planning to drop.

Please refer to P18590 KB entry.

=====================================================

You can only remove a database extent if the extent is not in use. To
remove a data storage area, the area needs to have no objects in it,
so you can truncate it.
If you are running a Progress version prior to 9.1B, you will need to
manually delete all the objects in the specific data area to be able
to remove it. Progress 9.1B and later offers the option to delete the
objects while truncating the storage area.
Remember that you cannot remove the Schema Area (area number 6) nor
you can truncate it.
1- Make sure you have a valid backup of your database.
2- Then you need to truncate the area.
a) For Progress 9.0X and 9.1A:

proutil <dbname> -C truncate area
This command will truncate all the empty storage areas.
Make sure you delete the objects from the storage area
before you run this command.

b) For Progress 9.1B and later:
You can specify the area name. Any objects in that area will
be deleted (You will be asked for a confirmation before the
deletion occurs).
proutil <dbname> -C truncate area <Area Name>
3- Now you can remove the extents of an area as desired.
prostrct remove dbname < d | ai | bi > <Area Name>
The command will remove the last empty extent of the specific area.
If "all" the extents get removed, the entire area automatically is
removed.
If an extent(s) is removed, a message appears which indicates that
The extent was removed successfully along with the named extent
listed.
For example:
Mydb_7.d2 successfully removed. (6968)
If the step to truncate the area is skipped, the following error
message occurs:
"The last extent of area (#) is in use (6960).

 
Dear taqvia,

Yesterday we created a new DB and we started loading the .d files.
This particular Area has couple of tables that they have already been loaded since yesterday. the last Table that we have no longer the need to load is the massive one. while we were loading the last table in this Area it started filling the extent .d4 so I presume that from .d5 to .d17 the extents are empty because we havent release the DB to production as well as we havent load anything else in this area.

So I do not want to delete the Area only the empty extents.

Thanks,

George Govotsis
 
It will work.

prostrct remove <dbname> d "Area Name" will remove the last free extent of this area. you can delete all the extents one by one.
It will not delete the entire area but last free extent. Once you execute the command do a prostrct list to verify results.

Note: You need to first truncate the bi for this command to work.
 
Back
Top