BUG: Access Violation Occurs When You Debug Stored Procedure
This article was previously published under Q270061
BUG #: 58179 (SQLBUG_70)
BUG #: 235205 (SHILOH_BUGS)
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.
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.
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.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.