Microsoft KB Archive/270061

From BetaArchive Wiki
Knowledge Base


BUG: Access Violation Occurs When You Debug Stored Procedure

Article ID: 270061

Article Last Modified on 10/31/2003



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition



This article was previously published under Q270061

BUG #: 58179 (SQLBUG_70)
BUG #: 235205 (SHILOH_BUGS)

SYMPTOMS

The following error message may be returned to a Transact-SQL debugger, and reported in the SQL Server Errorlog, when you attempt to debug a Transact-SQL statement or a stored procedure:

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

The preceding error message appears in the Transact-SQL debugger included with Microsoft Visual C++, while the following error message appears in the Transact-SQL debugger included with Microsoft Visual Basic:

Process %i generated fatal exception c0000005

Because the client applications parse the error message, the exact error message may vary from client to client. The Transact-SQL debuggers included in various development environments in this case.

CAUSE

This error message occurs when the Configuration Function @@Servername returns Null.

To verify this, open Query Analyzer, connect to the server, and then run the following statement:

Select @@Servername
                

Normally, this code returns the Microsoft Windows NT machine name of the server.

WORKAROUND

To work around this behavior, run the following statement from the Query Analyzer:

sp_addserver 'servername', 'local'
                

NOTE: servername is the Windows NT machine name. Stop, and then restart the SQL Server server.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Keywords: kbbug kbpending KB270061