Consultor Eletrônico



Kbase P15907: How to remove all extents from a storage area.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   30/10/2003
Status: Unverified

GOAL:

How to remove all extents from a storage area.

GOAL:

Can I remove an extent that is not empty?

FIX:

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).

All objects must be removed before truncating the area. Indexes are deactivated when the truncate area command is run. In order to then remove the tables, an idxbuild must be run, drop the tables, then remove the extent.