Home > Back-end >  About the database, the mirror fault automatic transfer ADO ConnectionString configuration problems.
About the database, the mirror fault automatic transfer ADO ConnectionString configuration problems.

Time:10-12

The reality is like that, I describe,

Background:
Now has a server SERVER_A SERVER_B, in the same domain, SERVER_A DATABASE_A on database as the main body, SERVER_B DATABASE_A for mirror, automatic failover mode to transfer,

I want to reach the effect is to set up a general ConnectionString, when SERVER_A DATABASE_A database as the main body can be connected on success; SERVER_A failure (such as network impassability) SERVER_B database after DATABASE_A also can connect successfully as the main body,

As far as I know Failover Partner properties can achieve the result that I want, but do not know how to set up, the great god please help,

CodePudding user response:

Nobody reply top himself,

CodePudding user response:

Can write the address fixed in one place, even if A server can use B service connection string

CodePudding user response:

refer to the second floor gykthh response:
can write connection address fixed in one place, even if A server can use service connection string B


This I know, I just wanted to see if you can configure a generic connection string, should be can match,

CodePudding user response:

No one know?

CodePudding user response:

I also want to know, at present we are like that, A, B two servers cluster, virtual IP, A client with A virtual IP connection, when A online virtual IP in the ARP MAC=A, when A fault, the client displays the connection fails, close the client, to open the client, and OK, wait for the answer,

CodePudding user response:

A server program, the client use UDP server automatically find local area network, then the request to the database connection to the server, three layer model is false,

CodePudding user response:

Server can configure a variety of operating mode, but also can detect SQL Server shutdown,

CodePudding user response:

Fault automatic transfer?
The server's IP also automatically modify

Application as long as access to the original IP

CodePudding user response:

refer to 7th floor PPower response:
Server can configure a variety of operating mode, also can detect SQL Server shutdown,

Can you trouble points in detail,

CodePudding user response:

Connection link failure is a error, when error out you can connect to another database,
Approach is to capture the connection error in error changing the connection link dynamically to you want to change the connection,
Method for ado connection test can be used. The udl connect, after connect another error message in advance when connected directly to the test. The udl is ok,
  • Related