Error 695

Severity

20

Message text

Versions prior to 15.0:

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.

Version 15.0 and later:

An attempt was made to read logical page '%ld' for %S_PTNINFO from disk. Wrong logical page '%ld' was brought into cache '%.*s'.

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. This command is undocumented, nonstandard, and is provided “as is” without any warranty. Sybase Technical Support does not support this command for general use. Although the command syntax is provided for reference, use this command only in the specific diagnostic situations described, and with the specific syntax shown. Failure to do so could cause performance problems and database corruption.

  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 “Determining the physical device on which a database resides” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery.

  4. Check that the device is partitioned correctly. See “Choosing between raw partitions and UNIX files” in the chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery.

  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. This command is undocumented, nonstandard, and is provided “as is” without any warranty. Sybase Technical Support does not support this command for general use. Although the command syntax is provided for reference, use this command only in the specific diagnostic situations described, and with the specific syntax shown. Failure to do so could cause performance problems and database corruption.

  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 chapter “Other Useful Tasks” in the most recent version of Troubleshooting and Disaster Recovery for assistance. Also see “Error 605” for a discussion of potential causes of hardware errors.

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 “dbcc” in the “Commands” chapter of the Reference Manual: Commands for more dbcc information.

Have the information listed in “Reporting errors” before calling Sybase Technical Support, including the output of the dbcc checks from steps 2, 5, and 6 above.

Versions in which this error is raised

All versions