Access Method Errors

This section contains error messages for problems in Adaptive Server access methods.




Error 601

Severity

21

Message text

Descriptor for system table '%ld' in database  '%d' not found in the descriptor hash table.

Explanation

Adaptive Server expects every database to have a systhresholds table. Error 601 occurs when the Adaptive Server Threshold Manager could not open the systhresholds system table in a database because the descriptor for systhresholds was not found. The failure to open systhresholds is probably due to corruption in the database named in the error message.

Action

  1. Determine the name of the database from the database ID in the error message:

    1> use master
    2> go
    

    1> select * from sysdatabases where dbid = ID
    2> go
    

    where ID is the database ID from the error message.

  2. Determine whether the system table object ID displayed in the error message exists:

    1> use database_name
    2> go
    

    1> select * from sysobjects where id = object_ID
    2> go
    

    where database_name is the name from step 1 and object_ID is the system table ID listed in the error message.

  3. If the ID exists for the table displayed in the message, then the 601 error may be due to corruption in the memory structure used to hold the descriptor. Shutting down and restarting Adaptive Server should clear the problem. If this does not work, go on to step 4.

  4. If the ID does not exist, there is probably corruption in your database. Do the following:

    1. Run dbcc checkalloc, dbcc checkcatalog, and dbcc checkdb for the database.

    2. Determine whether hardware problems exist by checking your operating system error log.

    3. Call Sybase Technical Support. They may be able to help you recover your database, but you will probably have to recover your database from backups.

Additional information

Before contacting Technical Support, be prepared to provide:

Versions in which this error is raised

All versions




Error 603

Severity

17

Message text

There are not enough system session descriptors available to run this query. Raise the value of the configuration parameter ’number of aux scan descriptors’ or retry your query later. 

Explanation

This error occurs when Adaptive Server runs out of system session descriptors when running a query. Error 603 can occur on commands which create, drop, and update objects, as these commands often have many dependencies on system tables which Adaptive Server must handle to complete the command.

Session descriptors are the data structures used to manage access to Adaptive Server objects. Session descriptors come in three forms: user session descriptors (including worktable session descriptors), system session descriptors, and worktable session descriptors.

Session descriptors are used in the following situations:

You cannot change the number of session descriptors available to a query.

Action

When you get Error 603, you do indeed have to simplify your query or command. To recover from this error, split up your query or simplify the command and run it again.

For example, if you are entering a drop procedure command and that procedure contains other procedures or triggers, you can simplify your command by dropping the other procedures or triggers manually before running the drop procedure command.

Additional information

Refer to “Setting Configuration Parameters” in the System Administration Guide for a description of number of aux scan descriptors and how queries use scan descriptors.

Versions in which this error is raised

All versions




Error 605

Severity

21

Message text

An attempt was made to fetch logical page '%ld' in database '%.*s' from cache '%.*s'. Page belongs to object with id '%ld', not to object '%.*s'.

Explanation

This serious error occurs when Adaptive Server discovers page allocation corruption. Adaptive Server tries to access a particular object but discovers a page in the page chain for that object whose object ID is different than that of the object being accessed. There is probably either a damaged page chain or an invalid entry in the system tables for that object.

Usually this error is detected after the corruption has been written to the database on disk (hard 605), but it can also occur entirely in cache without the damage ever being written to disk (transient 605), and is not associated with data corruption. See the next section for more information about the different kinds of 605 errors and their causes.

NoteWhen an error is transient, it means it is reported even though no error condition exists or it exists only in memory. Generally, a transient error is cleared by a reboot of Adaptive Server, whereas a hard error does not go away with an Adaptive Server reboot.

For accurate diagnosis of object ID mismatch problems, the 605 error is raised only when the objects in question are user objects. Other related types of errors result in one of the errors 691 through 697. Refer to the writeups for these errors in this chapter for details.


How Much Corruption?

Assuming the error is not a transient 605, corruption usually exists in the second object specified in the 605 error text. If the dbcc checkdb and dbcc checkalloc commands do not report additional errors, the first object mentioned is not corrupt. Because the 605 error can mask the existence of other errors, you must run the dbcc checks to determine the extent of the damage.

Instead of listing two object names, this error might contain other information:


Hardware and Software Causes for 605 Errors

Table 3-2: Hardware causes of Error 605

Hardware Cause

Additional Information

Transient or Hard

Overlapping partitions on disk (UNIX only).a

Often this occurs when the server is installed on a partition that overlaps other partitions.

Hard

Problem with device driver

--

Hard

Problem with controller

--

Hard

Bad disk

“Data retry” messages in /var/adm/messages (UNIX).

Hard

a. For more information about overlapping partitions, refer to “Correct Use of Raw Partitions” in the Encyclopedia of Tasks chapter.

Table 3-3: Software causes of Error 605

Software Causes

Additional Information

Transient or Hard

Loading a master database on a master device that does not have rows in sysusages for dbid 1,2,3 identical to the device it was dumped from.

--

Hard

Loading a master database that has syscharsets in a location that is different from the default.

Caused by changing Adaptive Server sort order after operating it for some time.

Hard

Operating system notifies Adaptive Server that an I/O operation is complete when it is not.

Any time buffer information about a page is different from the disk information about the page (and the disk has the correct information).

Adaptive Server connection often dies. Running dbcc checkdb and dbcc checkalloc should produce no more 605 errors. Corruption is not on disk. First, checkpoint the other databases. Then, perform a shutdown...with nowait and restart Adaptive Server.

Transient

Action

  1. Run the dbcc checktable command on the second object specified in the error message.

  2. To help determine the full extent of the corruption, run the dbcc checkdb and dbcc checkalloc commands as soon as feasible.

  3. Check the Adaptive Server error log for other errors which often accompany a 605 error. If the 605 error is not transient, the problem is severe and you will probably need to restore from known clean backups.

  4. Either of the following situations may also apply to your Adaptive Server:

If you have dial-in facilities, Technical Support may be able to help you recover from this error without having to restore from backups. However, this recovery procedure often results in a loss of data, and therefore is often unacceptable, especially for production systems.

Additional information

For information on locating device fragments, refer to “How to Determine Which Physical Devices a Database is On” in the Encyclopedia of Tasks chapter.

Have the following information ready before contacting Technical Support:

Related Page Mismatch Errors in Version All versions

Starting with Version 11.0.3, many page mismatch problems no longer raise 605 errors, but are instead reported with the following error numbers:

Error

Description

691

Page 0 is read incorrectly, or an attempt is made to read a negative page number.

692

Attempt to read an uninitialized page.

693

I/O request was made prematurely, causing an object ID mismatch.

694

The device or operating system may be suspect.

695

The page has been overwritten, for example page 10 on disk may actually hold page 20. Hard error.

696

Objects are crossed in tempdb. Similar to a 605 except that objects are in tempdb.

697

Results from memory corruption.

Refer to the writeups for these errors in this manual for more information.

Versions in which this error is raised

All versions




Error 611

Severity

21

Message text

Attempt made to end a transaction that is idle or in the middle of an update.

Explanation

This error occurs when a termination request event occurs during the processing of a transaction. Error 611 can be caused by:

Action

To determine what might have caused the above error message, check for the following:

Error 611 may produce a stack trace that gives a portion of the SQL that caused the error. Obtain the entire stack trace, along with any errors that might have occurred prior to or following the 611 error, to determine the internal state of the process at the time of the failure.

Versions in which this error is raised

All versions




Error 614

Severity

21

Message text

A row on page %ld was accessed that has an  illegal length of %d in database '%.*s'.

NoteThis error may be caused by a hardware problem.

Explanation

This error occurs when Adaptive Server accesses a data or index row whose length is smaller than the minimum row size or greater than the maximum row size.

The minimum length of a row for each object is stored in the minlen column of sysindexes and in each data or index page header. The size of a data row or index row is 1962 characters; allow 2 characters of row overhead for APL tables, for a maximum usable row size of 1960. For DOL tables, subtract two characters per varchar column in determining usable row size.

This error can occur under the following conditions:

Error 614 can be caused by data corruption during normal processing (for example, an operating system panic occurs, causing interruption in disk writes when using UNIX files for Sybase database devices). This may be due to a problem with Adaptive Server, the operating system, or hardware.

Action

Error 614 is usually the result of a more serious underlying problem, and recovering from this error depends on when the error occurred. Determine whether the error occurred during normal processing or during database recovery, then follow the appropriate set of instructions in this section.


If the Error Occurred During Normal Processing

  1. Use the procedure in “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter to identify which table and index correspond to the page number from the error message text.

  2. If the object encountering the error is not a system table (a system table's object ID is less than 100), continue with step 3.

    If the object encountering the error is a system table and the index ID is not 0, refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index.

    If the index ID is 0, contact Sybase Technical Support. They may be able to help you repair the corruption, but it may be necessary to restore the database from clean backups.

  3. For user tables, if the index ID is 0, continue with step 4.

    If the index ID is not 0, translate it into an index name:

    1> use database_name 
    2> go
    

    1> select name from sysindexes 
    2> where id = object_ID and indid = index_ID
    3> go
    

    To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.

    Drop the index.

    Re-create the index. This clears the corruption in most cases.

    Run dbcc checktable on the table to verify that the corruption is gone.

  4. If the index ID is 0, do one of the following:

Before dumping your database, make sure it works correctly. Run the following commands prior to each dump:

  1. dbcc checkdb.

  2. dbcc checkalloc or dbcc checkalloc with the fix option. (Refer to “How to Fix and Prevent Allocation Errors” in the Encyclopedia of Tasks chapter for information about how to run these commands in multi-user mode and how to prevent spurious allocation errors from dbcc commands.)


If the Error Occurred During Database Recovery

When this error occurs during recovery, the database is marked suspect and is not accessible. Usually, you must load the database from backup. To do this, follow the instructions below:

  1. If the database in the 614 error is tempdb, check the page number. If this page is not valid for tempdb, the problem may be on another database (possibly due to a bad device). Stop here and contact Sybase Technical Support.

    If the page is valid for tempdb, or the 614 error refers to a database other than tempdb, continue with step 2.

  2. Drop the database. If the drop fails, follow the instructions in “How to Drop a Database When drop database Fails” in the Encyclopedia of Tasks chapter.

  3. Create a database for load. Make sure the database you create has sizes at least as large as those in sysusages for the original database (and that all other sysusages values match the original values). Refer to “create database” in the ASE Reference Manual for information on create database for load.

  4. Load the database from backup. (Refer to “load database” in the ASE Reference Manual.)

  5. Use the online database command to make the database available for use.

If loading from backups is not feasible, call Sybase Technical Support. Have the following documentation ready:


Preventing This Error on Recovery

To prevent Error 614 occurring on recovery, checkpoint each database that is being used before shutting down Adaptive Server.

Additional information

Refer to “Developing a Backup and Recovery Plan” in the Adaptive Server Enterprise System Administration Guide for information about how to safely create, dump, load, and re-create databases.

Versions in which this error is raised

All versions




Error 622

Severity

20

Message text

Opentable was passed a varno of %d. Object  '%.*s' already has that session descriptor in use.

Explanation

A session descriptor is an internal data structure in Adaptive Server which contains information about a table. All open objects in Adaptive Server require a descriptor structure. Whenever a connection to Adaptive Server attempts to open a table, it gets a session descriptor. varno refers to a variable number that Adaptive Server uses to maintain an array of session descriptors for a query. A unique varno is assigned to each session descriptor tracking the usage of a given object for the query.

Error 622 is raised when Adaptive Server attempts to open a table, but the varno points to a session descriptor that is already in use.

Error 622 breaks the user's connection to Adaptive Server.

Action

Error 622 is due to an Adaptive Server problem. Contact Sybase Technical Support for assistance when this error is raised.

Additional information

When calling Technical support, have the following information available:

Versions in which this error is raised

All versions




Error 623

Severity

21

Message text

Attempt to retrieve row from page via RID  failed because logical page %ld is not a data page. %S_RID. %S_PAGE.

NoteThis error may be caused by a hardware problem.

Explanation

This error occurs when Adaptive Server tries to retrieve a row from a data page by specifying the row ID (RID) and the retrieval fails because the requested page was not a data page. This error is usually caused by a server problem.

After loading a database on top of an existing database, Error 623 may appear during recovery or while doing a checkpoint.

This error may or may not be transient (transient errors disappear after Adaptive Server is restarted). In the worst case, Error 623 may indicate corruption in your database. Perform the action below as soon as possible to determine how serious the error is and to avoid further corruption if corruption has occurred.

Action

Determine whether this error is transient by performing the following steps:

  1. Refer to “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter for instructions on how to use the dbcc page command to determine the table involved. Save this information and use it in the appropriate section below.

  2. Using the object ID found in step  1, issue the following query to determine the table name:

    1> select object_name(object_ID)
    2> go
    

  3. Using the table name displayed in the output from step  2, issue the following query to determine whether corruption has occurred:

    1> dbcc checktable(table_name)
    2> go
    

If no errors occur when you run dbcc checktable, the 623 error was probably transient. Shut down and restart the server.


If the Error is Not Transient

If errors do occur when you run dbcc checktable, refer to the writeups for those errors in this manual for instructions on how to recover from them or restore your database from a clean backup. To restore from backup, follow the instructions below:

  1. Drop the database. If the drop fails, follow the instructions in “How to Drop a Database When drop database Fails” in the Encyclopedia of Tasks chapter.

  2. Create a database for load. Make sure the database you create has sizes as least as large as those in sysusages for the original database and that all other sysusages values match the original values. Refer to “create database” in the ASE Reference Manual for information on create database for load.

  3. Load the database from backup. (Refer to “load database” in the ASE Reference Manual.)

  4. Use the online database command to make the database available for use.

If loading from backups is not feasible, call Sybase Technical Support. Have the following information ready:

Additional information

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

Versions in which this error is raised

All versions




Error 624

Severity

21

Message text

Attempt to retrieve row from page via RID  failed because the requested RID has a higher number than the last RID on  the page. %S_RID.%S_PAGE.

NoteThis error may be caused by a hardware problem.

Explanation

This error occurs when Adaptive Server tries to retrieve a row from a data page by specifying the row ID (RID), but the retrieval fails because the requested row ID was a higher number than the last row ID on the page. This can happen:

Errors 624 and 625 occur under similar conditions.

Action

Recovery from this error depends on when the error occurred. Determine whether the error occurred during normal processing or during database recovery and then follow the appropriate instructions in this section:


If the Error Occurred During Normal Processing

Refer to “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter for instructions about how to use the dbcc page command to determine the table involved. Save this information and use it in the appropriate section below.

The specific action you take depends on whether or not you know which index or query caused the problem. In general, dropping and re-creating the index should resolve the index corruption.


Index Unknown, Query Known

If you do not know which index is causing the problem, but you do know which query encounters the problem, use this section to correct it. If you do not know the index or query, go to “Index and Query Both Unknown”.

  1. Determine which index should be dropped by reading the showplan output for the query that encounters the error and determining which nonclustered index the query is using to access the table in question.

    Turn on showplan and use the no execute mode:

    1> set showplan on
    2> go
    

    1> set noexec on
    2> go
    

    Enter the query that was causing the problem. For example:

    1> select title from titles where title > "Cooking"
    2> go
    

    STEP 1
    The type of query is SELECT
    FROM TABLE
    titles
    Nested iteration
    Index: titlein
    

    Turn showplan and the no execute mode off again:

    1> set noexec off
    2> go
    

    1> set showplan off
    2> go
    

  2. If the index identified in step 1 is on a system table (object ID is less than 100), refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on repairing the system table index. Otherwise, drop and re-create the index identified in step 1 (in this example “titleind”).


Index and Query Both Unknown

If you do not know either the index or the query, rebuild all nonclustered indexes on the table using the instructions in this section.

  1. Examine the dbcc page output you obtained earlier.

    If the object is a system table (the object ID is less than 100), refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index. Then go to step 3.

  2. For a user table, use sp_helpindex to list all indexes on the table, and then rebuild all the nonclustered indexes using one of two methods:

    Or:

  3. Run dbcc checktable on the table to confirm that the problem has been resolved.


If the Error Occurred During Database Recovery

When this error occurs during recovery, the database is marked suspect and is not accessible. Usually, you must load the database from backup. Follow the instructions below, depending on the version level of your server (if you have dial-in facilities, Sybase Technical Support may be able to correct the problem so that recovery of this database can proceed):

  1. Drop the suspect database using the instructions in “How to Drop a Database When drop database Fails” in the Encyclopedia of Tasks chapter.

  2. Create a database for load. Make sure the database you create has sizes as least as large as those in sysusages for the original database (and that all other sysusages values match the original values). Refer to “create database” in the ASE Reference Manual for more information on create database for load.

  3. Load the database from backup (refer to “load database” in the ASE Reference Manual).

  4. Use the online database command to make the database available for use.

Versions in which this error is raised

All versions




Error 625

Severity

21

Message text

Could not retrieve row from logical page  %ld via RID because the entry in the offset table for that RID is less than  or equal to 0.

NoteThis error may be caused by a hardware problem.

Explanation

Every row in a database has a unique row ID (RID). The two parts of a row ID are a logical page number and a row number. The row number part of row IDs are stored at the end of every data page and indicate where a certain row is located on that page.

Commands that use row IDs include dbcc checkdb, dbcc checktable, and dbcc checkcatalog. They verify the consistency of indexes and use the row IDs stored in nonclustered indexes to quickly access the data rows.

Error 625 occurs when Adaptive Server tries to retrieve a row from a data page by specifying the row ID and it fails because the requested row ID has an illegal value (smaller than or equal to zero).

This error can occur under the following conditions:

Errors 624 and 625 occur under similar conditions.

Action

Examine your operating system error log file and the Adaptive Server error log to determine if hardware errors may have corrupted your database devices.

Refer to “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter for instructions about how to use the dbcc page command to determine the table and the index involved. Save this information and use it in the appropriate section that follows.

The specific action you take depends on whether or not you know which index or query caused the problem. In general, dropping and re-creating the index will resolve the index corruption.


Index Unknown, Query Known

If you do not know which index is causing the problem, but you do know which query encounters the problem, use this section to correct it. If you do not know the index or query, use the next section.

  1. Determine which index should be dropped by reading the showplan output for the query that encounters the error and determining which nonclustered index the query is using to access the table in question.

    Turn on showplan and use the no execute mode:

    1> set showplan on
    2> go
    

    1> set noexec on
    2> go
    

    Enter the query that was causing the problem. For example:

    1> select title from titles where title > "Cooking"
    2> go
    

    STEP 1
    The type of query is SELECT
    FROM TABLE
    titles
    Nested iteration
    Index: titleind
    

    Turn showplan and the no execute mode off again:

    1> set noexec off
    2> go
    

    1> set showplan off
    2> go
    

  2. If the index identified in step 1 is on a system table (object ID is less than 100), refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index.

  3. Otherwise, drop and re-create the index identified in step 1 (in this example “titleind”).

    If this did not clear the error, create a clustered index on the table or drop and re-create the existing clustered index. Note that creating a clustered index requires an amount of space equal to 120 percent to 150 percent of the size of the table where you want to create the index.


Both Index and Query Unknown

If you do not know either the index or the query, rebuild all nonclustered indexes on the table using the instructions in this section.

  1. Look at the dbcc page output you obtained earlier.

  2. If the object is a system table (object ID is less than 100), refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on repairing the system table index. Then go to step 4.

  3. For a user table (object ID is 100 or greater), use sp_helpindex to list all indexes on the table, and then rebuild all the nonclustered indexes using one of two methods:

    Or:

    If the above methods did not clear the error, create a clustered index on the table (if space is available). You may then drop the clustered index.

  4. Run dbcc checktable on the table to confirm that the problem has been resolved.

Additional information

For more information, refer to “create database” in the ASE Reference Manual.

If you need to call Technical Support for assistance, have the following documentation ready:

Versions in which this error is raised

All versions




Error 629

Severity

21

Message text

Clustered index row entry for data page %ld is missing in index page %ld of table '%S_OBJID' in database '%S_DBID'; index row contains data page %ld instead. You can recreate the clustered index to fix this error. Xactid is (%ld,%d).

Explanation

This error occurs when Adaptive Server fails to delete a clustered index entry because the index entry did not point to the expected page.

In the error message text, the first page number refers to the data page and the last page number refers to the leaf-level index page that points to the data page.

Error 629 can occur when you attempt to delete a row in a table that has a clustered index, but Adaptive Server cannot find a pointer from the leaf page of the clustered index to the data page as expected.

The error is caused by data corruption that occurred during Adaptive Server processing (for example, an operating system panic occurs, causing interruption in disk writes when using UNIX files for Sybase database devices). This may be due to a problem with the server, the operating system, or hardware.

Action

  1. Use the procedure in “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter to identify which table and index correspond to the first page number in the error message text.

  2. If the object encountering the error is not a system table (a system table's object ID is less than 100), continue with step 3.

    If the object with the error is a system table, refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index. Then go to step 6.

  3. Determine the index name and the first page in the page chain.

    1> use database_name 
    2> go
    

    1> select name, first from sysindexes 
    2> where id = object_ID and indid = 1
    3> go
    

  4. Check that the page linkage is intact.

    1> dbcc pglinkage(<dbid>,<first page>,0,1,0,1)
    2> go
    

    If you see a message indicating “End of chain reached”, the page linkage is intact; continue with Step 5. If you do not see such a message, the page linkage is bad; stop here, do not drop the clustered index, and contact Sybase Technical Support.

  5. To ensure that the information needed to re-create the index is available, run sp_helpindex on the index prior to dropping it.

    Drop the index.

    Re-create the index. This clears the corruption in most cases.

  6. Run dbcc checktable on the table to verify that the corruption is gone. If corruption still exists, call Sybase Technical Support.

Additional information

Refer to “drop index” and “create index” in the Reference Manual for information about dropping and re-creating indexes.

Versions in which this error is raised

All versions




Error 631

Severity

21

Message text

The length of %d passed to delete row routine for the row at offset %d is incorrect on the following page: %S_PAGE. The expected row length is %d. The offset should be no greater than %d.

NoteThis error may be caused by a hardware problem.

Explanation

This error occurs when Adaptive Server attempts to delete a row (via a direct delete or inherently through updating) from an index or data page by specifying the row offset and the row length, and the action fails because the specified values of the offset or row length did not match the actual values.

Error 631 can happen under the following conditions:

Some potential causes of Error 631 are:

Action

Error 631 is probably the result of a more serious underlying problem, and recovering from this error depends on when the error occurred. Follow the instructions in this section, selecting the correct set depending on whether the error occurred during normal processing or during database recovery.


If the Error Occurred During Normal Processing

  1. Use the procedure in “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter to identify which table and index correspond to the page number from the error message text.

  2. If the object encountering the error is not a system table (a system table's object ID is less than 100), continue with step 3.

    If the object with the error is a system table and the index ID is not 0, refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index.

    If the index ID is 0, contact Sybase Technical Support. They may be able to help you repair the corruption but you may have to restore from clean backups.

  3. For user tables, if the index ID is 0 or 255, continue with step 4.

    If the index ID is not 0 or 255, translate it into an index name:

    1> use database_name 
    2> go
    

    1> select name from sysindexes 
    2> where id = object_ID and indid = index_ID
    3> go
    

    To ensure that the information needed to re-create the index is available, run the sp_helpindex procedure on the index prior to dropping it.

    Drop the index.

    Re-create the index. This clears the corruption in most cases.

    Run dbcc checktable on the table to verify that the corruption is gone.

  4. If the index ID is 255, delete the bad data row.

    If the index ID is 0, do one of the following:

Before dumping your database, make sure it works correctly. Run the following commands prior to each dump:

  1. dbcc checkdb.

  2. dbcc checkalloc or dbcc checkalloc with the fix option. (Refer to “How to Fix and Prevent Allocation Errors” in the Encyclopedia of Tasks chapter for information about how to run these commands in multi-user mode and how to prevent spurious allocation errors from dbcc commands.)


If the Error Occurred During Database Recovery

When this error occurs during recovery, the database is marked suspect and is not accessible. Usually, you must load the database from backup. To do this, follow the instructions below:

  1. Drop the database. If the drop fails, follow the instructions in “How to Drop a Database When drop database Fails” in the Encyclopedia of Tasks chapter.

  2. Create a database for load. Make sure the database you create has sizes as least as large as those in sysusages for the original database (and that all other sysusages values match the original values). Refer to “create database” in the Reference Manual for more information on create database for load.

  3. Load the database from backup. (Refer to “load database” in the Reference Manual.)

  4. Use the online database command to make the database available for use.

If loading from backups is not feasible, call Sybase Technical Support. Have the following documentation ready:


Preventing This Error on Recovery

One of the following items may help to prevent Error 631 from occurring on recovery:

Or:

Examine both your operating system error log and the Adaptive Server error log to determine if hardware errors may have affected your database devices. Look for any kernel messages reporting I/O errors and check the hardware error log or diagnostics utilities for I/O errors.

Additional information

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

Versions in which this error is raised

All versions




Error 644

Severity

21

Message text

Index row entry for data row id (%ld, %d) is missing from index page %ld of index id %d of table '%S_OBJID' in database '%S_DBID'. Xactid  is (% ld,%d). Drop and re-create the index.

NoteThis error may be caused by a hardware problem.

Explanation

This error occurs when the nonclustered index indicated by “index id” is corrupt. This corruption is detected when a process tries to delete a nonexistent row.

Action

To recover from this error, use the following steps to drop and re-create the index.

  1. Record the value of “index page” and “ index id” specified in the 644 error text. Then follow the instructions in “How to Find an Object Name from a Page Number” in the Encyclopedia of Tasks chapter to identify which table and index correspond to the index page number. Also note the object ID.

  2. If the object with the error is a system table (its object ID is less than 100), refer to “How to Fix a Corrupted Index on System Tables” in the Encyclopedia of Tasks chapter for instructions on how to repair the system table index. Then go to step 4.

  3. If the object ID is greater than 100, drop and re-create the index, using the table name and the index name obtained in step 1. This clears the corruption in most cases.

  4. To verify that all problems have been resolved on this table, run dbcc checktable and dbcc tablealloc on the affected table.

Additional information

If problems persist, this procedure may not be sufficient to clean up the index corruption, and you should contact Sybase Technical Support. Have the following information ready:

Versions in which this error is raised

All versions




Error 678

Severity

20

Message text

Invalid Buffer Cache Access: Could not open object  '%ld' in database '%d'

Explanation

This error is raised when Adaptive Server is unable to locate and read an object into a data cache. The error occurs in the following situations:

Action

If the error is raised by dbcc checkalloc, it is due to an Adaptive Server problem. contact Sybase Technical Support for assistance.

If the configuration parameter sort page count is set to a very high value, try using a smaller value for this parameter.

Versions in which this error is raised

All versions




Error 691

Severity

20

Message text

Encountered invalid logical page '%ld' while accessing   object '%ld' in database '%d'. This is an internal system error.   Please contact Sybase Technical Support.

Explanation

NoteThese errors may be due to hardware problems.

This error occurs when Adaptive Server tries to access an object but requests an invalid page number. There are two possibilities:

Error 691 results in a stack trace and breaks your connection to Adaptive Server.

Action

Take the following steps:

  1. Check the server error log for other errors that may have been raised prior to the 691 error. Save the entire error log.

  2. Identify the object named in the error message using the following isql commands:

    1> use <database name>
    2> go
    1> select name from sysobjects where id=<object id>
    2> go
    

  3. To determine the full extent of the corruption, run dbcc checkstorage, the dbcc checkdb and dbcc checkalloc commands, or dbcc checktable and dbcc tablealloc) as soon as possible.

  4. To check if this error is a result of hardware failure, examine your operating system error log and correct hardware problems.

If the 691 error is not a soft error (one that exists only in memory), the problem is severe. Sybase Technical Support may be able to help you recover from the error. However this recovery procedure often results in loss of data; if this is unacceptable, you will probably need to restore from backups.

Additional information

Refer to the writeup for Error 605 in this chapter for a discussion of potential causes of hardware error.

Have the following information ready before calling Sybase Technical Support:

Versions in which this error is raised

All versions




Error 692

Severity

20

Message text

Uninitialized logical page '%ld' was read while accessing object '%ld' in database '%d'. Please contact Sybase Technical Support.

Explanation

NoteThese errors may be due to hardware problems.

Error 692 occurs when Adaptive Server tries to read a page that is not formatted (initialized) or is improperly formatted. The server retries the read if the first read attempt failed, and raises the 692 error if the second read attempt also fails.

Error 692 results in a stack trace and breaks your connection to Adaptive Server.

Action

Take the following steps:

  1. Check the server error log for other errors that may have been raised prior to the 692 error. Save the entire error log.

  2. Obtain page information by running dbcc page as soon as possible, using the database ID and page number shown in the message:

    1> dbcc page (<db_id>, <page_number>, 0, 1, 1, -1)
    2> go
    

    WARNING! Use the dbcc page command only as directed above.

  3. Identify the object named in the error message using the following isql commands:

    1> use <database name>
    2> go
    1> select name from sysobjects where id=<object_id>
    2> go
    

  4. Find information about this object in sysindexes:

    1> select first, root, doampg, ioampg from sysindexes
    2> where name = object_name(<object_id>)
    3> go
    

  5. To determine the full extent of the corruption, run dbcc checkstorage, the dbcc checkdb and dbcc checkalloc commands, or dbcc checktable and dbcc tablealloc) as soon as possible.

  6. To check if this error is a result of hardware failure, examine your operating system error log and correct hardware problems. See “Checking the Operating System Error Log” in the Encyclopedia of Tasks chapter for assistance.

If the 692 error is not a soft error (one that exists only in memory), the problem is severe. Sybase Technical Support may be able to help you recover from the error. However, this recovery procedure often results in loss of data; if this is unacceptable, you will probably need to restore from backups.

Additional information

Refer to the Error 605 writeup for a discussion of potential causes of hardware error. Refer to “Useful dbcc Commands” in the Encyclopedia of Tasks chapter for more dbcc information.

Have the following information ready before calling Sybase Technical Support:

A database dump and transaction log dumps may also be required.

Versions in which this error is raised

All versions




Error 693

Severity

20

Message text

Multiple copies of logical page '%ld' from database '%d' reside in more than one cache. This is an internal system error. Please contact Sybase Technical Support.

Explanation

This error occurs when Adaptive Server tries to access an object but is unable to establish the identity of a logical page for the object. Copies of the page are found in more than one cache, and the current session is accessing the wrong version.

Error 693 is caused by an Adaptive Server problem. It results in a stack trace and breaks your connection to Adaptive Server.

Action

  1. Check the server error log for other errors that may have been raised prior to the 693 error. Save the entire error log.

  2. Obtain cache information by running dbcc page as soon as possible, using the database ID and page number shown in the message:

    1> dbcc page (<db_id>, <page_number>, 0, 1, 1, -1)
    2> go
    

    WARNING! Use the dbcc page command only as directed above.

  3. Contact Sybase Technical Support with the information you collected.

Additional information

Refer to Error 605 for a complete list of related object mismatch errors.

Have the following information ready before calling Sybase Technical Support:

Versions in which this error is raised

All versions




Error 694

Severity

24

Message text

An attempt was made to read logical page '%ld', virtpage '%ld' from virtual device '%d' for object '%ld' in database '%d'. The page was not read successfully. You may have a device problem or an operating system problem.

NoteThese errors may be due to hardware problems.

Explanation

This error occurs when Adaptive Server tries to access an object but is unable to read the page mentioned in the message. Adaptive Server automatically issues a second read request to verify the consistency of the first read attempt. One of the following cases will be true:

In all cases, Adaptive Server writes the following message into the error log:

Suspect a Device or OS problem, %s

and raises Error 694, resulting in a stack trace and breaking your connection to Adaptive Server.

This error indicates hardware or operating system problems.

Action

Additional information

Refer to the writeup for Error 605 for a discussion of potential causes of hardware error.

Versions in which this error is raised

All versions




Error 695

Severity

20

Message text

An attempt was made to read logical page '%ld' for object '%ld' in database '%d' from cache '%.*s'. Wrong logical page '%ld' was brought into cache.

NoteThese errors may be due to hardware problems.

Explanation

Error 695 occurs when Adaptive Server tries to read a page from disk (the first logical page in the message), but the page number in the header of the returned page does not match the requested page. This means that the page is corrupt on disk, and has been overwritten by another page. The error may be due to an Adaptive Server problem but could also be caused by problems such as overlapping partitions or hardware errors.

Error 695 results in a stack trace and breaks your connection to Adaptive Server. Additional errors may be reported on the console and in the server error log prior to this error.

Action

  1. Check the server error log for other errors that may have been raised prior to the 695 error. Save the entire error log.

  2. Obtain page information by running dbcc page as soon as possible, using the database ID and page number shown in the message:

    1> dbcc page (<db_id>, <page_number>, 0, 1, 1, -1)
    2> go
    

    WARNING! Use the dbcc page command only as directed above.

  3. To determine the scope of the problem, locate the device on which the database resides, and check if any other databases use the same device. Refer to “How to Determine Which Physical Devices a Database is On” in the Encyclopedia of Tasks chapter.

  4. Check that the device is partitioned correctly. See “Correct Use of Raw Partitions” in the Encyclopedia of Tasks chapter .

  5. Run dbcc log to find the history of transactions against this page.

    1> dbcc log (<dbid>, 0, <page_no>, 0, 0, -1)
    2> go
    

    WARNING! Use the dbcc log command only as directed above.

  6. To determine the full extent of the corruption, run dbcc checkstorage, the dbcc checkdb and dbcc checkalloc commands, or dbcc checktable and dbcc tablealloc) as soon as possible.

  7. To check if this error is a result of hardware failure, examine your operating system error log and correct hardware problems. See “Checking the Operating System Error Log” in the Encyclopedia of Tasks chapter for assistance. Also see Error 605 for a discussion of potential causes of hardware error.

Sybase Technical Support may be able to help you recover from the error. However this recovery procedure often results in loss of data; if this is unacceptable, you will probably need to restore from backups.

Additional information

See “Useful dbcc Commands” in the Encyclopedia of Tasks chapter for more dbcc information.

Have the following information ready before calling Sybase Technical Support:

Versions in which this error is raised

All versions




Error 696

Severity

21

Message text

An attempt was made to fetch logical page '%ld' in tempdb from cache '%.*s'. Page belongs to object '%ld' and not to object '%ld'. Restart of SQL Server will clear the error. Please contact your System Administrator for help.

Explanation

This error occurs when Adaptive Server discovers page allocation corruption. Adaptive Server tries to access a particular object but discovers a page in the object's page chain whose object ID is different than that of the object being accessed.

This error is similar to the 605 error. However, Error 696 always occurs in the context of the tempdb database. Since the object ID mismatch is detected in cache, this is a transient (soft) error.

Action

Shut down and restart Adaptive Server to clear the cache problem. If Error 696 occurs again, call Sybase Technical Support.

Additional information

Have the following information ready before calling Sybase Technical Support:

Versions in which this error is raised

All versions




Error 697

Severity

20

Message text

An attempt was made to fetch logical page '%ld' for object '%ld' in database '%d' from cache '%.*s'. Wrong logical page '%ld' was found in cache.

NoteThese errors can be due to hardware problems.

Explanation

This error occurs when Adaptive Server tries to access an object in cache but arrives at an invalid page. The page number is correct on disk, but it does not match the page number of the page in memory.

Error 697 results in a stack trace and breaks your connection to Adaptive Server.

Action

Since the problem occurs in cache, it is a soft error. Shut down and restart Adaptive Server to clear the memory corruption.

Versions in which this error is raised

All versions