你目前正处于脱机状态,正在等待 Internet 重新连接

FIX: SELECT * FROM SYSINDEXES SQL Server 2000 升级的数据库上可能会导致访问冲突

注意:这篇文章是由无人工介入的微软自动的机器翻译软件翻译完成。微软很高兴能同时提供给您由人工翻译的和由机器翻译的文章, 以使您能使用您的语言访问所有的知识库文章。然而由机器翻译的文章并不总是完美的。它可能存在词汇,语法或文法的问题,就像是一个外国人在说中文时总是可能犯这样的错误。虽然我们经常升级机器翻译软件以提高翻译质量,但是我们不保证机器翻译的正确度,也不对由于内容的误译或者客户对它的错误使用所引起的任何直接的, 或间接的可能的问题负责。

点击这里察看该文章的英文版: 295114
本文已归档。它按“原样”提供,并且不再更新。
BUG #: 235696 (SHILOH_bugs)
症状
执行 SELECT * FROM SYSINDEXES 针对已从 Microsoft SQL Server 7.0 升级的数据库的查询可能会导致访问冲突。如果发生访问冲突,错误消息类似于下面显示在查询窗口中:
ODBC: 消息 0,级别 19,状态 1
SqlDumpExceptionHandler: 进程 51 生成致命异常 c0000005 EXCEPTION_ACCESS_VIOLATION。SQL Server 正在终止此过程。

服务器: 消息 1203年,级别 20,1,状态行 1
处理 ID 51 试图解除锁定属于的资源 KEY: 7: 2: 1 (790023da5d09)。
原因
最大长度定义的键列在 SQL Server 2000 sysindexes 系统表中的是 1088,在 SQL Server 7.0 中是仅 819。当从 SQL Server 7.0 升级一个数据库时,定义键列的最大长度不能更新。如此一来时间会创建其键列超过 816 字节的索引和索引是随后,作为在获取 SELECT * FROM SYSINDEXES 查询预读缓冲区写入 816 已分配的字节数超过这会导致访问冲突。
解决方案
若要解决此问题,获得最新的 service pack,对于 SQL Server 2000。有关更多的信息请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
290211INF: 如何获取最新的 SQL Server 2000 Service Pack
状态
Microsoft 已经确认这是 SQL Server 2000 中的问题。此问题 SQL Server 2000 Service Pack 1 中第一次已得到纠正。
更多信息

重现行为的步骤

  1. 附加或 SQL Server 7.0 数据库恢复到 SQL Server 2000 的服务器。
  2. 执行下面的 SQL 语句,以创建表和一个索引其键列超过 816 字节:
    use <dbname>goif object_id('t1') is not null drop table t1gocreate table t1 (c1 int, c2 int, c3 int, c4 int,  c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int, c17 int, d1 int, d2 int, d3 int, d4 int,  d5 int, d6 int, d7 int, d8 int, d9 int, d10 int, d11 int, d12 int, d13 int, d14 int, d15 int, d16 int, d17 int )gocreate clustered index i_t1 on t1 (c1, c2, c3, c4, c5, c6,c7, c8, c9, c10, c11, c12, c13, c14, c15, c16)create nonclustered index i_t2 on t1 (d1, d2, d3, d4, d5, d6,d7, d8, d9, d10, d11, d12, d13, d14, d15, d16)go					


  3. 执行以下查询重新产生访问冲突:
    SELECT * FROM SYSINDEXES					
此外,SQL Server 错误日志中看到下面的堆栈转储和错误:
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.dmp2001-04-02 17:55:04.09 spid51    Error: 0, Severity: 19, State: 02001-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 Dump004270D7 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: 12001-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: 12001-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: 02001-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: 12001-04-02 17:55:04.50 spid51    Process ID 51 attempting to unlock unowned resource KEY: 7:2:1 (790023da5d09)..				

警告:本文已自动翻译

属性

文章 ID:295114 - 上次审阅时间:01/16/2015 22:20:09 - 修订版本: 4.2

Microsoft SQL Server 2000 标准版

  • kbnosurvey kbarchive kbmt kbbug kbfix kbsqlserv2000sp1fix KB295114 KbMtzh
反馈