I'm trying to add a server as a failover for SQL Server and it is not using the port 1443
, I'm using the port 2776
. I'm trying to specify it but everything I tried didn't work. How could I do that?
private String url = "jdbc:sqlserver://server1:2776;DatabaseName=db;failoverPartner=server2";
I've tried the following configs, but none of them worked.
...failoverPartner=server2:2776
...failoverPartner=server2,2776
...failoverPartner=server2\\db
But everytime I get exception.
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host server2, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host server2:2776, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host server2, 2776, port 1433 has failed. Error: "null. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
failover
anddatabase-mirroring
as I assume that's what you're working with... correct? – TT.failoverPartner
name. – TT.