Kbase P87181: prostrct remove returns 8565 and 6961 messages
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/23/2004 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.1D
SYMPTOM(s):
prostrct remove returns 8565 and 6961 messages
The last extent of area <area name> is in use. (8565)
Extent delete rejected. (6961)
proutil truncate area used on the area to be removed
CAUSE:
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 file is truncated.
This means though that the tables in the area are still defined in the schema for the database, hence the 8565. Deleting the tables must be done before the prostrct remove can be carried out.
FIX:
truncate area has to be run twice, and between the two truncate area sessions, the tables should be deleted from the affected area using the Data Dictionary or 4GL.
The steps are -
1. backup the database
2. truncate the area
3. delete the tables
4. truncate the area
5. truncate the bi
6. remove the area
These steps are the fastest way to remove the area. Between steps 2 and 3 and idxbuild might be required in order to access a table for it to be deleted, but this idxbuild should take little time since there is no longer any data in the area.
The following example was tested with 9.1D09 sports on HP-UX 11.11. Assume that the Order Area is to be removed from the database. The tables Orders and Order-Line are located in this area -
1. prodb sports sports
2. prostrct list sports
3. pro sports -p disporders.p displays orders -
/* disporders.p */
for each order:
disp order.
end.
4. The database should now be backed up before using the truncate area -
probkup sports sportsbak0
5. proutil sports -C truncate area "Order Area"
6. The truncate area has now reset the hi-water mark back to the beginning of the storage area, so effectively there is no data in the affected tables. This can be checked by running pro sports -p disporders.p again - it will display no orders.
The tables are still defined in the schema, however, so if a truncate bi and prostrct remove were to be run now, prostrct remove would fail with the 8565 and 6961 messages. The tables have to be deleted. Thus -
7. Data Dictionary > Schema > Delete Table(s) and delete Order and Order-Line
8. proutil sports -C truncate area "Order Area"
The bi is actually truncated before the truncate area is carried out. However, prostrct remove still requires the bi file to be explicitly truncated before the the remove is carried out. Thus -
9. proutil sports -C truncate bi
10. prostrct remove sports d "Order Area" now works