Error 940

Severity

26

Message text

Dbtable in wrong state for operation: %S_DBT.

Explanation

Adaptive Server tracks the status of each open database using a memory structure called a dbtable, which contains state information such as the number of open transactions in the database, the number of open objects, keep counts that ensure proper use of each dbtable, and so on. Error 940 is raised when a database operation is attempted which is incompatible with the current state of its dbtable.

Error 940 is due to an internal Adaptive Server problem. It results in a stack trace and prevents further work in the server.

The error is raised with the following states:

State

Meaning

1

Database is being dropped but the dbtable is not marked for dropping.

2

dbtable was marked for dropping by a task other than the one dropping the database.

3

Database is being dropped but the dbtable’s keep count is not zero. This state is only raised by diagserver.

4

Database is being dropped but is not marked active.

5

dbtable is being locked but the database is not active.

6

While decrementing the dbtable keep count, it was found to be less than zero.

7

Illegal attempt by a process to increment the keep count.

8

Similar to state 7.

10

Invalid pointer to dbtable structure.

11

While terminating use of a dbtable, the keep count was found to be less than zero.

12

Attempted to unlock a dbtable which is not currently locked.

13

Attempted to cleanup a dbtable not marked for cleanup.

14

A non-system task attempted to update the keep count.

15

Attempted to update a newly created dbtable that is not marked as created. (Raised by diagserver.)

16

Similar to state 14.

17

Attempted to free a dbtable not marked for cleanup. (Raised by diagserver.)

18

Attempted to free a dbtable whose keep count is not 1.

19

Retrieved a dbtable from the free list, but the dbtable is not marked as free.

20

Illegal attempt to mark a dbtable active (raised by diagserver).

21

Illegal attempt by a process that does not own a dbtable to keep it.

22

Attempted to uninstall a dbtable that is not in the appropriate state (raised by diagserver).

23

Attempted to uninstall a dbtable that is not on the active chain.

25

Database is not in ’drop’ state as expected.

26

dbtable was found to be free although it is not marked free.

27

dbtable was found to be free although its keep count is non-zero.

29

dbtable is found to be active although it is not marked active.

30

More than one dbtable is found for a database.

Action

Shut down and restart the server. If the problem persists, call Sybase Technical Support. You may need to upgrade to a version in which the problem is resolved.

Versions in which this error is raised

Version 11.5.1 and later