I have an application running on a server with the SqlDependency / query notification - tracking changes in a table on another server.
It works fine until we reboot / reboot SQL Server. When SQL Server restarts due to some maintenance and fixes, another application throws the following errors and stops. I can say that it stops because it does not track changes after starting and starting SQL Server.
I need to restart the application to resubmit the request subscription. I do not make any exceptions inside the code that would stop the application. I will catch the exception and send an email.
System.Data.SqlClient.SqlException (0x80131904): A transport level error occurred while sending a request to the server. (provider: TCP provider, error: 0 - existing connection was forcibly closed by the remote host.) --->
System.Data.SqlClient.SqlException (0x80131904): A network-related or specific instance error occurred while establishing a connection to SQL Server. The server was not found or was not available. Verify the instance name is correct and configure SQL Server to connect remotely.
I am new to SqlDependency / query notifications, so I'm not sure if this is the expected behavior or something that I am doing wrong. It is my understanding (from other posts ( SqlDependency Reliablity? ) That I do not need to restart the job to resubmit.
Appreciate your time and answers
source share