Some (all/most?) installations of MS Sql Server do not enable TCP/IP connectivity by default. This needs to be configured manually. Do the following to activate TCP/IP connectivity for MS Sql Server.
By default, some installations of MS Sql Server have mixed mode authentication disabled. To authenticate using a username/password (i.e. not using Windows authentication), mixed mode authentication needs to be enabled. Enable mixed mode as shown below
Open Sql Server Management Studio (SSMS), select the server, then select Properties.
For some reason Microsoft requires the installation of custom DLLs for JDBC to work.
Note that the versions of the DLL and the JDBC jar need to match.
There are specific versions for JRE versions (JRE 11, JRE 8, etc.).
The drivers for these versions are marked as 11.2.2.jre11, 11.2.2.jre8, etc.
You may need to modify the pom.xml file of your application to use the correct version of the driver for your database version.
The DLLs can be found in the zip file we downloaded for the JDBC Driver as shown below after the zip has been unzipped (enu/auth/64 for the 64 bit version).
Move the dll to a permanent location and then add the location of the dll to your path as shown below.
Alternatively you can move the dll to a location already on the path.