In "normal" applications, objects are only deleted logically (see statement DeleteObject). This may create references from a logically deleted object to a "vital" one, but it won't create any relations leading into "nowhere" and causing an error.
Objects need to be removed physically from the database outside the application. The following tools might help here:
the object Cross-Reference
provides the information, whether any other object refers to the object,
which is about to be deleted
the object manager functions CollectOrphans() and CollectOrphans2() collect objects, which can be deleted due to cross-reference tests.
Two ways of removing an object from the database:
| Variant | Description |
|---|---|
| 1 | The amount of objects to be deleted is known, e.g. via InstantView® statement FindGarbage |
| 2 | All objects that can be potentially deleted are determined. The complete object cross-reference is established via flag /O. |
Variant 1 - the amount of objects to be deleted is known:
Variant 2 - determine all objects that can be potentially deleted: Flag
/O claims that a corresponding CX_XREF object is created for every database
object. Even for the ones that can't be accessed anymore. With this
information, it is possible to identify objects which can be deleted
physically: