Reputation: 155
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.
As indicated in the post, somebody said that the dynamic port got to be the same with IPAll, I tried it, no luck.
So my DBVisualizer looks like the following. And I did set encrypted: Optional and trustServerCertificate: true in the properties column.
Hope somebody helps, thank you for your time.
EDIT:
I am using jTDS, picture attached:
Upvotes: 1
Views: 151
Reputation: 9159
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:
Upvotes: 1
Reputation: 155
The user @AlwaysLearning already says it all:
First, go to download jTDS - SQL Server driver
. Paste those files into the Driver Manager
, picture attached:
You may need to create another User Drivers
as it shall already have the default SQL Server by DBVisualizer, in my case, I make it like SQL Server-1
.
Now the crucial part is to copy the ntlmauth.dll
file from the downloaded folder (x64>SSO>ntlmauth.dll
) to the correct path.
The correct path is: C:\Windows\System32
. Restart the DBVisualizer, type the Database URL
to be jdbc:jtds:sqlserver://127.0.0.1:1433/pubs
, where pubs
is the database to be replaced with, and you should be good.
PANIC SITUATION:
If I disconnect the SQL Server-1
and reconnect again, I will get the I/O error like I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
The way I overcome this difficulty is silly: simply close the DBVisualizer and open it again. Not sure if somebody can fix this panic situation.
Upvotes: 1