I am trying to connect to database using Listeners/DNS but it gives out the error !
Here’s how the connection string looks like :
jdbc:sqlserver://Listener[: Port]
The Error I am getting is -
Whereas when I connect directly to a node, it works fine !
Thanks !
Get rid of any square brackets you’ve got in your connection path. That syntax is usually used in documentation to indicate something is optional. In this case it looks like specifying the port is optional, but in your case you are specifying it, so remove the brackets.
I tried without any port number and just the listener address but that doesn’t seem to work either !
Is there an example on how listener should be connected?
Thanks
I am getting following error by just entering the listener address :
Thanks !
I am sure you have sorted this by now.
I got it to work using
jdbc:sqlserver://Listener\InstanceName
Hope that helps others looking for it