I am trying to connect to Vertica nodes through vsql
using the -h
parameter to specify the host IP. However, I want to specify failover nodes.
According to the documentation backup hosts can be provided as a property in JDBC connection.
How can I implement the same through vsql
?
edd is correct, you can use
-B SERVER:PORT
. Also, if you have native connection load balancing set, you can use the-C
option. This will allow the Vertica native load balancer to choose a host for you.To set the load balancer you run:
Then when you connect, you use the
-C
option, and you will see that Vertica has selected a new host.Using
-C
should work if the node is down on the specified host, as long as the Vertica agent is still running on that host.