SQL异常问题 [英] SQL exception issue

查看:104
本文介绍了SQL异常问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到一个随机的SQL异常,我无法识别在我们的一个应用程序的压力测试期间发生。 例外是SQL错误3617,并且在连接打开时出现(基于异常调用堆栈)。 错误是随机发生的,并且不会一直发生。 有些测试在没有出现错误的情况下运行完成,有时它会在压力测试的前2-3分钟内开始发生。


 


环境信息:


 


在数据库服务器上运行VS2008 Team Tester Edition SP1。


这是一个仅包含apps数据库的SQL Server 2008 Standard Edition安装 没有其他应用程序在此服务器上运行。


 


应用程序正在访问数据库使用Microsoft数据访问阻止版本2. 失败的命令是调用SqlHelper.ExecuteReader,从存储过程中获取数据读取器。 存储过程是SQL中的CLR过程。 在调用命令时关闭连接,命令应该打开连接然后调用存储过程。 整个数据库访问代码都包含在ExecuteReader上的C#using语句中,因此即使之前的调用失败,连接也会被关闭。

如果有人可以提供一些见解或指导如果有必要,我去另一个论坛。在此先感谢。

解决方案

请发布完整的异常名称,错误消息和堆栈跟踪。 谢谢!

I am seeing a random SQL exception that I cannot identify occurring during a stress test of one of our applications.  The exception is a SQL Error 3617, and appears (based on the exception call stack) to be on the connection open.  The error is random as to when it happens, and it does not happen all the time.  Some tests run to completion without the error showing up, other times it will start happening within the first 2-3 minutes of the stress test.

 

Environment Information:

 

Running VS2008 Team Tester Edition SP1 on database server.

This is a SQL Server 2008 Standard Edition install containing only the apps database.  No other applications run on this server.

 

The application is accessing the database using the Microsoft Data Access Block version 2.  The command that is failing is a call to SqlHelper.ExecuteReader, getting a data reader from a stored procedure.  The stored procedure is a CLR procedure in SQL.  The connection is closed at the time the command is called, the command should open the connection and then call the stored procedure.  The entire database access code is wrapped in a C# using statement on the ExecuteReader, so even if the prior call to it had failed, the connections would have been closed.

If anyone can offer some insight or direct me to another forum if necessary. Thanks in advance.

解决方案

Please post the complete exception name, error message, and stack trace.  Thanks!


这篇关于SQL异常问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆