Why does the exernal SQL connector require a port, when the server runtime connection does not?

0
We have a local SQL server instance, where there are multiple database servers on one instance. Due to this, we cannot specify a port when connecting since the instance handles that mapping. This isn't a problem for the apps server runtime because it does not require a port, and lets you enter a jdbc connection string without the port.   However, for the external SQL connector, it REQUIRES a port in the jdbc connection string, throwing an error saying its invalid without a port. Due to this, we cannot connect to any databases with the external connector, but can use the databases for the app just fine. How do I get around this?
asked
1 answers
0

Hi Alex,

Use the jdbc:sqlserver:// syntax with the instance name: SQL Server supports JDBC connections to a named instance without specifying the port directly.

 

Syntax:

jdbc:sqlserver://ServerName\\InstanceName;databaseName=YourDatabase;integratedSecurity=true;

 

You can refer this for your solution.

https://stackoverflow.com/questions/52893597/jdbc-connection-to-sql-server-with-dynamic-tcp-ports

 

Thanks,

Arun

 

 

answered