company logo

Database consistency errors

Usually, database consistency errors should not happen. Nevertheless, there are always critical situations, which may lead to consistency problems.

Since ODABA stores redundant information in order to optimize access (e.g. by storing inverse references or storing key attribute values in indexes), a typical error is an error resulting from maintaining the redundancy (e.g. when changing the value of a key attribute, which requires changing all indexes that have stored this value).

Another typical case happens, when the system is not able to delete the instance from an index when deleting an instance (accessing deleted entry).

The database transaction mechanism avoids this problems, but such problems may happen when event handling is not done properly or - in rare cases - when the system fails.

Typical Database consistency errors are:

  • 0003 - accessing deleted instance
  • 0105 - invalid data type for accessed index or instance
  • 0931 - error in index tree

There are three different levels for repairing database consistency errors:

  • running repair functions from OShell
  • calling DBCheck utility
  • recreate extent (owning extents, only)
  • Create a database copy