调试存储过程时出错!

cloudchen 2004-04-29 05:47:08
sql2k,在查询分析器中调试一个存储过程。

输入参数后,参数均正确。执行调试,出现如下错误


ODBC: 消息 0,级别 19,状态 1
[Microsoft][ODBC SQL Server Driver][SQL Server]SqlDumpExceptionHandler: 进程 56 发生了严重的异常 c0000005 EXCEPTION_ACCESS_VIOLATION。SQL Server 将终止该进程。

查了下google,好象是sql server拒绝服务。
在查询分析器中执行该存储过程不会出错。
不知道该如何解决?
...全文
153 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
cloudchen 2004-04-30
  • 打赏
  • 举报
回复
对了。就是楼上说的。

我之前更改过机器的计算机名,而sql server里面却没有把计算机名更新,@@servername变成了NULL。

把服务器名重新加入就可以使用调试了!

多谢!!!
netcoder 2004-04-29
  • 打赏
  • 举报
回复
http://support.microsoft.com/default.aspx?scid=kb;en-us;270061&Product=sql2k
BUG: Access Violation Occurs When You Debug Stored Procedure
适用于
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.
netcoder 2004-04-29
  • 打赏
  • 举报
回复
微软的这个sql调试确实做的不好
cloudchen 2004-04-29
  • 打赏
  • 举报
回复
。。。是bug?不会吧。那不就不能进行调试了?太郁闷了。。。
zjcxc 元老 2004-04-29
  • 打赏
  • 举报
回复
如果在查询分析器中执行该存储过程不会出错,那就不关存储过程的事.
查询分析器的调试有时会有这种问题,好像是BUG

34,576

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧