c# - SqlDependency/Query notification - SQL Server reboot -


i have application running on server has sqldependency / query notification - monitoring changes on table on different server.

it works fine until reboot/restart sql server. when sql server rebooted due maintenance , patches, other application throws following errors , stops. can stops because not monitor changes once sql server , running.

i have restart application resubscribe query notification. not throwing exception inside code stop application. catching exception , sending email.

system.data.sqlclient.sqlexception (0x80131904): transport-level error has occurred when sending request server. (provider: tcp provider, error: 0 - existing connection forcibly closed remote host.) --->

system.data.sqlclient.sqlexception (0x80131904): network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections.

i new sqldependency / query notifications not sure whether expected behaviour or doing wrong. it's understanding(from other posts (sqldependency reliablity?) don't have restart job resubscribe.

appreciate time , answers

this normal because when restart sql server, service stopped , application connected sql server thrown error:

a network-related or instance-specific error occurred while establishing connection sql server.

to avoid problem, can use different instance every application. can install new server instances different names avoid issue. when restart single sql server instance, other sql server instance still remain online.

you can follow these steps install or create new sql server instance:

https://4sysops.com/archives/how-to-create-a-new-sql-server-2012-instance/


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -