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