r/SQLServer • u/Rocknbob69 • Sep 29 '25
Question JDBC Connection error to SQL Server
I am getting the following message every minute on a restored VM running SQL.
"Login failed for ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows Authentication only. [Client Localhost]
Nothing has changed in regards to allowed authentication methods. I can log in either way using Windows credentials or an sa account from SQL Management studio.
There are also weird issues during a restart of all of the associated services and one service not starting or staying running.
5
Upvotes
View all comments
Show parent comment
1
u/SirGreybush 1 Sep 30 '25
Trying to help. I often work with sysadmins and I feel your frustration.
Understanding what changed would help - one thing is if the SQL Server instance got updates installed, like the one that enforces encrypted connections by default with a trusted certificate.
Can you post your JDBC connection string, replacing sensitive names with a common word?
Can you edit your JDBC connection string, to add to it, the following?
;trustServerCertificate=true