Search code examples
sql-serverjdbcdbvisualizer

SQL Server with DB Visualizer


I know it may sound duplicate to other posts, but I have tried my best and still no luck.

The closest post that I found is the following: JDBC connection failed, error: TCP/IP connection to host failed

So my question is, I am using SQL Server 2022, and I am able to connect through SSMS, but if I want to use DBVisualizer to connect with it, then it fails.

As suggested in the aforementioned post, I did the following.

  1. I turn off the firewall, so firewall must not be an issue anymore.
  2. I did turn on the port, as the following picture shown.

enter image description here

  1. For the dynamic port, I did the following.

enter image description here

  1. As indicated in the post, somebody said that the dynamic port got to be the same with IPAll, I tried it, no luck.

  2. So my DBVisualizer looks like the following. And I did set encrypted: Optional and trustServerCertificate: true in the properties column.

enter image description here

  1. While my SSMS looks like the following. I am using Windows Authentication anyway.

enter image description here

enter image description here

enter image description here

Hope somebody helps, thank you for your time.

EDIT:

I am using jTDS, picture attached:

enter image description here


Solution

  • There's no need to use the old hat jtds server in 2024. I installed db viz and followed the below procedure to create a windows auth connection:

    1. Double click on the sql server in the connection list
    2. Changed database to master, default was Northwind
    3. Under properties, you need to change:
    • encrypt to false (or fix the correct keys, which is a hassle)
    • integratedSecurity = true (this actives windows auth)
    • I didn't need it, but sometimes you also need trustServerCertificate = true
    • The url should look like jdbc:sqlserver://localhost:1433;databaseName=master

    Driver settings

    1. Connect:

    Final connection