Home > database >  After SQL mirror, backup server to modify IP address, client connection interruption how to return a
After SQL mirror, backup server to modify IP address, client connection interruption how to return a

Time:10-08

In field control environment based on SQL Server 2008 r2 for SQL Server dual machine images, A primary Server, IP for 192.168.1.10, B for the backup Server, IP for 192.168.1.11, C as the monitoring Server, IP for 192.168.1.12, D for the domain control Server, IP for 192.168.1.200 Server also mirror is successful, the primary Server off A network environment, the service can automatically transfer the SQL service to Server B, the client with the IP address of the Server B connection is normal also, question, A malfunction or broken network, the Server SQL Server after automatic conversion to Server B, I amend the Server B's address to the address of the Server A, namely 192.168.1.10, the client then don't do any change, still connected 192.168.1.10, the client can connect login into the system, but disconnect immediately after more than ten seconds, according to "refused to login, please check the network" error, such as login again, still can go in, but the same is automatically disconnect in A minute, what is the problem?

CodePudding user response:

After a Failover, server B can need not modify the IP address, add parameters to the client database connection string "Failover Partner=192.168.1.11" can be realized automatic reconnection.
Refer to https://docs.microsoft.com/zh-cn/dotnet/framework/data/adonet/sql/database-mirroring-in-sql-server

CodePudding user response:

reference 1/f, started the first response:
after Failover, server B can need not modify the IP address, add parameters to the client database connection string "Failover Partner=192.168.1.11" can be realized automatic reconnection.
Refer to https://docs.microsoft.com/zh-cn/dotnet/framework/data/adonet/sql/database-mirroring-in-sql-server


Hello, the moderator, has contacted the developer of the ERP for many times, do not know for what reason, they did not give us to modify the connection string, so we didn't consider the way to try to modify the address of the server

CodePudding user response:

Should be able to add a new IP on server B: 192.168.1.10 can, at the same time delete database image.

CodePudding user response:

The
reference 3 floor started first response:
should be able to add a new IP on server B: 192.168.1.10 can, at the same time delete database image.


Didn't quite understand, is in the IP address of the server B to add a spare 192.168.1.10, right? Delete a mirror database is deleted after add address image, then mirror or how to do?

CodePudding user response:

Add IP method: nic - right - property - Internet protocol version 4 (TCP/IPv4) - property - senior - IP Settings - added.

CodePudding user response:

Estimated that the main reason is that the IP and IP as A
If your program is to connect the server name (or be able to connect to the server name), then it is recommended that you modify the hosts file in as the method to deal with your needs
Prev:Python
  • Related