ASP.Net connection to a failed over SQL Cluster

  • Thread starter Thread starter Robin9876
  • Start date Start date
R

Robin9876

In an ASP.Net V2 application that has the connection string as

"Data Source=MySQLClusterInstance; Initial Catalog=myDB; User
ID=aUser; Password=aPassword; Persist Security Info=True;"

Then when the SQL cluster is failed over and is running on another
node the following error is displayed in the web page.

A transport-level error has occurred when sending the request to the
server. (provider: TCP Provider, error: 0 - An existing connection was
forcibly closed by the remote host.)

If the web page is closed and then reopened it works on the connection
to the failed over node.

What is required to change to allow the .Net application to work when
the SQL Cluster is failed over to another SQL Node?
 
sqlserver clusters do not support seamless failover as its the connect logic
that handles the failover. your code should detect the lost connection,
reconnect and start the transaction over (all pending tranaction will have
been rolled back). if this is too hard to code, catch the error and render a
retry button.

-- bruce (sqlwork.com)
 
Can you use DTC to handle the database transactions or does it require
ASP.Net code changes?
 
Back
Top