Error 6901

Severity

21

Message text

Overflow on High component of timestamp occurred in database %d. Database table possibly corrupt.

NoteThis error may be caused by a hardware problem.

Explanation

Each database has one global timestamp that is kept in memory in a structure called a dbtable. The timestamp is not a date and time; rather, it is a sequence number (6 bytes, consisting of a high and low portion) which keeps track of modifications of pages within the database. Each time a page in the database is modified, the page gets the current timestamp and the global timestamp gets incremented. The global timestamp “travels” with a database through dumps, loads, and upgrades. Timestamps are critical during recovery, to ensure that transactions are properly rolled forward or rolled back. The global timestamp is also used for timestamp columns.

The maximum value for timestamps is very high (0xffff 0xffffffff), so it is very unlikely that under normal circumstances a database will reach this limit. However, use of some unsupported database maintenance commands can cause the global timestamp to reach the maximum value.

Each time dbtable is created for the database, Adaptive Server checks the timestamp value. Error 6901 is raised if the timestamp value exceeds the maximum.

Action

A database dump and load is not an option to address this problem since that does not reset the timestamp value. The only way to recover from error 6901 is to drop and re-create the database, using these steps:

  1. bcp out all table data.

  2. defncopy out all procedures, rules, defaults and triggers.

  3. Use the drop database command to drop the database.

  4. Use the create database command to re-create the database.

  5. Create all tables.

  6. bcp in all table data.

  7. Create indexes.

  8. defncopy in all procedures, rules, defaults and triggers.

  9. Check that the user IDs in sysusers in the restored database are consistent with master..syslogins. Mismatched user IDs in databases can lead to permission problems.

    NoteScripts are recommended for reliable re-creation of the database objects.

Additional information

Refer to “Developing a Backup and Recovery Plan” in the System Administration Guide: Volume 2 for complete information about how to safely re-create databases.

Versions in which this error is raised

All versions