FIX: An access violation exception may occur when you run a SELECT statement that contains complex JOIN operations in SQL Server 7.0

Article translations Article translations
Article ID: 867763 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Bug #: 200107 (SQL Server 7.0)


Expand all | Collapse all

Symptoms

When you run a SELECT Transact-SQL statement to fetch data from your Microsoft SQL Server 7.0 database, an access violation exception may occur if the query contains complex JOIN operations. Additionally, you may receive the following error message:

SqlDumpExceptionHandler: Process 9 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.


You may also notice a short stack dump that is similar to the following in the SQL Server error log:

*******************************************************************************
-------------------------------------------------------------------------------
Short Stack Dump
0x004b74ff Module(sqlservr+b74ff) (CValSwitch::GetDataWithBuffer+17)
0x0041fb1f Module(sqlservr+1fb1f) (GetDataWithBuffer+28)
0x0041faf7 Module(sqlservr+1faf7) (GetDataWithBuffer+0)
0x00420da8 Module(sqlservr+20da8) (CValSwitch::GetDataX+19)
0x0066c8e6 Module(sqlservr+26c8e6) (CQScanSpool::GetRow+19f)
0x0042bcfd Module(sqlservr+2bcfd) (CQScanNLJoin::GetRow+121)
0x004142d5 Module(sqlservr+142d5) (CQueryScan::GetRow+11)
0x00413a37 Module(sqlservr+13a37) (CStmtQuery::FExecuteQuery+303)
0x00418724 Module(sqlservr+18724) (CStmtSelect::XretExecute+1f8)
0x00412f1e Module(sqlservr+12f1e) (CMsqlExecContext::ExecuteStmts+11b)
0x00412a33 Module(sqlservr+12a33) (CMsqlExecContext::Execute+1be)
-------------------------------------------------------------------------------
2004-06-10 13:02:13.95 spid9    Error: 0, Severity: 19, State: 0
2004-06-10 13:02:13.95 spid9    language_exec: Process 9 generated an access violation. SQL Server is terminating this process.


Note This problem does not occur on an instance of Microsoft SQL Server 2000.

Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version            Size    File name
   --------------------------------------------------------------
   04-Oct-2002  11:29  7.00.1081          28,944  Dbmssocn.dll     
   06-Sep-2002  11:25  7.00.1077          53,520  Distrib.exe      
   06-Sep-2002  11:25  7.00.1077          98,576  Logread.exe      
   05-May-2003  06:04                     54,904  Opends60.dbg
   05-May-2003  06:04  7.00.1093         155,920  Opends60.dll     
   06-Sep-2002  11:26  7.00.1077         250,128  Rdistcom.dll     
   06-Sep-2002  11:25  7.00.1077          82,192  Replmerg.exe     
   06-Sep-2002  11:26  7.00.1077          78,096  Replres.dll      
   17-Sep-2002  10:22                      7,941  Securityhotfix.sql
   06-Sep-2002  11:26  7.00.1077         160,016  Snapshot.exe     
   29-May-2003  15:51                     59,214  Sp4_serv_uni.sql
   14-Jan-2003  13:03  7.00.1085         344,064  Sqlagent.exe     
   06-Sep-2002  11:25  7.00.1077          45,056  Sqlcmdss.dll     
   15-May-2003  11:48  7.00.1094       2,629,632  Sqldmo.dll       
   16-May-2003  00:59  7.00.1094          81,920  Sqlmap70.dll     
   22-Jun-2004  12:48  7.00.1149       5,062,928  Sqlservr.exe     
   15-Oct-2003  04:39  7.00.1144         315,392  Sqltrace.dll     
   04-Oct-2002  11:29  7.00.1081          45,328  Ssmsso70.dll     
   15-May-2003  11:48  7.00.1094          24,848  Ssnmpn70.dll     
   26-Sep-2002  08:00                     28,408  Ums.dbg
   26-Sep-2002  07:57  7.00.1079          57,616  Ums.dll          
   16-May-2003  01:01  7.00.1094         151,552  Xpweb70.dll      
Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.

Workaround

To work around this problem, you must force SQL Server to create a different execution plan for the problem query. To do this, you can use one of the following methods:
  • Rewrite the query.
  • Update the statistics on all the tables that are participating in the query.

Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

More information

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates

Properties

Article ID: 867763 - Last Review: October 26, 2013 - Revision: 2.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbautohotfix kbdatabase kberrmsg kbtsql kbfile kbquery kbsqlserv700presp5fix kbfix kbbug kbhotfixserver kbqfe KB867763

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com