-
I'm connecting to an Oracle that has two nodes. This JDBC URL works: (DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=yes)(FAILOVER=on)(ADDRESS=(PROTOCOL=TCP)(HOST=host1.domain.com)(PORT=xxxx))(ADDRESS=(PROTOCOL=TCP)(HOST=host2.domain.com)(PORT=xxxx)))(CONNECT_DATA=(SERVICE_NAME=ServiceName))) But this one doesn't: (DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host1.domain.com)(PORT=xxxx))(CONNECT_DATA=(SERVICE_NAME=ServiceName)))(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host2.domain.com)(PORT=xxxx))(CONNECT_DATA=(SERVICE_NAME=ServiceName)))) Any insight on why the second one is not working? The error I get is ORA-12564: TNS connection refused. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I use regular expression to detect server, port and service from JDBC string so I will update the code to detect and telll you |
Beta Was this translation helpful? Give feedback.
-
sorry for late you should change xxxx in expression |
Beta Was this translation helpful? Give feedback.
sorry for late you should change xxxx in expression
port=xxxx
to number exampleport=1521
and it will work