Test Connection may confuse user when user enters multiple hosts and if the first host is unreachable. This is because of the limitation of Test Connection only attempting a socket connection to the first host; and it does not try the second one.
In general, here is the algorithm for Test Connection
Step 1) Attempts a socket connection to user input - host, port;
if SUCCESS: proceed to Step 2)
if FAILURE: stop and show the error message to user
Step 2) Attempts a jdbc connection using the selected driver;
So in this case if the first host is unreachable it does not proceed with the jdbc connection. This issue will happen with all drivers which support multiple host; eg: oracle and mongodb.
For database with multiple host support, the Test Connection works as follows:
Step 1) Attempts a jdbc connection using the selected driver;
if SUCCESS: stop; no more diagnostics required
If FAILURE: proceed to Step 2
Step 2) Iterates through the list of host-port pair information and attempts a socket connection;
If SUCCESS: proceed to the next host-port pair
If FAILURE: stop and show the error message to user
Test case: Rohit - try this out for Oracle w/ a tnsnames.ora file that contains multiple hosts
Test case: Rohit - try this out for Oracle w/ a tnsnames.ora file that contains multiple hosts
FYI - I have attached a sample tnsnames.ora file which contains different types of values. Please make sure you fill in appropriate values to test a real db connection.
FYI - I have attached a sample tnsnames.ora file which contains different types of values. Please make sure you fill in appropriate values to test a real db connection.
I have tested it and when we specify multiple host in tnsnames.ora file, it opens a popup window which contains a list of host and whichever is selected connection string for that host\hosts gets populated in "Descriptor" Text Area in Register Server Tab
I have tested it and when we specify multiple host in tnsnames.ora file, it opens a popup window which contains a list of host and whichever is selected connection string for that host\hosts gets populated in "Descriptor" Text Area in Register Server Tab
Issue #9134 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 14.0.0-beta-15 |
No time estimate |
1 issue link |
relates to #9032
Issue #9032ADS not able to connect to secondary member when primary of repl set is down |
For database with multiple host support, the Test Connection works as follows:
Step 1) Attempts a jdbc connection using the selected driver;
if SUCCESS: stop; no more diagnostics required
If FAILURE: proceed to Step 2
Step 2) Iterates through the list of host-port pair information and attempts a socket connection;
If SUCCESS: proceed to the next host-port pair
If FAILURE: stop and show the error message to user