ASP.Net connection to a failed over SQL Cluster

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?
 
B

bruce barker

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)
 
R

Robin9876

Can you use DTC to handle the database transactions or does it require
ASP.Net code changes?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top