Article ID: 295114 - Last Review: November 17, 2004 - Revision: 4.2 FIX: SELECT * FROM SYSINDEXES on a database that is upgraded to SQL Server 2000 may cause an access violationThis article was previously published under Q295114
BUG #: 235696 (SHILOH_bugs)
On This PageSYMPTOMS
Executing a SELECT * FROM SYSINDEXES query against a database that has been upgraded from Microsoft SQL Server 7.0 may cause an Access Violation. If an Access Violation occurs, an error message similar to the following displays in the query window:
ODBC: Msg 0, Level 19, State 1 SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process. Server: Msg 1203, Level 20, State 1, Line 1 Process ID 51 attempting to unlock unowned resource KEY: 7:2:1 (790023da5d09). CAUSE
The maximum length defined for the keys column in the sysindexes system table in SQL Server 2000 is 1088, while in SQL Server 7.0, it is only 816. When a database is upgraded from SQL Server 7.0, the maximum length defined for the keys column is not updated. As a result, when an index whose keys column exceeds 816 bytes is created and the index is subsequently fetched, as in a SELECT * FROM SYSINDEXES query, the prefetch buffer is written past the 816 bytes that have been allocated, which causes the Access Violation.
RESOLUTIONTo resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
290211
(http://support.microsoft.com/kb/290211/EN-US/
)
INF: How to Obtain the Latest SQL Server 2000 Service Pack
STATUSMicrosoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1. MORE INFORMATIONSteps to Reproduce Behavior
2001-04-02 17:55:04.09 spid51 Using 'sqlimage.dll' version '4.0.5' Stack Dump being sent to d:\mssql8\MSSQL\log\SQL00011.dmp 2001-04-02 17:55:04.09 spid51 Error: 0, Severity: 19, State: 0 2001-04-02 17:55:04.09 spid51 SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.. ******************************************************************************* * * BEGIN STACK DUMP: * 04/02/01 17:55:04 spid 51 * * Exception Address = 004270D7 (CStmtQuery::ErsqExecuteQuery(class CMsqlExecContext *,class CEsComp const *,class CEsComp const *,unsigned long *,int,int)const + 0000044A Line 0+00000000) * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION * Access Violation occurred reading address 00000038 * Input Buffer 52 bytes - * select * from sysindexes * ******************************************************************************* Short Stack Dump 004270D7 Module(sqlservr+000270D7) (CStmtQuery::ErsqExecuteQuery(class CMsqlExecContext *,class CEsComp const *,class CEsComp const *,unsigned long *,int,int)const +0000044A) 00441A34 Module(sqlservr+00041A34) (CStmtSelect::XretExecute(class CMsqlExecContext *)const +0000021C) 004160DB Module(sqlservr+000160DB) (CMsqlExecContext::ExecuteStmts(class ExecutionContext *)+0000027E) 00415765 Module(sqlservr+00015765) (CMsqlExecContext::Execute(class CCompPlan *,class CParamExchange *)+000001C7) 00415410 Module(sqlservr+00015410) (CSQLSource::Execute(class CParamExchange *)+00000343) 005A683F Module(sqlservr+001A683F) (CStmtPrepQuery::XretExecute(class CMsqlExecContext *)const +00000211) 004160DB Module(sqlservr+000160DB) (CMsqlExecContext::ExecuteStmts(class ExecutionContext *)+0000027E) 00415765 Module(sqlservr+00015765) (CMsqlExecContext::Execute(class CCompPlan *,class CParamExchange *)+000001C7) 00415410 Module(sqlservr+00015410) (CSQLSource::Execute(class CParamExchange *)+00000343) 00459A54 Module(sqlservr+00059A54) (language_exec(struct srv_proc *)+000003C8) 004175D8 Module(sqlservr+000175D8) (process_commands(struct srv_proc *)+000000E0) 410735D0 Module(UMS+000035D0) (ProcessWorkRequests(class UmsWorkQueue *)+00000264) 4107382C Module(UMS+0000382C) (ThreadStartRoutine(void *)+000000BC) 7800BEA1 Module(MSVCRT+0000BEA1) (_beginthread+000000CE) 77E92CA8 Module(KERNEL32+00012CA8) (CreateFileA+0000011B) ------------------------------------------------------------------------------- 2001-04-02 17:55:04.49 spid51 clean_tables_xact: active sdes for tabid 22001-04-02 17:55:04.49 spid51 Process 51 unlocking unowned resource: KEY: 7:2:1 (790023da5d09) 2001-04-02 17:55:04.49 spid51 Error: 1203, Severity: 20, State: 1 2001-04-02 17:55:04.49 spid51 Process ID 51 attempting to unlock unowned resource KEY: 7:2:1 (790023da5d09).. 2001-04-02 17:55:04.50 spid51 clean_tables_xact: active sdes for tabid 22001-04-02 17:55:04.50 spid51 Process 51 unlocking unowned resource: KEY: 7:2:1 (790023da5d09) 2001-04-02 17:55:04.50 spid51 Error: 1203, Severity: 20, State: 1 2001-04-02 17:55:04.50 spid51 Process ID 51 attempting to unlock unowned resource KEY: 7:2:1 (790023da5d09).. 2001-04-02 17:55:04.50 spid51 Error: 0, Severity: 19, State: 0 2001-04-02 17:55:04.50 spid51 language_exec: Process 51 generated an access violation. SQL Server is terminating this process.. 2001-04-02 17:55:04.50 spid51 clean_tables_xact: active sdes for tabid 22001-04-02 17:55:04.50 spid51 Process 51 unlocking unowned resource: KEY: 7:2:1 (790023da5d09) 2001-04-02 17:55:04.50 spid51 Error: 1203, Severity: 20, State: 1 2001-04-02 17:55:04.50 spid51 Process ID 51 attempting to unlock unowned resource KEY: 7:2:1 (790023da5d09)..
| Article Translations
|
Back to the top
