检测SQL Server远程TCP连接丢失 [英] Detect SQL Server remote TCP connection Lost

查看:96
本文介绍了检测SQL Server远程TCP连接丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问,有没有办法检测客户端和服务器之间SQL SERVER TCP连接何时丢失?

Please, is there any way to detect when a SQL SERVER TCP connection is lost between Client and Server ?

另外,在DotNetFramwork中的实体框架上是否有任何事件与经典连接一起检测客户端何时失去与数据库服务器的连接?

In other, is there any event on Entity Framework on in DotNetFramwork with classic connection to detect when the Client lost the connection with Database Server ?

第一个启示是在服务器上创建套接字TCP服务器并在我的客户端应用程序中检查它。 

As the first revelation is to create Socket TCP Server on the Server and Check it in my client app. 

我需要知道何时连接丢失以重新注册到SQLDependecies。

I need to know when connection is lost to relunch registering to the SQLDependecies.

请你建议什么?

谢谢,

推荐答案


请问,有什么方法可以检测到SQL的时间客户端和服务器之间的服务器TCP连接丢失了吗?

Please, is there any way to detect when a SQL SERVER TCP connection is lost between Client and Server ?

另外,在DotNetFramwork中的实体框架上是否有任何事件与经典连接检测当C lient丢失了与数据库服务器的连接?

In other, is there any event on Entity Framework on in DotNetFramwork with classic connection to detect when the Client lost the connection with Database Server ?

第一个启示是在服务器上创建Socket TCP Server并在我的客户端应用程序中检查它。 

As the first revelation is to create Socket TCP Server on the Server and Check it in my client app. 

我需要知道何时连接丢失以重新注册到SQLDependecies。

I need to know when connection is lost to relunch registering to the SQLDependecies.

请你建议什么?

谢谢,




当程序回来时出现异常消息"网络错误26,并且没有找到MS SQL Server的实例,那么你就会知道发生了什么。


When a program comes back with the exception message "Network Error 26 and no instance of MS SQL Server could be found", then you'll know something has happened.


这篇关于检测SQL Server远程TCP连接丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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