Consultor Eletrônico



Kbase P7866: Can Proutil Truncate Area be used to delete schema?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/9/2008
Status: Verified

GOAL:

Can Proutil Truncate Area be used to delete schema?

FACT(s) (Environment):

All Supported Operating Systems
Progress/OpenEdge Product Family

FIX:

The Proutil Truncate Area utility is used to truncate an area for reuse, or once all the existing data structure is moved to a new area via a proutil tablemove or indexmove qualifier , if appropriate, will truncate an area so it can be removed. However, it does not delete schema information.

The documentation for the Proutil Truncate Area Qualifier states:

1. Deleting the contents of storage areas with this feature also allows
for rapid dumping and loading. Use PROUTIL with the TRUNCATE AREA qualifier
after dumping data, but before initiating the load.

-- This utility provides a fast way to remove data from an area to
facilitate the reloading of the data into the area for compacting space or to just remove the data from an area. Without this utility there would not be a fast way to delete data from a Progress database. There is no mention that schema will be deleted or removed. In fact if that did occur, data would not be able to be reloaded without the rebuilding of the schema, which is not even referred to. Plus applications would have to be rebuilt as the table and fields they referenced would no longer exist if the entries in schema were deleted.

2. PROUTIL with the TRUNCATE AREA qualifier works by resetting the hi-water mark in the storage area back to the beginning of the storage area. This hi-water mark reset frees all of the space in the storage area for re-use. Any tables and indexes in the storage areas are initialized to the state they were in before they contained any rows or index entries. Before resetting the hi-water mark, the before image (.bi) file is truncated.

-- This note states that Tables and indexes in the storage areas are
initialized to the state they were in before they contained any rows or index
entries. Therefore, schema in not deleted.

3. Indexes in other storage areas that are on tables in the storage
area being truncated are marked as inactive.
--If you have an index that uses a table in an area that is being
truncated it will be deactivated because the table no longer contains information and the index in invalid as the table was removed from the area. Once an index is made inactive there are two ways to activate the index again. Idxfix or Idxbuild.

4. NOTE: The schema area cannot be truncated.
--This utility does not delete schema. That is not the purpose of this
utility.

If the database is to be redesigned and tables and indexes are to be
removed from the schema the only way to do that is to dump the database and then rebuild the database with a new .df file reflecting the proper schema structure. Then reload the data required.